I have EMF classes Deck and and Kanji. When I say File/New/Other.../Example EMF Model CreationWizards/deck model, it asks me to create the object in the filesystem. When I say File/New/Other.../Example EMF Model CreationWizards/kanji model, it asks me to create them in the workspace. Not sure what I did differently to cause that. Can anyone clarify what is happening?
Ashwani Kr Sharma Messages: 117 Registered: July 2009 Location: Bangalore, India
Senior Member
Workspace is an eclipse notion that finally wraps the files system only. So finally everything is getting stored in file system.
The wizards asks you to choose a location in your workspace which than finally is stored on filesystem only.
I don't think that is what I'm asking. Why do the creation wizards give me significantly different location dialogs for different classes?
For the deck class, it says to enter a "File", for the kanji class it says to "Enter or select the parent folder". What could cause this? I don't believe I defined the classes any differently, and it keeps me from putting references between the two classes.
On 16-09-10 05:31, Michael Spertus wrote:
> I don't think that is what I'm asking. Why do the creation wizards give
> me significantly different location dialogs for different classes?
>
> For the deck class, it says to enter a "File", for the kanji class it
> says to "Enter or select the parent folder". What could cause this? I
> don't believe I defined the classes any differently, and it keeps me
> from putting references between the two classes.
Are both classes handled by the same EMF editor?
The reason I ask, is that EMF editors (And related creation wizards) are
different if generated for RCP or not. So a non-RCP generated editor
will assume it will be plugged into eclipse and have access to the IDE
and thus the workspace and workspace resources. An RCP version will make
no reference to the IDE plugin and thus have no access or dependency on
the workspace.
On a related note, what I would really like to do is host the EMF model in the same Eclipse workspace I am developing it in. I know I could deploy it and install the plug-in, but that is cumbersome to do as I am developing. What I'd really like is to be able to tell my development Eclipse workspace to (re)load the EMF editor I am developing in it. Does that make sense?
It's possible. In http://wiki.eclipse.org/EMF/Getting_Source we explain
how to do this for EMF itself; we have to be able to generate the models
used by the generator itself. The basic idea is to make the dropins
folder be the workspace and to reuse the files generated by the PDE for
the runtime workbench to relaunch the main workbench.
Michael Spertus wrote:
> Thanks, that did it!
>
> On a related note, what I would really like to do is host the EMF
> model in the same Eclipse workspace I am developing it in. I know I
> could deploy it and install the plug-in, but that is cumbersome to do
> as I am developing. What I'd really like is to be able to tell my
> development Eclipse workspace to (re)load the EMF editor I am
> developing in it. Does that make sense?
It's possible. In http://wiki.eclipse.org/EMF/Getting_Source we explain
how to do this for EMF itself; we have to be able to generate the models
used by the generator itself. The basic idea is to make the dropins
folder be the workspace and to reuse the files generated by the PDE for
the runtime workbench to relaunch the main workbench.
Thanks, Ed. Very cool! I'll give that a try.
I have to add that the history around "the notorious bug 109137" was very interesting as well. Thanks for all the work that went into fixing it.
It's possible. In http://wiki.eclipse.org/EMF/Getting_Source we explain
how to do this for EMF itself; we have to be able to generate the models
used by the generator itself. The basic idea is to make the dropins
folder be the workspace and to reuse the files generated by the PDE for
the runtime workbench to relaunch the main workbench.
Hi Ed,
I wasn't able to get those instructions to work, but simply adding -dev bin to my Eclipse command line seems to make it work. Is that enough, or am I missing something?
Michael Spertus wrote:
> Ed Merks wrote on Thu, 16 September 2010 09:40
>> Michael,
>>
>> It's possible. In http://wiki.eclipse.org/EMF/Getting_Source we
>> explain how to do this for EMF itself; we have to be able to generate
>> the models used by the generator itself. The basic idea is to make
>> the dropins folder be the workspace and to reuse the files generated
>> by the PDE for the runtime workbench to relaunch the main workbench.
>
> Hi Ed,
> I'm having a little trouble getting this to work. I copied my old
> workspace into c:\eclipse\dropins, and then launched eclipse -data
> c:\eclipse\dropins.
I'm not sure it's a good idea to copy the workspace. Workspaces often
have hidden files with absolute locations of the workspace itself. Best
to export all your projects and import them into a new workspace.
> Instead of opening the workspace, I get an empty workspace with errors
> saying "Provisioning exception, No repository found at
> file:/C:/eclipse\dropins/External%20Plug-in%20Libraries/." Any thoughts?
Messages about folders that aren't repositories are to be expected but
shouldn't cause the overall result to be broken.
>
> Thanks for all your help,
>
> Mike
Hi Ed,
I was able to switch to the dropin workspace, and my classes now turn up in the "Example EMF Model Creation Wizards", but when I try to create them in my development workspace (they work fine in a nested Eclipse IDE), I get errors like:
java.lang.ClassNotFoundException: com.japaneselearningtools.tango.kanji.plugin.kanjiPlugin.pre sentation.KanjiPluginEditor
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)