GMF common navigator Filter [message #236431] |
Sun, 19 July 2009 14:49 |
Bill Hinge Messages: 156 Registered: July 2009 |
Senior Member |
|
|
Hi
I'm trying to to create filters for my common navigator view but info
on how to add such filter seems a bit sparse.
My model file contains both a model node and a diagram node through
sharing a single file. I want to hide the diagram info. Also I'm using
uml2tools and I would like to hide certain nodes such as profile info.
Are there any examples to refer to?
(an effect similar to the java perspective which shows the contents of
a java class, and has filters which hide features such as @generated
etc)
regards
Steve
|
|
|
Re: GMF common navigator Filter [message #236520 is a reply to message #236431] |
Mon, 20 July 2009 13:24 |
Eclipse User |
|
|
|
Originally posted by: aurelien.pupier.esial.net
Bill Hinge a écrit :
> Hi
>
> I'm trying to to create filters for my common navigator view but info
> on how to add such filter seems a bit sparse.
>
> My model file contains both a model node and a diagram node through
> sharing a single file. I want to hide the diagram info. Also I'm using
> uml2tools and I would like to hide certain nodes such as profile info.
>
> Are there any examples to refer to?
>
> (an effect similar to the java perspective which shows the contents of
> a java class, and has filters which hide features such as @generated
> etc)
>
>
> regards
> Steve
Hi Steve,
you maybe can look at the extension point org.eclipse.ui.navigator.navigatorContent.
Never used but seems to be the right thing to do that.
Aurelien Pupier
|
|
|
|
Re: GMF common navigator Filter [message #236955 is a reply to message #236901] |
Mon, 20 July 2009 17:54 |
Bill Hinge Messages: 156 Registered: July 2009 |
Senior Member |
|
|
Bill Hinge wrote:
> Aurelien Pupier wrote:
>> Bill Hinge a écrit :
>>> Hi
>>>
>>> I'm trying to to create filters for my common navigator view but info
>>> on how to add such filter seems a bit sparse.
>>>
>>> My model file contains both a model node and a diagram node through
>>> sharing a single file. I want to hide the diagram info. Also I'm using
>>> uml2tools and I would like to hide certain nodes such as profile info.
>>>
>>> Are there any examples to refer to?
>>>
>>> (an effect similar to the java perspective which shows the contents of
>>> a java class, and has filters which hide features such as @generated
>>> etc)
>>>
>>>
>>> regards
>>> Steve
>>
>> Hi Steve,
>>
>> you maybe can look at the extension point
>> org.eclipse.ui.navigator.navigatorContent.
>> Never used but seems to be the right thing to do that.
>>
>> Aurelien Pupier
>
> Thanks Aurelien
>
> I've used CNF before inc navigatorContent, I've tried using the filter
> features before but never got them to work. Even the example from the
> example EMF-GMF editor doesn't appear to work. I get my model contents
> plus the diagram artefacts displayed in the navigator.
>
>
> I know filters do work since the java filter on project explorer works
> as I would want it to. Its just that I've never seen a working example
> with a GMF editor which is using *DomainNavigatorContentProvider to
> provide the input to cnf.
>
> Also the new CNF editor in Extensions is annoying, when you add new
> expressions via right click, the xml editor always has a warning saying
> illegal input so I'm never sure if its working
>
> regards
> Steve
I've got a bit closer I think but not sure what to put in filter
expression. Most of this was created by the extensions editor but
the filterExpression doesn't offer any clues. (I found the class Browse
button shows up many options so I just selected the one I created for my
projects)
<commonFilter
activeByDefault="true"
class="contract.presentation.SelectionTreeEditorPart"
description="Hide Diagram Nodes"
id="org.tmf.businessService.ui.hideDiagramFilter"
name="Diagram">
<filterExpression>
<and>
<instanceof
value="ngoss.diagram.diagram.providers.NgossViewProvider"/ >
<test
property="ngoss.diagram.navigator.NgossNavigatorItem.myGroupName "
value="Diagram"/>
</and>
</filterExpression>
The Diagram node and its children is what I'm trying to hide.
ngoss.diagram.diagram.providers.NgossViewProvider is a GMF generated
class and contract.presentation.SelectionTreeEditorPart is the Tree
editor from the EMF-GMF joining
If I can get this working then there are similar items I want to hide
from the uml2tools editor
Steve
|
|
|
Powered by
FUDForum. Page generated in 0.04128 seconds