Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 37840 Details for
Bug 135016
Background colour is not used to fill polygons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fixes the subj
patch_135016.txt (text/plain), 17.79 KB, created by
Michael Golubev
on 2006-04-06 01:27:59 EDT
(
hide
)
Description:
Fixes the subj
Filename:
MIME Type:
Creator:
Michael Golubev
Created:
2006-04-06 01:27:59 EDT
Size:
17.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.graphdef.codegen >Index: templates/attr/Shape.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/Shape.javajet,v >retrieving revision 1.2 >diff -u -r1.2 Shape.javajet >--- templates/attr/Shape.javajet 6 Feb 2006 22:21:41 -0000 1.2 >+++ templates/attr/Shape.javajet 6 Apr 2006 05:16:26 -0000 >@@ -8,8 +8,11 @@ > final ImportAssistant importManager = dispatcher.getImportManager(); > %> > <% >-// PERHAPS, do this with reflection? >-%><%if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {%> >+// Most of the properties are set only if corresponding eProperty isSet. >+// The difference is in the default values. If default value of eProperty matches d2d one, the setter may be omitted. >+// It is NOT the case for: Polyline#fill eProperty because its draw2d implementation effectively redefines default value as 'false' that differs from gmf default value. >+// (@see org.eclipse.draw2d.Polyline) >+%><%if (figureInstance instanceof Polyline || figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {%> > <%=figureVarName%>.setFill(<%=figureInstance.isFill()%>); > <%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Outline())) {%> > <%=figureVarName%>.setOutline(<%=figureInstance.isOutline()%>); >Index: src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java,v >retrieving revision 1.2 >diff -u -r1.2 ShapeAttrGenerator.java >--- src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java 6 Feb 2006 22:21:42 -0000 1.2 >+++ src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java 6 Apr 2006 05:16:26 -0000 >@@ -47,9 +47,12 @@ > final ImportAssistant importManager = dispatcher.getImportManager(); > > >-// PERHAPS, do this with reflection? >+// Most of the properties are set only if corresponding eProperty isSet. >+// The difference is in the default values. If default value of eProperty matches d2d one, the setter may be omitted. >+// It is NOT the case for: Polyline#fill eProperty because its draw2d implementation effectively redefines default value as 'false' that differs from gmf default value. >+// (@see org.eclipse.draw2d.Polyline) > >- if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) { >+ if (figureInstance instanceof Polyline || figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) { > stringBuffer.append(TEXT_1); > stringBuffer.append(figureVarName); > stringBuffer.append(TEXT_2); >#P org.eclipse.gmf.examples.taipan.gmf.editor >Index: src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/RouteEditPart.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/RouteEditPart.java,v >retrieving revision 1.7 >diff -u -r1.7 RouteEditPart.java >--- src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/RouteEditPart.java 7 Mar 2006 15:45:00 -0000 1.7 >+++ src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/RouteEditPart.java 6 Apr 2006 05:16:29 -0000 >@@ -58,7 +58,7 @@ > * @generated > */ > public RouteFigure() { >- >+ this.setFill(true); > } > > } >Index: src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/DestinationEditPart.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/DestinationEditPart.java,v >retrieving revision 1.7 >diff -u -r1.7 DestinationEditPart.java >--- src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/DestinationEditPart.java 7 Mar 2006 15:45:00 -0000 1.7 >+++ src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/DestinationEditPart.java 6 Apr 2006 05:16:27 -0000 >@@ -62,7 +62,7 @@ > * @generated > */ > public ShipDestinationFigure() { >- >+ this.setFill(true); > setTargetDecoration(createTargetDecoration()); > } > >@@ -72,6 +72,7 @@ > private org.eclipse.draw2d.PolylineDecoration createTargetDecoration() { > org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration(); > // dispatchNext? >+ df.setFill(true); > > return df; > } >Index: src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java,v >retrieving revision 1.22 >diff -u -r1.22 PortEditPart.java >--- src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java 5 Apr 2006 13:43:06 -0000 1.22 >+++ src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java 6 Apr 2006 05:16:29 -0000 >@@ -247,7 +247,7 @@ > public PortFigure() { > > org.eclipse.draw2d.XYLayout genLayoutManager = new org.eclipse.draw2d.XYLayout(); >- // no suitable template found for 'org.eclipse.gmf.gmfgraph.impl.XYLayoutImpl@92d781' >+ // no suitable template found for 'org.eclipse.gmf.gmfgraph.impl.XYLayoutImpl@b535fe' > this.setLayoutManager(genLayoutManager); > > this.setPreferredSize(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50)); >@@ -272,6 +272,7 @@ > // FIXME instantiate - FigureRef - dispatch to 'instantiate' template? > > org.eclipse.draw2d.Polygon fig_1 = new org.eclipse.draw2d.Polygon(); >+ fig_1.setFill(true); > fig_1.setForegroundColor(org.eclipse.draw2d.ColorConstants.orange); > fig_1.setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange); > fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(30, 10)); >@@ -283,6 +284,7 @@ > // FIXME instantiate - FigureRef - dispatch to 'instantiate' template? > > org.eclipse.draw2d.Polygon fig_2 = new org.eclipse.draw2d.Polygon(); >+ fig_2.setFill(true); > fig_2.setForegroundColor(org.eclipse.draw2d.ColorConstants.orange); > fig_2.setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange); > fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(30, 0)); >#P org.eclipse.gmf.examples.taipan >Index: models/taipan.gmfgen >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.taipan/models/taipan.gmfgen,v >retrieving revision 1.25 >diff -u -r1.25 taipan.gmfgen >--- models/taipan.gmfgen 5 Apr 2006 13:41:25 -0000 1.25 >+++ models/taipan.gmfgen 6 Apr 2006 05:16:37 -0000 >@@ -23,7 +23,7 @@ > </childNodes> > <topLevelNodes visualID="1001" editPartClassName="PortEditPart" itemSemanticEditPolicyClassName="PortItemSemanticEditPolicy" notationViewFactoryClassName="PortViewFactory" canonicalEditPolicyClassName="PortCanonicalEditPolicy" graphicalNodeEditPolicyClassName="PortGraphicalNodeEditPolicy"> > <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> >- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="PortFigure" classBody="

