Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » When is a resource created in the workspace or a file?
When is a resource created in the workspace or a file? [message #559198] Wed, 15 September 2010 22:39 Go to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
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?

Thanks,

Mike
Re: When is a resource created in the workspace or a file? [message #559205 is a reply to message #559198] Thu, 16 September 2010 00:19 Go to previous messageGo to next message
Ashwani Kr Sharma is currently offline Ashwani Kr SharmaFriend
Messages: 119
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.

Regards,
Ashwani Kr Sharma
Re: When is a resource created in the workspace or a file? [message #559215 is a reply to message #559205] Thu, 16 September 2010 03:31 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
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.
Re: When is a resource created in the workspace or a file? [message #559263 is a reply to message #559215] Thu, 16 September 2010 08:16 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
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.

the RCP option is set in the .genmodel
Re: When is a resource created in the workspace or a file? [message #559365 is a reply to message #559263] Thu, 16 September 2010 13:27 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
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?
Re: When is a resource created in the workspace or a file? [message #559377 is a reply to message #559365] Thu, 16 September 2010 13:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30553
Registered: July 2009
Senior Member
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.


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?
Re: When is a resource created in the workspace or a file? [message #559494 is a reply to message #559377] Thu, 16 September 2010 20:30 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
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.


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.

Mike

[Updated on: Thu, 16 September 2010 20:34]

Report message to a moderator

Re: When is a resource created in the workspace or a file? [message #559651 is a reply to message #559377] Fri, 17 September 2010 14:09 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
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 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?

Thanks for all your help,

Mike

[Updated on: Fri, 17 September 2010 14:20]

Report message to a moderator

Re: When is a resource created in the workspace or a file? [message #559714 is a reply to message #559651] Fri, 17 September 2010 16:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30553
Registered: July 2009
Senior Member
Michael,

Comments below.


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
Re: When is a resource created in the workspace or a file? [message #559760 is a reply to message #559198] Fri, 17 September 2010 23:25 Go to previous message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
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)
Previous Topic:containment and emf treenode model
Next Topic:[Dawn] Set routing-style to rectilinear
Goto Forum:
  


Current Time: Mon Oct 21 22:16:59 GMT 2019

Powered by FUDForum. Page generated in 0.02790 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top