Strange behavior of ProjectExplorer for .ecore files [message #424101] |
Thu, 16 October 2008 10:16  |
Eclipse User |
|
|
|
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 #424142 is a reply to message #424139] |
Fri, 17 October 2008 04:00  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03749 seconds