/**
 * @generated
 */
public class PortFigure extends org.eclipse.draw2d.Layer {

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

	/**
	 * @generated
	 */
	public PortFigure() {
		
		org.eclipse.draw2d.XYLayout genLayoutManager = new org.eclipse.draw2d.XYLayout();
		// no suitable template found for 'org.eclipse.gmf.gmfgraph.impl.XYLayoutImpl@92d781'	
		this.setLayoutManager(genLayoutManager);
	
		



		this.setPreferredSize(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50));
		this.setSize(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50));
		this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50)));
		this.setMinimumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50)));

		
		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
		
		org.eclipse.draw2d.RectangleFigure fig_0 = new org.eclipse.draw2d.RectangleFigure();
		fig_0.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
		fig_0.setBackgroundColor(org.eclipse.draw2d.ColorConstants.darkGray);



		this.add(fig_0);
					org.eclipse.draw2d.geometry.Rectangle layData0 = new org.eclipse.draw2d.geometry.Rectangle();
			layData0.x = 10;
			layData0.y = 40;
			layData0.width = 40;
			layData0.height = 10;
			genLayoutManager.setConstraint(fig_0, layData0);
			

		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
		
		org.eclipse.draw2d.Polygon fig_1 = new org.eclipse.draw2d.Polygon();
		fig_1.setForegroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_1.setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(30, 10));
		fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(60, 40));
		fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(0, 40));



		this.add(fig_1);
		

		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
		
		org.eclipse.draw2d.Polygon fig_2 = new org.eclipse.draw2d.Polygon();
		fig_2.setForegroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_2.setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(30, 0));
		fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(50, 20));
		fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(10, 20));



		this.add(fig_2);
		


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

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

}
"/> >+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="PortFigure" classBody="

/**
 * @generated
 */
public class PortFigure extends org.eclipse.draw2d.Layer {

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

