Search Mailing List Archives
[protege-discussion] using PromptTab in my own application
Timothy Redmond
tredmond at stanford.edu
Mon Sep 13 14:05:06 PDT 2010
I don't think that anyone has used prompt in an application in this
way. This is caused when the prompt tab tries to add a menu to
Protege and does not succeed in finding the menu bar. I have fixed
this in the latest svn.
-Timothy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prompt.jar
Type: application/java-archive
Size: 875936 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20100913/90eb21f1/attachment.jar>
-------------- next part --------------
On Aug 19, 2010, at 6:25 PM, Norma Elisa Cabrera Gonzales wrote:
> Hi everyone,
> I am a Cuban professor and I need to merge two domain ontologies
> semiautomatically. I want to use PROMPT because it is the most
> closely tool to what I need, but I want to use it without Prot?g?.
> How can I use PROMPT in my own application?
> I tried with the code below, but raise this exception:
> Exception in thread "main" java.lang.NullPointerException
> at
> edu.stanford.smi.protegex.prompt.PromptTab.addNotify(PromptTab.java:
> 280)
> at java.awt.Container.addNotify(Unknown Source)
> at javax.swing.JComponent.addNotify(Unknown Source)
> at java.awt.Container.addNotify(Unknown Source)
> at javax.swing.JComponent.addNotify(Unknown Source)
> at java.awt.Container.addNotify(Unknown Source)
> at javax.swing.JComponent.addNotify(Unknown Source)
> at javax.swing.JRootPane.addNotify(Unknown Source)
> at java.awt.Container.addNotify(Unknown Source)
> at java.awt.Window.addNotify(Unknown Source)
> at java.awt.Frame.addNotify(Unknown Source)
> at java.awt.Window.pack(Unknown Source)
> at
> cu.edu.uclv.mermai.LoadPrompt.LoadPrompt.main(LoadPrompt.java:39)
> public static void main(String[] args) {
> ArrayList errors = new ArrayList();
>
> Project prj = Project.loadProjectFromFile("test/default.pprj",
> errors);
>
> if (errors.size() > 0) {
> System.out.println("There were erros at loading prj: " + prj);
> return;}
>
> // In the next line, replace "PromptTab" with the plug-in class
> that you want to show in the JFrame
> WidgetDescriptor widgetDescriptor =
> prj
> .getTabWidgetDescriptor("edu.stanford.smi.protegex.prompt.PromptTab");
>
> if (widgetDescriptor == null) {
> System.out.println("Cannot instantiate tab widget.");
> return;}
>
> TabWidget widget =
> WidgetUtilities.createTabWidget(widgetDescriptor, prj);
>
> JFrame frame = new JFrame("My Application Frame");
> frame.getContentPane().add((Component)widget);
> frame.pack();
> frame.setVisible(true);
> }
>
>
> Best regards,
> Norma
>
> ________________________________
> Universidad Central "Marta Abreu" de Las Villas. http://
> www.uclv.edu.cu
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
More information about the protege-discussion
mailing list