[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[News.eclipse.technology.gmf] "Help" - How to change the color of a shape dynamically
|
Hi ,
I have gone through the "Diagram Services Layer - How-to-guide"
for GMF and in that guide there are sample code related to
1.How to open multiple read-only views on a diagram.
2.How to change the color of a shape dynamically.
i have tried used the code and failed in that
Following are the steps which i have done
1.I have gone through the cheat sheet help and created the mind map gmf
example
2.I have created a mind map gmf diagram
3.I am able to drag and drop the palatte elements now i wanted to change
the
color of the shape.
4. Inside my "org.eclipse.gmf.examples.mindmap.diagram" plugin project i
have
updated plugin.xml with the following lines
<extension
id="TraceEditPolicyProvider"
name="TraceEditPolicyProvider"
point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
<editpolicyProvider
class="org.eclipse.gmf.examples.mindmap.diagram.edit.policies.TraceDiagramEditPolicyProvider">
<Priority
name="Low">
</Priority>
<object
class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"
id="TraceEditPart">
<method name="getViewer()">
<value
class="org.eclipse.gmf.examples.mindmap.diagram.edit.policies.TraceDiagramGraphicalViewer"/>
</method>
</object>
<context
editparts="TraceEditPart">
</context>
</editpolicyProvider>
</extension>
5.Inside the "org.eclipse.gmf.examples.mindmap.diagram" plugin project and
under the package "org.eclipse.gmf.examples.mindmap.diagram.edit.policies"
i have included the a class TraceDiagramEditPolicy which extends fronm
the GraphicalEditPolicy the code which i copied from the guide.
6.Now i tried to run mindmap sample and then noticed the color of shape is
not getting changed
Please let me know how to use the sample codes given in the help guide for
1.How to open multiple read-only views on a diagram.
2.How to change the color of a shape dynamically.
Regards
Senthil