Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Strange behavior of ProjectExplorer for .ecore files
Strange behavior of ProjectExplorer for .ecore files [message #424101] Thu, 16 October 2008 14:16 Go to next message
Tor Neple is currently offline Tor NepleFriend
Messages: 57
Registered: July 2009
Member
Hello

When I use the ProjectExplorer to open a .ecore file in Eclipse 3.4 I
get a view where the toplevel package is presented more than one time.
In fact it seems as if the number of times it is shown corresponds to
the number of elements contained in the toplevel package.

Examplified, a model like this:
model
-element1
-element2

is shown as:
model.ecore
-model
-model

In the project explorer. I guess this is related to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226584, but since it
occurs also for .ecore files I was wondering whether it is an EMF issue
(found nothing in bugzilla), or whether it actually belongs over in
platform.ui?

Regards


Tor
Re: Strange behavior of ProjectExplorer for .ecore files [message #424102 is a reply to message #424101] Thu, 16 October 2008 14:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
I have a feeling that it's two different projects both contributing to the
package explore the same type of behavior causing it to be duplicated.
What do you have installed?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Strange behavior of ProjectExplorer for .ecore files [message #424139 is a reply to message #424102] Fri, 17 October 2008 06:06 Go to previous messageGo to next message
Tor Neple is currently offline Tor NepleFriend
Messages: 57
Registered: July 2009
Member
Ed Merks wrote:
> I have a feeling that it's two different projects both contributing to
> the package explore the same type of behavior causing it to be
> duplicated. What do you have installed?
>
Maybe. For UML it seems as if the repetition number is 5. Anyways; to
answer your question:
I am running Ganymede "Eclipse Modeling Tools" with the addition of
Papyrus, Subclipse.

I now did a totally new installation with a fresh download (Eclipse
Modeling Tools SR1) and a new workspace and created a new ecore model.
The same behaviour occurs there also.

I do not know if this is helpful, but when getting the selection from
the ProjectExplorer, the code

Object o = currentSelection.getFirstElement();
PlatformObject p = (PlatformObject)o;
EObject e = (EObject)p.getAdapter(EObject.class);

Gives a "proper" EObject for the first instance in the tree, and
DynamicEObjects for the rest of them.


Tor
Re: Strange behavior of ProjectExplorer for .ecore files [message #424142 is a reply to message #424139] Fri, 17 October 2008 08:00 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Tor,

This behavior is indeed involved because of several projects are
defining their own content provider for the Project Explorer (which is
using the Common Navigator Framework capabilities).

In the ecore case, there is one provided by Ecore Tools, another one
provided by the EMF Editor provided by GMF as an example.

In the uml diagram, the UML2 Tools project has defined many diagrams
each one providing a new content provider for both the domain model
(*.uml) and its asssociated diagram model (*.*_diagram). (This is
completely linked with the bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226584 as you guess).

However, this can be fixed. You can indeed choose what you want to show
or not in this view : see
http://wiki.eclipse.org/EcoreTools_FAQ#Views_problems

Regards,
Jacques

Tor Neple a écrit :
> Ed Merks wrote:
>> I have a feeling that it's two different projects both contributing to
>> the package explore the same type of behavior causing it to be
>> duplicated. What do you have installed?
>>
> Maybe. For UML it seems as if the repetition number is 5. Anyways; to
> answer your question:
> I am running Ganymede "Eclipse Modeling Tools" with the addition of
> Papyrus, Subclipse.
>
> I now did a totally new installation with a fresh download (Eclipse
> Modeling Tools SR1) and a new workspace and created a new ecore model.
> The same behaviour occurs there also.
>
> I do not know if this is helpful, but when getting the selection from
> the ProjectExplorer, the code
>
> Object o = currentSelection.getFirstElement();
> PlatformObject p = (PlatformObject)o;
> EObject e = (EObject)p.getAdapter(EObject.class);
>
> Gives a "proper" EObject for the first instance in the tree, and
> DynamicEObjects for the rest of them.
>
>
> Tor
Previous Topic:[CDO] Problem saving CDOResource after detach in state new
Next Topic:[CD] [Teneo] could not update query
Goto Forum:
  


Current Time: Tue Apr 23 12:52:24 GMT 2024

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

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

Back to the top