Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Customize a Tree Viewer
Customize a Tree Viewer [message #673414] Mon, 23 May 2011 14:58
nicolas h is currently offline nicolas h
Messages: 60
Registered: February 2011
Location: Grenoble, France
Member
Hi all,
I wish I created and customized a tree viewer for my diagram editor and I have some questions.

First of all, I follow some tutorials here or here ...

In these examples, The model's elements used are manually created. My model's elements come from ecore model.

In the both tutorial, there is a method to initialize the model (initializeParents and getInitialInput). I don't understand this step, and I don't see where the tree viewer is linked with the editor.

Next, When I generate the diagram plugin, if I check the ckeckbox RCP, I don't have the extension points "org.eclipse.ui.navigator.viewer", "org.eclipse.ui.navigator.navigatorContent" etc. So, when I deploy my RCP, I don't have project or model explorer anymore, I don't know why.

When I don't check the checkbox, I've the extension points defined, and the project Explorer display the model.

Do you suggest me looking this code and trying to customize it, or adding a new extension point org.eclipse.ui.view as described on the links above ?

I tried to create a new viewer extending ViewPart or CommonNavigator, but I didn't know how to populate my treeviewer.

Last questions. My model defines the elements xxxNode, yyyNode etc.

In order to see this elements in my tree, is the following nodes right ?
<triggerPoints>
 <or>
  <instanceof value="model.xxxNode"/>
  <instanceof value="model.yyyNode"/>
 </or>
</triggerPoints>
<possibleChildren>
 <or>
  <instanceof value="model.xxxNode"/>
  <instanceof value="model.yyyNode"/>
 </or>
</possibleChildren>


Classes ModelmmDomainNavigatorItem and ModelmmNavigatorItem are generated with the default navigator. Do they let us to automatically know what will be the element which will populate our tree viewer ?

Sorry for my english.

Good bye,

--
Nicolas
Previous Topic:sharing Editing Domain
Next Topic:Load serialized XMI file after change in graphical representation
Goto Forum:
  


Current Time: Sun Sep 21 22:26:36 GMT 2014

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

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