Home » Modeling » GMF (Graphical Modeling Framework) » NullPointerException for GraphicalEditPart.isSelectable
NullPointerException for GraphicalEditPart.isSelectable [message #182058] |
Thu, 10 April 2008 04:59  |
Eclipse User |
|
|
|
I am currently a newbie with GMF: I am working through the mindmap
tutorial, and the learn GMF in 15 minutes tutorial. (The 15 minutes
started three days ago, and I am approaching the 10 minute mark!). I am
generally very excited about the possibilities that GMF offers, and am
seriously considering using it as the primary graphical editor for a
commercial application.
I am at page two of the mindmap tutorial, having successfully had a
working diagram editor with simple topics linking to other topics. I have
got to the bit just before adding the link constraints. I have had
numerous issues to this point, but have managed to resolve them all.
Sadly when I run the diagram editor at the moment, I have a problem. When
I add a topic, link to other topics, everything is fine. When I add a
thread, the yellow sticky appears, but no matter what I do (for example
just clicking on the background, dragging a topic...) I get
java.lang.NullPointerException
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPa rt.isSelectable(GraphicalEditPart.java:1257)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEdit Part.isSelectable(CompartmentEditPart.java:58)
at
org.eclipse.gmf.runtime.diagram.ui.internal.tools.Rubberband SelectionTool.calculateNewSelection(RubberbandSelectionTool. java:116)
at
org.eclipse.gmf.runtime.diagram.ui.internal.tools.Rubberband SelectionTool.performMarqueeSelect(RubberbandSelectionTool.j ava:397)
at
org.eclipse.gmf.runtime.diagram.ui.internal.tools.Rubberband SelectionTool.handleButtonUp(RubberbandSelectionTool.java:33 1)
I suspect it is a modelling issue: I have tried hard to exactly follow the
instructions but somewhere I will have a broken link.
I would appreciate advice on both what the problem is, and also on how to
troubleshoot it. At the moment the only approach I can think of is to
download the source code and start debugging.
I attach my gmfgen file, which I beleive should contain enough information
to recreate the problem.
Thanks very much for the help
Phil RIce
<?xml version="1.0" encoding="UTF-8"?>
<gmfgen:GenEditorGenerator xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gmfgen="http://www.eclipse.org/gmf/2006/GenModel">
<diagram
visualID="79"
editPartClassName="MapEditPart"
itemSemanticEditPolicyClassName="MapItemSemanticEditPolicy"
notationViewFactoryClassName="MapViewFactory"
canonicalEditPolicyClassName="MapCanonicalEditPolicy"
iconProviderPriority="Low"
validationProviderPriority="Low">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Diagram "/>
<elementType
xsi:type="gmfgen:MetamodelType"
editHelperClassName="MapEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/ >
<domainDiagramElement
href="Mindmap.genmodel#//mindmap/Map"/>
<childNodes
visualID="2001"
editPartClassName="ThreadEditPart"
itemSemanticEditPolicyClassName="ThreadItemSemanticEditPolicy "
notationViewFactoryClassName="ThreadViewFactory"
canonicalEditPolicyClassName="ThreadCanonicalEditPolicy"
compartments="//@diagram/@compartments.1"
graphicalNodeEditPolicyClassName="ThreadGraphicalNodeEditPolicy "
createCommandClassName="ThreadCreateCommand"
containers="//@diagram/@compartments.0">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<elementType
xsi:type="gmfgen:MetamodelType"
editHelperClassName="ThreadEditHelper"/>
<viewmap
xsi:type="gmfgen:InnerClassViewmap"
layoutType="TOOLBAR_LAYOUT"
className="StickyNoteFigure"
classBody="
/**
 * @generated
 */
public class
StickyNoteFigure extends org.eclipse.draw2d.RectangleFigure
{


	/**
	 * @generated
	
*/
	private org.eclipse.draw2d.RectangleFigure
fFigureStickyNoteFigure; 
	/**
	 * @generated
	
*/
	private org.eclipse.draw2d.RectangleFigure fFigureThreadItems;



	/**
	 * @generated
	
*/
	public StickyNoteFigure()
{
		

	org.e clipse.draw2d.ToolbarLayout layoutThis
= new
org.eclipse.draw2d.ToolbarLayout();
	layoutT his.setStretchMinorAxis(true);
	layoutThis.s etMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENT ER
);

	layoutThis.setSpacin g(0);
	layoutThis.setVertical(true);
 ;
	this.setLayoutManager(layoutThis);&#x A;
			this.setBackgroundColo r(THIS_BACK
);
		createConte nts();
	}
	/**
& #x9;
* @generated
	 */
	private void
createContents(){


org.eclipse.gmf. runtime.draw2d.ui.figures.WrapLabel
stickyNoteNameFigure0 = new
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;stickyNoteNameFigure0.setText("<Sticky > ");

this.add(stickyNoteNameFigure0 );



fFigureThreadItems
= new
org.eclipse.draw2d.RectangleFigure();

this. add(fFigureThreadItems);

fFigureThreadItems .setLayoutManager(new
org.eclipse.draw2d.StackLayout());


 ;	}




& ;#x9;/**
	
* @generated
	 */
	private boolean myUseLocalCoordinates =
false;

	/**
	 * @generated
	
*/
	protected boolean useLocalCoordinates() {
		return
myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
@generated
	 */
	protected void
setUseLocalCoordinates(boolean useLocalCoordinates)
{
		myUseLocalCoordinates =
useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
@generated
	 */
	public org.eclipse.draw2d.RectangleFigure
getFigureStickyNoteFigure() {
		return
fFigureStickyNoteFigure;
	}
	 ;/**
	 *
@generated
	 */
	public org.eclipse.draw2d.RectangleFigure
getFigureThreadItems() {
		return
fFigureThreadItems;
	}

& ;#xA;}

/**
 *
@generated
 */
static final org.eclipse.swt.graphics.Color
THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250,
190);

">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedBackground="true"/>
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
</viewmap>
<modelFacet>
<metaClass
href="Mindmap.genmodel#//mindmap/Thread"/>
<containmentMetaFeature
href="Mindmap.genmodel#//mindmap/Topic/comments"/>
<childMetaFeature
href="Mindmap.genmodel#//mindmap/Topic/comments"/>
</modelFacet>
<labels
visualID="4002"
editPartClassName="ThreadSubjectEditPart"
itemSemanticEditPolicyClassName="ThreadSubjectItemSemanticEditPolicy "
notationViewFactoryClassName="ThreadSubjectViewFactory"
elementIcon="true">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<viewmap
xsi:type="gmfgen:ParentAssignedViewmap"
getterName="getFigureStickyNoteFigure"
figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure ">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedBackground="true"/>
</viewmap>
<modelFacet
xsi:type="gmfgen:FeatureLabelModelFacet"
editPattern="">
<metaFeatures
href="Mindmap.genmodel#//mindmap/Thread/subject"/>
</modelFacet>
</labels>
</childNodes>
<childNodes
visualID="2002"
editPartClassName="ThreadItemEditPart"
itemSemanticEditPolicyClassName="ThreadItemItemSemanticEditPolicy "
notationViewFactoryClassName="ThreadItemViewFactory"
canonicalEditPolicyClassName="ThreadItemCanonicalEditPolicy "
graphicalNodeEditPolicyClassName="ThreadItemGraphicalNodeEditPolicy "
createCommandClassName="ThreadItemCreateCommand"
containers="//@diagram/@compartments.1">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<elementType
xsi:type="gmfgen:MetamodelType"
editHelperClassName="ThreadItemEditHelper"/>
<viewmap
xsi:type="gmfgen:InnerClassViewmap"
layoutType="TOOLBAR_LAYOUT"
className="StickyNoteFigure"
classBody="
/**
 * @generated
 */
public class
StickyNoteFigure extends org.eclipse.draw2d.RectangleFigure
{


	/**
	 * @generated
	
*/
	private org.eclipse.draw2d.RectangleFigure
fFigureStickyNoteFigure; 
	/**
	 * @generated
	
*/
	private org.eclipse.draw2d.RectangleFigure fFigureThreadItems;



	/**
	 * @generated
	
*/
	public StickyNoteFigure()
{
		

	org.e clipse.draw2d.ToolbarLayout layoutThis
= new
org.eclipse.draw2d.ToolbarLayout();
	layoutT his.setStretchMinorAxis(true);
	layoutThis.s etMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENT ER
);

	layoutThis.setSpacin g(0);
	layoutThis.setVertical(true);
 ;
	this.setLayoutManager(layoutThis);&#x A;
			this.setBackgroundColo r(THIS_BACK
);
		createConte nts();
	}
	/**
& #x9;
* @generated
	 */
	private void
createContents(){


org.eclipse.gmf. runtime.draw2d.ui.figures.WrapLabel
stickyNoteNameFigure0 = new
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;stickyNoteNameFigure0.setText("<Sticky > ");

this.add(stickyNoteNameFigure0 );



fFigureThreadItems
= new
org.eclipse.draw2d.RectangleFigure();

this. add(fFigureThreadItems);

fFigureThreadItems .setLayoutManager(new
org.eclipse.draw2d.StackLayout());


 ;	}




& ;#x9;/**
	
* @generated
	 */
	private boolean myUseLocalCoordinates =
false;

	/**
	 * @generated
	
*/
	protected boolean useLocalCoordinates() {
		return
myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
@generated
	 */
	protected void
setUseLocalCoordinates(boolean useLocalCoordinates)
{
		myUseLocalCoordinates =
useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
@generated
	 */
	public org.eclipse.draw2d.RectangleFigure
getFigureStickyNoteFigure() {
		return
fFigureStickyNoteFigure;
	}
	 ;/**
	 *
@generated
	 */
	public org.eclipse.draw2d.RectangleFigure
getFigureThreadItems() {
		return
fFigureThreadItems;
	}

& ;#xA;}

/**
 *
@generated
 */
static final org.eclipse.swt.graphics.Color
THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250,
190);

">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedBackground="true"/>
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
</viewmap>
<modelFacet>
<metaClass
href="Mindmap.genmodel#//mindmap/ThreadItem"/>
<containmentMetaFeature
href="Mindmap.genmodel#//mindmap/Thread/items"/>
<childMetaFeature
href="Mindmap.genmodel#//mindmap/Thread/items"/>
</modelFacet>
<labels
visualID="4001"
editPartClassName="ThreadItemBodyEditPart"
itemSemanticEditPolicyClassName="ThreadItemBodyItemSemanticEditPolicy "
notationViewFactoryClassName="ThreadItemBodyViewFactory"
elementIcon="true">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<viewmap
xsi:type="gmfgen:ParentAssignedViewmap"
getterName="getFigureStickyNoteFigure"
figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure ">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedBackground="true"/>
</viewmap>
<modelFacet
xsi:type="gmfgen:FeatureLabelModelFacet">
<metaFeatures
href="Mindmap.genmodel#//mindmap/ThreadItem/body"/>
</modelFacet>
</labels>
</childNodes>
<topLevelNodes
visualID="1001"
editPartClassName="TopicEditPart"
itemSemanticEditPolicyClassName="TopicItemSemanticEditPolicy "
notationViewFactoryClassName="TopicViewFactory"
canonicalEditPolicyClassName="TopicCanonicalEditPolicy"
compartments="//@diagram/@compartments.0"
graphicalNodeEditPolicyClassName="TopicGraphicalNodeEditPolicy "
createCommandClassName="TopicCreateCommand">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<elementType
xsi:type="gmfgen:MetamodelType"
editHelperClassName="TopicEditHelper"/>
<viewmap
xsi:type="gmfgen:InnerClassViewmap"
className="RoundedTopicFigure"
classBody="
/**
 * @generated
 */
public class
RoundedTopicFigure extends org.eclipse.draw2d.RoundedRectangle
{


	/**
	 * @generated
	
*/
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
fFigureTopicNameFigure; 


	/**
	 *
@generated
	 */
	public RoundedTopicFigure()
{
				this.setCorner Dimensions(new
org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12 )
,
getMapMode().DPtoLP(12)
));
	this.se tForegroundColor(THIS_FORE
);
	& #x9;createContents();
	}
	/* *
	
* @generated
	 */
	private void
createContents(){


fFigureTopicName Figure = new
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;fFigureTopicNameFigure.setText("");& ;#xA;
this.add(fFigureTopicNameFigure);
& ;#xA;
	}



 
	/**
	
* @generated
	 */
	private boolean myUseLocalCoordinates =
false;

	/**
	 * @generated
	
*/
	protected boolean useLocalCoordinates() {
		return
myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
@generated
	 */
	protected void
setUseLocalCoordinates(boolean useLocalCoordinates)
{
		myUseLocalCoordinates =
useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
@generated
	 */
	public
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
getFigureTopicNameFigure() {
		return
fFigureTopicNameFigure;
	}

 
}

/**
 *
@generated
 */
static final org.eclipse.swt.graphics.Color
THIS_FORE = new org.eclipse.swt.graphics.Color(null, 220, 220,
250);

">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedForeground="true"/>
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
</viewmap>
<modelFacet>
<metaClass
href="Mindmap.genmodel#//mindmap/Topic"/>
<containmentMetaFeature
href="Mindmap.genmodel#//mindmap/Map/rootTopics"/>
<childMetaFeature
href="Mindmap.genmodel#//mindmap/Map/rootTopics"/>
</modelFacet>
<labels
visualID="4003"
editPartClassName="TopicNameEditPart"
itemSemanticEditPolicyClassName="TopicNameItemSemanticEditPolicy "
notationViewFactoryClassName="TopicNameViewFactory"
elementIcon="true">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<viewmap
xsi:type="gmfgen:ParentAssignedViewmap"
getterName="getFigureTopicNameFigure"
figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel "/>
<modelFacet
xsi:type="gmfgen:FeatureLabelModelFacet">
<metaFeatures
href="Mindmap.genmodel#//mindmap/Topic/name"/>
</modelFacet>
</labels>
</topLevelNodes>
<links
visualID="3001"
editPartClassName="TopicSubtopicsEditPart"
itemSemanticEditPolicyClassName="TopicSubtopicsItemSemanticEditPolicy "
notationViewFactoryClassName="TopicSubtopicsViewFactory"
createCommandClassName="TopicSubtopicsCreateCommand"
reorientCommandClassName="TopicSubtopicsReorientCommand">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Edge "/>
<elementType
xsi:type="gmfgen:SpecializationType"/>
<viewmap
xsi:type="gmfgen:InnerClassViewmap"
className="TopicSubtopicsFigure"
classBody="
/**
 * @generated
 */
public class
TopicSubtopicsFigure extends
org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnection Ex
{




	/**&a mp;#xA;	 * @generated
	
*/
	public TopicSubtopicsFigure()
{
		
		setTa rgetDecoration(createTargetDecoration());
	} 

	/**
	
* @generated
	 */
	private
org.eclipse.draw2d.RotatableDecoration createTargetDecoration()
{
		org.eclipse.draw2d.PolylineDecor ation df = new
org.eclipse.draw2d.PolylineDecoration();
	&a mp;#x9;return
df;
	}



&a mp;#xA;}

 ">
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
</viewmap>
<modelFacet
xsi:type="gmfgen:FeatureLinkModelFacet">
<metaFeature
href="Mindmap.genmodel#//mindmap/Topic/subtopics"/>
</modelFacet>
</links>
<compartments
visualID="5001"
editPartClassName="TopicThreadCompartmentEditPart"
itemSemanticEditPolicyClassName="TopicThreadCompartmentItemSemanticEditPolicy "
notationViewFactoryClassName="TopicThreadCompartmentViewFactory "
canonicalEditPolicyClassName="TopicThreadCompartmentCanonicalEditPolicy "
childNodes="//@diagram/@childNodes.0"
title="Thread Compartment"
needsTitle="false"
node="//@diagram/@topLevelNodes.0"
listLayout="false">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<viewmap
xsi:type="gmfgen:InnerClassViewmap"
className="RoundedTopicFigure"
classBody="
/**
 * @generated
 */
public class
RoundedTopicFigure extends org.eclipse.draw2d.RoundedRectangle
{


	/**
	 * @generated
	
*/
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
fFigureTopicNameFigure; 


	/**
	 *
@generated
	 */
	public RoundedTopicFigure()
{
				this.setCorner Dimensions(new
org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12 )
,
getMapMode().DPtoLP(12)
));
	this.se tForegroundColor(THIS_FORE
);
	& #x9;createContents();
	}
	/* *
	
* @generated
	 */
	private void
createContents(){


fFigureTopicName Figure = new
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;fFigureTopicNameFigure.setText("");& ;#xA;
this.add(fFigureTopicNameFigure);
& ;#xA;
	}



 
	/**
	
* @generated
	 */
	private boolean myUseLocalCoordinates =
false;

	/**
	 * @generated
	
*/
	protected boolean useLocalCoordinates() {
		return
myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
@generated
	 */
	protected void
setUseLocalCoordinates(boolean useLocalCoordinates)
{
		myUseLocalCoordinates =
useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
@generated
	 */
	public
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
getFigureTopicNameFigure() {
		return
fFigureTopicNameFigure;
	}

 
}

/**
 *
@generated
 */
static final org.eclipse.swt.graphics.Color
THIS_FORE = new org.eclipse.swt.graphics.Color(null, 220, 220,
250);

">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedForeground="true"/>
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
</viewmap>
</compartments>
<compartments
visualID="5002"
editPartClassName="ThreadThreadItemCompartmentEditPart"
itemSemanticEditPolicyClassName="ThreadThreadItemCompartmentItemSemanticEditPolicy "
notationViewFactoryClassName="ThreadThreadItemCompartmentViewFactory "
canonicalEditPolicyClassName="ThreadThreadItemCompartmentCanonicalEditPolicy "
childNodes="//@diagram/@childNodes.1"
title="ThreadItemCompartment"
canCollapse="false"
needsTitle="false"
node="//@diagram/@childNodes.0">
<diagramRunTimeClass
href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel#//notation/Node "/>
<viewmap
xsi:type="gmfgen:InnerClassViewmap"
className="StickyNoteFigure"
classBody="
/**
 * @generated
 */
public class
StickyNoteFigure extends org.eclipse.draw2d.RectangleFigure
{


	/**
	 * @generated
	
*/
	private org.eclipse.draw2d.RectangleFigure
fFigureStickyNoteFigure; 
	/**
	 * @generated
	
*/
	private org.eclipse.draw2d.RectangleFigure fFigureThreadItems;



	/**
	 * @generated
	
*/
	public StickyNoteFigure()
{
		

	org.e clipse.draw2d.ToolbarLayout layoutThis
= new
org.eclipse.draw2d.ToolbarLayout();
	layoutT his.setStretchMinorAxis(true);
	layoutThis.s etMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENT ER
);

	layoutThis.setSpacin g(0);
	layoutThis.setVertical(true);
 ;
	this.setLayoutManager(layoutThis);&#x A;
			this.setBackgroundColo r(THIS_BACK
);
		createConte nts();
	}
	/**
& #x9;
* @generated
	 */
	private void
createContents(){


org.eclipse.gmf. runtime.draw2d.ui.figures.WrapLabel
stickyNoteNameFigure0 = new
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;stickyNoteNameFigure0.setText("<Sticky > ");

this.add(stickyNoteNameFigure0 );



fFigureThreadItems
= new
org.eclipse.draw2d.RectangleFigure();

this. add(fFigureThreadItems);

fFigureThreadItems .setLayoutManager(new
org.eclipse.draw2d.StackLayout());


 ;	}




& ;#x9;/**
	
* @generated
	 */
	private boolean myUseLocalCoordinates =
false;

	/**
	 * @generated
	
*/
	protected boolean useLocalCoordinates() {
		return
myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
@generated
	 */
	protected void
setUseLocalCoordinates(boolean useLocalCoordinates)
{
		myUseLocalCoordinates =
useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
@generated
	 */
	public org.eclipse.draw2d.RectangleFigure
getFigureStickyNoteFigure() {
		return
fFigureStickyNoteFigure;
	}
	 ;/**
	 *
@generated
	 */
	public org.eclipse.draw2d.RectangleFigure
getFigureThreadItems() {
		return
fFigureThreadItems;
	}

& ;#xA;}

/**
 *
@generated
 */
static final org.eclipse.swt.graphics.Color
THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250,
190);

">
<attributes
xsi:type="gmfgen:StyleAttributes"
fixedBackground="true"/>
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
</viewmap>
</compartments>
<palette>
<groups
title="mindmap">
<entries
xsi:type="gmfgen:ToolEntry"
title="Map"
description="Create new Map"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Relationship tool"
description="Create new Relationship"
genLinks="//@diagram/@links.0"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Topic tool"
description="Create new Topic"
genNodes="//@diagram/@topLevelNodes.0"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Thread"
description="Create new Topic"
genNodes="//@diagram/@childNodes.0"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Thread Item"
description="Create new Topic"
genNodes="//@diagram/@childNodes.1"/>
</groups>
</palette>
<preferencePages
xsi:type="gmfgen:GenStandardPreferencePage"
iD="com.erudine.newGmf.diagram.general"
name="Mindmap Diagram">
<children
xsi:type="gmfgen:GenStandardPreferencePage"
iD="com.erudine.newGmf.diagram.appearance"
name="Appearance"
kind="Appearance"/>
<children
xsi:type="gmfgen:GenStandardPreferencePage"
iD="com.erudine.newGmf.diagram.connections"
name="Connections"
kind="Connections"/>
<children
xsi:type="gmfgen:GenStandardPreferencePage"
iD="com.erudine.newGmf.diagram.printing"
name="Printing"
kind="Printing"/>
<children
xsi:type="gmfgen:GenStandardPreferencePage"
iD="com.erudine.newGmf.diagram.rulersAndGrid"
name="Rulers And Grid"
kind="RulersAndGrid"/>
<children
xsi:type="gmfgen:GenStandardPreferencePage"
iD="com.erudine.newGmf.diagram.pathmaps"
name="Pathmaps"
kind="Pathmaps"/>
</preferencePages>
</diagram>
<plugin/>
<editor/>
<navigator>
<childReferences
child="//@diagram"/>
<childReferences
parent="//@diagram/@childNodes.0"
child="//@diagram/@childNodes.1"/>
<childReferences
parent="//@diagram/@topLevelNodes.0"
child="//@diagram/@childNodes.0"/>
<childReferences
parent="//@diagram"
child="//@diagram/@topLevelNodes.0"/>
<childReferences
parent="//@diagram"
child="//@diagram/@links.0"
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
<childReferences
parent="//@diagram/@links.0"
child="//@diagram/@topLevelNodes.0"
referenceType="out_target"
groupName="target"
groupIcon="icons/linkTargetNavigatorGroup.gif"/>
<childReferences
parent="//@diagram/@topLevelNodes.0"
child="//@diagram/@links.0"
referenceType="in_source"
groupName="incoming links"
groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
<childReferences
parent="//@diagram/@links.0"
child="//@diagram/@topLevelNodes.0"
referenceType="in_source"
groupName="source"
groupIcon="icons/linkSourceNavigatorGroup.gif"/>
<childReferences
parent="//@diagram/@topLevelNodes.0"
child="//@diagram/@links.0"
referenceType="out_target"
groupName="outgoing links"
groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
</navigator>
<diagramUpdater/>
<propertySheet>
<tabs
xsi:type="gmfgen:GenStandardPropertyTab"
iD="appearance"/>
<tabs
xsi:type="gmfgen:GenStandardPropertyTab"
iD="diagram"/>
<tabs
xsi:type="gmfgen:GenCustomPropertyTab"
iD="domain"
label="Core">
<filter
xsi:type="gmfgen:TypeTabFilter">
<types>org.eclipse.gmf.runtime.notation.View</types>
<types>org.eclipse.gef.EditPart</types>
<generatedTypes>abstractNavigatorItem</generatedTypes>
</filter>
</tabs>
</propertySheet>
<domainGenModel
href="Mindmap.genmodel#/"/>
</gmfgen:GenEditorGenerator>
|
|
|
Re: NullPointerException for GraphicalEditPart.isSelectable [message #182134 is a reply to message #182058] |
Thu, 10 April 2008 07:43  |
Eclipse User |
|
|
|
Have you compared your solution against the one provided in CVS?
- Rich
On 4/10/08 4:59 AM, in article
cfc15ec353dd976140bfd51319012045$1@www.eclipse.org, "Phil Rice"
<phil.rice@erudine.com> wrote:
> I am currently a newbie with GMF: I am working through the mindmap
> tutorial, and the learn GMF in 15 minutes tutorial. (The 15 minutes
> started three days ago, and I am approaching the 10 minute mark!). I am
> generally very excited about the possibilities that GMF offers, and am
> seriously considering using it as the primary graphical editor for a
> commercial application.
>
> I am at page two of the mindmap tutorial, having successfully had a
> working diagram editor with simple topics linking to other topics. I have
> got to the bit just before adding the link constraints. I have had
> numerous issues to this point, but have managed to resolve them all.
>
> Sadly when I run the diagram editor at the moment, I have a problem. When
> I add a topic, link to other topics, everything is fine. When I add a
> thread, the yellow sticky appears, but no matter what I do (for example
> just clicking on the background, dragging a topic...) I get
> java.lang.NullPointerException
> at
> org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPa rt.isSelectable(Gr
> aphicalEditPart.java:1257)
> at
> org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEdit Part.isSelectable(
> CompartmentEditPart.java:58)
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.tools.Rubberband SelectionTool.calc
> ulateNewSelection(RubberbandSelectionTool.java:116)
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.tools.Rubberband SelectionTool.perf
> ormMarqueeSelect(RubberbandSelectionTool.java:397)
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.tools.Rubberband SelectionTool.hand
> leButtonUp(RubberbandSelectionTool.java:331)
>
> I suspect it is a modelling issue: I have tried hard to exactly follow the
> instructions but somewhere I will have a broken link.
>
> I would appreciate advice on both what the problem is, and also on how to
> troubleshoot it. At the moment the only approach I can think of is to
> download the source code and start debugging.
>
> I attach my gmfgen file, which I beleive should contain enough information
> to recreate the problem.
>
> Thanks very much for the help
>
> Phil RIce
>
> <?xml version="1.0" encoding="UTF-8"?>
> <gmfgen:GenEditorGenerator xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:gmfgen="http://www.eclipse.org/gmf/2006/GenModel">
> <diagram
> visualID="79"
> editPartClassName="MapEditPart"
> itemSemanticEditPolicyClassName="MapItemSemanticEditPolicy"
> notationViewFactoryClassName="MapViewFactory"
> canonicalEditPolicyClassName="MapCanonicalEditPolicy"
> iconProviderPriority="Low"
> validationProviderPriority="Low">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Diagram"/>
> <elementType
> xsi:type="gmfgen:MetamodelType"
> editHelperClassName="MapEditHelper"/>
> <viewmap
> xsi:type="gmfgen:FigureViewmap"
> figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/ >
> <domainDiagramElement
> href="Mindmap.genmodel#//mindmap/Map"/>
> <childNodes
> visualID="2001"
> editPartClassName="ThreadEditPart"
> itemSemanticEditPolicyClassName="ThreadItemSemanticEditPolicy "
> notationViewFactoryClassName="ThreadViewFactory"
> canonicalEditPolicyClassName="ThreadCanonicalEditPolicy"
> compartments="//@diagram/@compartments.1"
> graphicalNodeEditPolicyClassName="ThreadGraphicalNodeEditPolicy "
> createCommandClassName="ThreadCreateCommand"
> containers="//@diagram/@compartments.0">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <elementType
> xsi:type="gmfgen:MetamodelType"
> editHelperClassName="ThreadEditHelper"/>
> <viewmap
> xsi:type="gmfgen:InnerClassViewmap"
> layoutType="TOOLBAR_LAYOUT"
> className="StickyNoteFigure"
> classBody="
/**
 * @generated
 */
public class
> StickyNoteFigure extends org.eclipse.draw2d.RectangleFigure
> {


	/**
	 * @generated
	
> */
	private org.eclipse.draw2d.RectangleFigure
> fFigureStickyNoteFigure; 
	/**
	 * @generated
	
> */
	private org.eclipse.draw2d.RectangleFigure fFigureThreadItems;
> 


	/**
	 * @generated
	
> */
	public StickyNoteFigure()
> {
		

	org.e clipse.draw2d.ToolbarLayout layoutThis
> = new
> org.eclipse.draw2d.ToolbarLayout();
	layoutT his.setStretchMinorAxis(tr
> ue);
	layoutThis.setMinorAlignment(org.eclip se.draw2d.ToolbarLayout.AL
> IGN_CENTER
);

	layoutThis.s etSpacing(0);
	layoutThis.
> setVertical(true);

	this.setLayoutM anager(layoutThis);

&
> #x9;		this.setBackgroundColor(THIS_BACK& #xA;);
		createCon
> tents();
	}
	/**
&am p;#x9;
> * @generated
	 */
	private void
> createContents(){


org.eclipse.gmf. runtime.draw2d.ui.figures.Wrap
> Label
> stickyNoteNameFigure0 = new
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;stickyNoteNameFigur
> e0.setText("<Sticky> ");

this.add(stickyNoteNameFigure0 );
> 



fFigureThreadItems
> = new
> org.eclipse.draw2d.RectangleFigure();

this. add(fFigureThreadItems);&#
> xA;
fFigureThreadItems.setLayoutManager(new
> org.eclipse.draw2d.StackLayout());


 ;	}



&#x
> A;	/**
	
> * @generated
	 */
	private boolean myUseLocalCoordinates =
> false;

	/**
	 * @generated
	
> */
	protected boolean useLocalCoordinates() {
		return
> myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
> @generated
	 */
	protected void
> setUseLocalCoordinates(boolean useLocalCoordinates)
> {
		myUseLocalCoordinates =
> useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
> @generated
	 */
	public org.eclipse.draw2d.RectangleFigure
> getFigureStickyNoteFigure() {
		return
> fFigureStickyNoteFigure;
	}
	 ;/**
	 *
> @generated
	 */
	public org.eclipse.draw2d.RectangleFigure
> getFigureThreadItems() {
		return
> fFigureThreadItems;
	}

& ;#xA;}

/**
 *
> @generated
 */
static final org.eclipse.swt.graphics.Color
> THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250,
> 190);

">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedBackground="true"/>
> <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
>
> <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
> </viewmap>
> <modelFacet>
> <metaClass
> href="Mindmap.genmodel#//mindmap/Thread"/>
> <containmentMetaFeature
> href="Mindmap.genmodel#//mindmap/Topic/comments"/>
> <childMetaFeature
> href="Mindmap.genmodel#//mindmap/Topic/comments"/>
> </modelFacet>
> <labels
> visualID="4002"
> editPartClassName="ThreadSubjectEditPart"
>
> itemSemanticEditPolicyClassName="ThreadSubjectItemSemanticEditPolicy "
> notationViewFactoryClassName="ThreadSubjectViewFactory"
> elementIcon="true">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <viewmap
> xsi:type="gmfgen:ParentAssignedViewmap"
> getterName="getFigureStickyNoteFigure"
> figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure ">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedBackground="true"/>
> </viewmap>
> <modelFacet
> xsi:type="gmfgen:FeatureLabelModelFacet"
> editPattern="">
> <metaFeatures
> href="Mindmap.genmodel#//mindmap/Thread/subject"/>
> </modelFacet>
> </labels>
> </childNodes>
> <childNodes
> visualID="2002"
> editPartClassName="ThreadItemEditPart"
> itemSemanticEditPolicyClassName="ThreadItemItemSemanticEditPolicy "
> notationViewFactoryClassName="ThreadItemViewFactory"
> canonicalEditPolicyClassName="ThreadItemCanonicalEditPolicy "
>
> graphicalNodeEditPolicyClassName="ThreadItemGraphicalNodeEditPolicy "
> createCommandClassName="ThreadItemCreateCommand"
> containers="//@diagram/@compartments.1">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <elementType
> xsi:type="gmfgen:MetamodelType"
> editHelperClassName="ThreadItemEditHelper"/>
> <viewmap
> xsi:type="gmfgen:InnerClassViewmap"
> layoutType="TOOLBAR_LAYOUT"
> className="StickyNoteFigure"
> classBody="
/**
 * @generated
 */
public class
> StickyNoteFigure extends org.eclipse.draw2d.RectangleFigure
> {


	/**
	 * @generated
	
> */
	private org.eclipse.draw2d.RectangleFigure
> fFigureStickyNoteFigure; 
	/**
	 * @generated
	
> */
	private org.eclipse.draw2d.RectangleFigure fFigureThreadItems;
> 


	/**
	 * @generated
	
> */
	public StickyNoteFigure()
> {
		

	org.e clipse.draw2d.ToolbarLayout layoutThis
> = new
> org.eclipse.draw2d.ToolbarLayout();
	layoutT his.setStretchMinorAxis(tr
> ue);
	layoutThis.setMinorAlignment(org.eclip se.draw2d.ToolbarLayout.AL
> IGN_CENTER
);

	layoutThis.s etSpacing(0);
	layoutThis.
> setVertical(true);

	this.setLayoutM anager(layoutThis);

&
> #x9;		this.setBackgroundColor(THIS_BACK& #xA;);
		createCon
> tents();
	}
	/**
&am p;#x9;
> * @generated
	 */
	private void
> createContents(){


org.eclipse.gmf. runtime.draw2d.ui.figures.Wrap
> Label
> stickyNoteNameFigure0 = new
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;stickyNoteNameFigur
> e0.setText("<Sticky> ");

this.add(stickyNoteNameFigure0 );
> 



fFigureThreadItems
> = new
> org.eclipse.draw2d.RectangleFigure();

this. add(fFigureThreadItems);&#
> xA;
fFigureThreadItems.setLayoutManager(new
> org.eclipse.draw2d.StackLayout());


 ;	}



&#x
> A;	/**
	
> * @generated
	 */
	private boolean myUseLocalCoordinates =
> false;

	/**
	 * @generated
	
> */
	protected boolean useLocalCoordinates() {
		return
> myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
> @generated
	 */
	protected void
> setUseLocalCoordinates(boolean useLocalCoordinates)
> {
		myUseLocalCoordinates =
> useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
> @generated
	 */
	public org.eclipse.draw2d.RectangleFigure
> getFigureStickyNoteFigure() {
		return
> fFigureStickyNoteFigure;
	}
	 ;/**
	 *
> @generated
	 */
	public org.eclipse.draw2d.RectangleFigure
> getFigureThreadItems() {
		return
> fFigureThreadItems;
	}

& ;#xA;}

/**
 *
> @generated
 */
static final org.eclipse.swt.graphics.Color
> THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250,
> 190);

">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedBackground="true"/>
> <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
>
> <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
> </viewmap>
> <modelFacet>
> <metaClass
> href="Mindmap.genmodel#//mindmap/ThreadItem"/>
> <containmentMetaFeature
> href="Mindmap.genmodel#//mindmap/Thread/items"/>
> <childMetaFeature
> href="Mindmap.genmodel#//mindmap/Thread/items"/>
> </modelFacet>
> <labels
> visualID="4001"
> editPartClassName="ThreadItemBodyEditPart"
>
> itemSemanticEditPolicyClassName="ThreadItemBodyItemSemanticEditPolicy "
> notationViewFactoryClassName="ThreadItemBodyViewFactory"
> elementIcon="true">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <viewmap
> xsi:type="gmfgen:ParentAssignedViewmap"
> getterName="getFigureStickyNoteFigure"
> figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure ">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedBackground="true"/>
> </viewmap>
> <modelFacet
> xsi:type="gmfgen:FeatureLabelModelFacet">
> <metaFeatures
> href="Mindmap.genmodel#//mindmap/ThreadItem/body"/>
> </modelFacet>
> </labels>
> </childNodes>
> <topLevelNodes
> visualID="1001"
> editPartClassName="TopicEditPart"
> itemSemanticEditPolicyClassName="TopicItemSemanticEditPolicy "
> notationViewFactoryClassName="TopicViewFactory"
> canonicalEditPolicyClassName="TopicCanonicalEditPolicy"
> compartments="//@diagram/@compartments.0"
> graphicalNodeEditPolicyClassName="TopicGraphicalNodeEditPolicy "
> createCommandClassName="TopicCreateCommand">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <elementType
> xsi:type="gmfgen:MetamodelType"
> editHelperClassName="TopicEditHelper"/>
> <viewmap
> xsi:type="gmfgen:InnerClassViewmap"
> className="RoundedTopicFigure"
> classBody="
/**
 * @generated
 */
public class
> RoundedTopicFigure extends org.eclipse.draw2d.RoundedRectangle
> {


	/**
	 * @generated
	
> */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
> fFigureTopicNameFigure; 


	/**
	 *
> @generated
	 */
	public RoundedTopicFigure()
> {
				this.setCorner Dimensions(new
> org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12 )
,
> getMapMode().DPtoLP(12)
));
	this.se tForegroundColor(THIS_FORE

> ;);
		createContents();
& ;#x9;}
	/**
	
> * @generated
	 */
	private void
> createContents(){


fFigureTopicName Figure = new
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;fFigureTopicNameFig
> ure.setText("");

this.add (fFigureTopicNameFigure);


> ;
	}



& ;#xA;	/**
	
> * @generated
	 */
	private boolean myUseLocalCoordinates =
> false;

	/**
	 * @generated
	
> */
	protected boolean useLocalCoordinates() {
		return
> myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
> @generated
	 */
	protected void
> setUseLocalCoordinates(boolean useLocalCoordinates)
> {
		myUseLocalCoordinates =
> useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
> @generated
	 */
	public
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
> getFigureTopicNameFigure() {
		return
> fFigureTopicNameFigure;
	}

 
}

/**
 *
> @generated
 */
static final org.eclipse.swt.graphics.Color
> THIS_FORE = new org.eclipse.swt.graphics.Color(null, 220, 220,
> 250);

">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedForeground="true"/>
> <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
>
> <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
> </viewmap>
> <modelFacet>
> <metaClass
> href="Mindmap.genmodel#//mindmap/Topic"/>
> <containmentMetaFeature
> href="Mindmap.genmodel#//mindmap/Map/rootTopics"/>
> <childMetaFeature
> href="Mindmap.genmodel#//mindmap/Map/rootTopics"/>
> </modelFacet>
> <labels
> visualID="4003"
> editPartClassName="TopicNameEditPart"
> itemSemanticEditPolicyClassName="TopicNameItemSemanticEditPolicy "
> notationViewFactoryClassName="TopicNameViewFactory"
> elementIcon="true">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <viewmap
> xsi:type="gmfgen:ParentAssignedViewmap"
> getterName="getFigureTopicNameFigure"
>
> figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel "
> />
> <modelFacet
> xsi:type="gmfgen:FeatureLabelModelFacet">
> <metaFeatures
> href="Mindmap.genmodel#//mindmap/Topic/name"/>
> </modelFacet>
> </labels>
> </topLevelNodes>
> <links
> visualID="3001"
> editPartClassName="TopicSubtopicsEditPart"
>
> itemSemanticEditPolicyClassName="TopicSubtopicsItemSemanticEditPolicy "
> notationViewFactoryClassName="TopicSubtopicsViewFactory"
> createCommandClassName="TopicSubtopicsCreateCommand"
> reorientCommandClassName="TopicSubtopicsReorientCommand">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Edge"/>
> <elementType
> xsi:type="gmfgen:SpecializationType"/>
> <viewmap
> xsi:type="gmfgen:InnerClassViewmap"
> className="TopicSubtopicsFigure"
> classBody="
/**
 * @generated
 */
public class
> TopicSubtopicsFigure extends
> org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnection Ex
> {




	/**&a mp;#xA;	 * @generated
	
> */
	public TopicSubtopicsFigure()
> {
		
		setTa rgetDecoration(createTargetDecoration());&
> #xA;	}

	/**
&#x 9;
> * @generated
	 */
	private
> org.eclipse.draw2d.RotatableDecoration createTargetDecoration()
> {
		org.eclipse.draw2d.PolylineDecor ation df = new
> org.eclipse.draw2d.PolylineDecoration();
	&a mp;#x9;return
> df;
	}



&a mp;#xA;}

 ">
> <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
>
> <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
> </viewmap>
> <modelFacet
> xsi:type="gmfgen:FeatureLinkModelFacet">
> <metaFeature
> href="Mindmap.genmodel#//mindmap/Topic/subtopics"/>
> </modelFacet>
> </links>
> <compartments
> visualID="5001"
> editPartClassName="TopicThreadCompartmentEditPart"
>
> itemSemanticEditPolicyClassName="TopicThreadCompartmentItemSemanticEditPolicy "
> notationViewFactoryClassName="TopicThreadCompartmentViewFactory "
>
> canonicalEditPolicyClassName="TopicThreadCompartmentCanonicalEditPolicy "
> childNodes="//@diagram/@childNodes.0"
> title="Thread Compartment"
> needsTitle="false"
> node="//@diagram/@topLevelNodes.0"
> listLayout="false">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <viewmap
> xsi:type="gmfgen:InnerClassViewmap"
> className="RoundedTopicFigure"
> classBody="
/**
 * @generated
 */
public class
> RoundedTopicFigure extends org.eclipse.draw2d.RoundedRectangle
> {


	/**
	 * @generated
	
> */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
> fFigureTopicNameFigure; 


	/**
	 *
> @generated
	 */
	public RoundedTopicFigure()
> {
				this.setCorner Dimensions(new
> org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12 )
,
> getMapMode().DPtoLP(12)
));
	this.se tForegroundColor(THIS_FORE

> ;);
		createContents();
& ;#x9;}
	/**
	
> * @generated
	 */
	private void
> createContents(){


fFigureTopicName Figure = new
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;fFigureTopicNameFig
> ure.setText("");

this.add (fFigureTopicNameFigure);


> ;
	}



& ;#xA;	/**
	
> * @generated
	 */
	private boolean myUseLocalCoordinates =
> false;

	/**
	 * @generated
	
> */
	protected boolean useLocalCoordinates() {
		return
> myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
> @generated
	 */
	protected void
> setUseLocalCoordinates(boolean useLocalCoordinates)
> {
		myUseLocalCoordinates =
> useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
> @generated
	 */
	public
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
> getFigureTopicNameFigure() {
		return
> fFigureTopicNameFigure;
	}

 
}

/**
 *
> @generated
 */
static final org.eclipse.swt.graphics.Color
> THIS_FORE = new org.eclipse.swt.graphics.Color(null, 220, 220,
> 250);

">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedForeground="true"/>
> <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
>
> <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
> </viewmap>
> </compartments>
> <compartments
> visualID="5002"
> editPartClassName="ThreadThreadItemCompartmentEditPart"
>
> itemSemanticEditPolicyClassName="ThreadThreadItemCompartmentItemSemanticEditPo
> licy"
>
> notationViewFactoryClassName="ThreadThreadItemCompartmentViewFactory "
>
> canonicalEditPolicyClassName="ThreadThreadItemCompartmentCanonicalEditPolicy "
> childNodes="//@diagram/@childNodes.1"
> title="ThreadItemCompartment"
> canCollapse="false"
> needsTitle="false"
> node="//@diagram/@childNodes.0">
> <diagramRunTimeClass
>
> href=" ../../../plugin/org.eclipse.gmf.runtime.notation/model/notat ion.genmodel
> #//notation/Node"/>
> <viewmap
> xsi:type="gmfgen:InnerClassViewmap"
> className="StickyNoteFigure"
> classBody="
/**
 * @generated
 */
public class
> StickyNoteFigure extends org.eclipse.draw2d.RectangleFigure
> {


	/**
	 * @generated
	
> */
	private org.eclipse.draw2d.RectangleFigure
> fFigureStickyNoteFigure; 
	/**
	 * @generated
	
> */
	private org.eclipse.draw2d.RectangleFigure fFigureThreadItems;
> 


	/**
	 * @generated
	
> */
	public StickyNoteFigure()
> {
		

	org.e clipse.draw2d.ToolbarLayout layoutThis
> = new
> org.eclipse.draw2d.ToolbarLayout();
	layoutT his.setStretchMinorAxis(tr
> ue);
	layoutThis.setMinorAlignment(org.eclip se.draw2d.ToolbarLayout.AL
> IGN_CENTER
);

	layoutThis.s etSpacing(0);
	layoutThis.
> setVertical(true);

	this.setLayoutM anager(layoutThis);

&
> #x9;		this.setBackgroundColor(THIS_BACK& #xA;);
		createCon
> tents();
	}
	/**
&am p;#x9;
> * @generated
	 */
	private void
> createContents(){


org.eclipse.gmf. runtime.draw2d.ui.figures.Wrap
> Label
> stickyNoteNameFigure0 = new
> org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&# xA;stickyNoteNameFigur
> e0.setText("<Sticky> ");

this.add(stickyNoteNameFigure0 );
> 



fFigureThreadItems
> = new
> org.eclipse.draw2d.RectangleFigure();

this. add(fFigureThreadItems);&#
> xA;
fFigureThreadItems.setLayoutManager(new
> org.eclipse.draw2d.StackLayout());


 ;	}



&#x
> A;	/**
	
> * @generated
	 */
	private boolean myUseLocalCoordinates =
> false;

	/**
	 * @generated
	
> */
	protected boolean useLocalCoordinates() {
		return
> myUseLocalCoordinates;
	}

& amp;#x9;/**
	 *
> @generated
	 */
	protected void
> setUseLocalCoordinates(boolean useLocalCoordinates)
> {
		myUseLocalCoordinates =
> useLocalCoordinates;
	}

&am p;#xA;
	/**
	 *
> @generated
	 */
	public org.eclipse.draw2d.RectangleFigure
> getFigureStickyNoteFigure() {
		return
> fFigureStickyNoteFigure;
	}
	 ;/**
	 *
> @generated
	 */
	public org.eclipse.draw2d.RectangleFigure
> getFigureThreadItems() {
		return
> fFigureThreadItems;
	}

& ;#xA;}

/**
 *
> @generated
 */
static final org.eclipse.swt.graphics.Color
> THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250,
> 190);

">
> <attributes
> xsi:type="gmfgen:StyleAttributes"
> fixedBackground="true"/>
> <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
>
> <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs >
> </viewmap>
> </compartments>
> <palette>
> <groups
> title="mindmap">
> <entries
> xsi:type="gmfgen:ToolEntry"
> title="Map"
> description="Create new Map"/>
> <entries
> xsi:type="gmfgen:ToolEntry"
> title="Relationship tool"
> description="Create new Relationship"
> genLinks="//@diagram/@links.0"/>
> <entries
> xsi:type="gmfgen:ToolEntry"
> title="Topic tool"
> description="Create new Topic"
> genNodes="//@diagram/@topLevelNodes.0"/>
> <entries
> xsi:type="gmfgen:ToolEntry"
> title="Thread"
> description="Create new Topic"
> genNodes="//@diagram/@childNodes.0"/>
> <entries
> xsi:type="gmfgen:ToolEntry"
> title="Thread Item"
> description="Create new Topic"
> genNodes="//@diagram/@childNodes.1"/>
> </groups>
> </palette>
> <preferencePages
> xsi:type="gmfgen:GenStandardPreferencePage"
> iD="com.erudine.newGmf.diagram.general"
> name="Mindmap Diagram">
> <children
> xsi:type="gmfgen:GenStandardPreferencePage"
> iD="com.erudine.newGmf.diagram.appearance"
> name="Appearance"
> kind="Appearance"/>
> <children
> xsi:type="gmfgen:GenStandardPreferencePage"
> iD="com.erudine.newGmf.diagram.connections"
> name="Connections"
> kind="Connections"/>
> <children
> xsi:type="gmfgen:GenStandardPreferencePage"
> iD="com.erudine.newGmf.diagram.printing"
> name="Printing"
> kind="Printing"/>
> <children
> xsi:type="gmfgen:GenStandardPreferencePage"
> iD="com.erudine.newGmf.diagram.rulersAndGrid"
> name="Rulers And Grid"
> kind="RulersAndGrid"/>
> <children
> xsi:type="gmfgen:GenStandardPreferencePage"
> iD="com.erudine.newGmf.diagram.pathmaps"
> name="Pathmaps"
> kind="Pathmaps"/>
> </preferencePages>
> </diagram>
> <plugin/>
> <editor/>
> <navigator>
> <childReferences
> child="//@diagram"/>
> <childReferences
> parent="//@diagram/@childNodes.0"
> child="//@diagram/@childNodes.1"/>
> <childReferences
> parent="//@diagram/@topLevelNodes.0"
> child="//@diagram/@childNodes.0"/>
> <childReferences
> parent="//@diagram"
> child="//@diagram/@topLevelNodes.0"/>
> <childReferences
> parent="//@diagram"
> child="//@diagram/@links.0"
> groupName="links"
> groupIcon="icons/linksNavigatorGroup.gif"/>
> <childReferences
> parent="//@diagram/@links.0"
> child="//@diagram/@topLevelNodes.0"
> referenceType="out_target"
> groupName="target"
> groupIcon="icons/linkTargetNavigatorGroup.gif"/>
> <childReferences
> parent="//@diagram/@topLevelNodes.0"
> child="//@diagram/@links.0"
> referenceType="in_source"
> groupName="incoming links"
> groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
> <childReferences
> parent="//@diagram/@links.0"
> child="//@diagram/@topLevelNodes.0"
> referenceType="in_source"
> groupName="source"
> groupIcon="icons/linkSourceNavigatorGroup.gif"/>
> <childReferences
> parent="//@diagram/@topLevelNodes.0"
> child="//@diagram/@links.0"
> referenceType="out_target"
> groupName="outgoing links"
> groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
> </navigator>
> <diagramUpdater/>
> <propertySheet>
> <tabs
> xsi:type="gmfgen:GenStandardPropertyTab"
> iD="appearance"/>
> <tabs
> xsi:type="gmfgen:GenStandardPropertyTab"
> iD="diagram"/>
> <tabs
> xsi:type="gmfgen:GenCustomPropertyTab"
> iD="domain"
> label="Core">
> <filter
> xsi:type="gmfgen:TypeTabFilter">
> <types>org.eclipse.gmf.runtime.notation.View</types>
> <types>org.eclipse.gef.EditPart</types>
> <generatedTypes>abstractNavigatorItem</generatedTypes>
> </filter>
> </tabs>
> </propertySheet>
> <domainGenModel
> href="Mindmap.genmodel#/"/>
> </gmfgen:GenEditorGenerator>
>
>
>
>
>
|
|
|
Goto Forum:
Current Time: Sat May 10 23:58:15 EDT 2025
Powered by FUDForum. Page generated in 0.04281 seconds
|