Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator view contents...
Common Navigator view contents... [message #327896] Wed, 07 May 2008 17:50
Eclipse UserFriend
Originally posted by: sursubra.cisco.com

Hi
I am using common Navigator to create a view. In that view , I am trying
show my project type content in a dirfferent way than the prject shown in
the package explorer view. For instance my project type have 2 directories,
one for model files and for storing other files in the project. My models
are stored as files with certain extension. What i want to do is when i add
my project in common Navigator based view i don't want to show the actual
file as children of the model folder instead i want to show the model
elements directly.I am able see the model elements as children of model
folder. But it also shows the file. I guess this is because i am using
<contentExtension pattern="org.eclipse.ui.navigator.resourceContent"/>

if i remove the above contentExtension pattern the projects are not
appearing in the view. Is there a way to suppress only the model files
appearing as children to model folder. following is my plugin.xml fragment.
<extension

point="org.eclipse.ui.views">

<category

id="my.viewers.category"

name="My Viewers Category"/>

<view allowMultiple="false"

class="org.eclipse.ui.navigator.CommonNavigator"

id="my.model.explorer"

name="My Model Explorer"/>

</extension>

<!-- Declare the viewer configuration, and the default content/action
bindings -->

<extension

point="org.eclipse.ui.navigator.viewer">

<viewer viewerId="my.model.explorer">

<popupMenu

allowsPlatformContributions="true"

</viewer>

<viewerContentBinding viewerId="my.model.explorer">

<includes>

<contentExtension pattern="my.model.explorer.myContent"/>

<contentExtension pattern="org.eclipse.ui.navigator.resourceContent"/>

<contentExtension pattern="org.eclipse.ui.navigator.resources.filters.*"/>

</includes>

</viewerContentBinding>

</extension>

------------------------------------------------------------ --------------------------------

<extension point="org.eclipse.ui.navigator.navigatorContent">

<navigatorContent

activeByDefault="true"

contentProvider="my.model.MyTypeContentProvider"

id="my.model.explorer.myContent"

labelProvider="my.mode.MyTypeLabelProvider"

name="My Model Type Content"

priority="high">

<triggerPoints>

<or>

<adapt type="org.eclipse.core.resources.IProject" >

<test property="org.eclipse.core.resources.projectNature"

value="my.project.nature"/>

</adapt>

<instanceof value= "org.eclipse.core.resources.IResource" />

</or>

</triggerPoints>

<possibleChildren>

<or>

<instanceof value="org.eclipse.emf.ecore.EObject"/>

</or>

</possibleChildren>

</navigatorContent>

</extension>


Regards,
Suresh Subramanian
Previous Topic:bin directory stays empty
Next Topic:ProjectAnnotation not persisted?
Goto Forum:
  


Current Time: Sat Nov 09 04:21:42 GMT 2024

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

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

Back to the top