	/**
	 * @generated
	 */
	public PortFigure() {
		
		org.eclipse.draw2d.XYLayout genLayoutManager = new org.eclipse.draw2d.XYLayout();
		// no suitable template found for 'org.eclipse.gmf.gmfgraph.impl.XYLayoutImpl@b535fe'	
		this.setLayoutManager(genLayoutManager);
	
		



		this.setPreferredSize(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50));
		this.setSize(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50));
		this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50)));
		this.setMinimumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(60), getMapMode().DPtoLP(50)));

		
		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
		
		org.eclipse.draw2d.RectangleFigure fig_0 = new org.eclipse.draw2d.RectangleFigure();
		fig_0.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
		fig_0.setBackgroundColor(org.eclipse.draw2d.ColorConstants.darkGray);



		this.add(fig_0);
					org.eclipse.draw2d.geometry.Rectangle layData0 = new org.eclipse.draw2d.geometry.Rectangle();
			layData0.x = 10;
			layData0.y = 40;
			layData0.width = 40;
			layData0.height = 10;
			genLayoutManager.setConstraint(fig_0, layData0);
			

		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
		
		org.eclipse.draw2d.Polygon fig_1 = new org.eclipse.draw2d.Polygon();
		fig_1.setFill(true);		fig_1.setForegroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_1.setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(30, 10));
		fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(60, 40));
		fig_1.addPoint(new org.eclipse.draw2d.geometry.Point(0, 40));



		this.add(fig_1);
		

		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
		
		org.eclipse.draw2d.Polygon fig_2 = new org.eclipse.draw2d.Polygon();
		fig_2.setFill(true);		fig_2.setForegroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_2.setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange);
		fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(30, 0));
		fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(50, 20));
		fig_2.addPoint(new org.eclipse.draw2d.geometry.Point(10, 20));



		this.add(fig_2);
		


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

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

}
"/> > <modelFacet> > <metaClass href="taipan.genmodel#//taipan/Port"/> > <containmentMetaFeature href="taipan.genmodel#//taipan/Aquatory/ports"/> >@@ -55,7 +55,7 @@ > </topLevelNodes> > <links visualID="3001" editPartClassName="DestinationEditPart" itemSemanticEditPolicyClassName="DestinationItemSemanticEditPolicy" notationViewFactoryClassName="DestinationViewFactory"> > <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> >- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="ShipDestinationFigure" classBody="

/**
 * @generated
 */
public class ShipDestinationFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {

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

		setTargetDecoration(createTargetDecoration());
	}


	/**
	 * @generated
	 */
	private org.eclipse.draw2d.PolylineDecoration createTargetDecoration() {
org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
// dispatchNext?





		return df;
	}
}"/> >+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="ShipDestinationFigure" classBody="

/**
 * @generated
 */
public class ShipDestinationFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {

	/**
	 * @generated
	 */
	public ShipDestinationFigure() {
		this.setFill(true);
		setTargetDecoration(createTargetDecoration());
	}


	/**
	 * @generated
	 */
	private org.eclipse.draw2d.PolylineDecoration createTargetDecoration() {
org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
// dispatchNext?
		df.setFill(true);




		return df;
	}
}"/> > <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet"> > <metaFeature href="taipan.genmodel#//taipan/Ship/destination"/> > </modelFacet> >@@ -66,7 +66,7 @@ > </links> > <links visualID="3002" editPartClassName="RouteEditPart" itemSemanticEditPolicyClassName="RouteItemSemanticEditPolicy" notationViewFactoryClassName="RouteViewFactory"> > <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> >- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="RouteFigure" classBody="

/**
 * @generated
 */
public class RouteFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {

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

	}


}"/> >+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="RouteFigure" classBody="

/**
 * @generated
 */
public class RouteFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {

	/**
	 * @generated
	 */
	public RouteFigure() {
		this.setFill(true);
	}


}"/> > <modelFacet xsi:type="gmfgen:TypeLinkModelFacet"> > <metaClass href="taipan.genmodel#//taipan/Route"/> > <containmentMetaFeature href="taipan.genmodel#//taipan/Aquatory/routes"/>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 135016
:
37840