diff options
author | ytanguy | 2011-04-28 17:09:40 +0000 |
---|---|---|
committer | ytanguy | 2011-04-28 17:09:40 +0000 |
commit | d94a0833c64538f075fb1a4db91abe487d8e8a96 (patch) | |
tree | d8d0bef643b42b4d25749186b59a8e098b8ff406 /plugins/developer | |
parent | 2903d2e816d3ac833547e78f770881174c72332d (diff) | |
download | org.eclipse.papyrus-d94a0833c64538f075fb1a4db91abe487d8e8a96.tar.gz org.eclipse.papyrus-d94a0833c64538f075fb1a4db91abe487d8e8a96.tar.xz org.eclipse.papyrus-d94a0833c64538f075fb1a4db91abe487d8e8a96.zip |
REOPENED - bug 313985: [Composite Structure Diagram] port becomes invisible after moving
https://bugs.eclipse.org/bugs/show_bug.cgi?id=313985
Diffstat (limited to 'plugins/developer')
2 files changed, 1 insertions, 51 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/diagram/editparts/DiagramEditPart.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/diagram/editparts/DiagramEditPart.xpt index 3ee1b3d5f97..78d8e0aa38f 100644 --- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/diagram/editparts/DiagramEditPart.xpt +++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/diagram/editparts/DiagramEditPart.xpt @@ -29,8 +29,6 @@ public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsLis «EXPAND impl::diagram::editparts::DiagramEditPart::_constructor-»
- «EXPAND impl::diagram::editparts::DiagramEditPart::_applyClippingStrategy-»
-
«EXPAND createDefaultEditPolicies-»
«EXPAND impl::diagram::editparts::DiagramEditPart::createFigure-»
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/DiagramEditPart.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/DiagramEditPart.xpt index a5f5205f01b..e88d01f61c4 100644 --- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/DiagramEditPart.xpt +++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/impl/diagram/editparts/DiagramEditPart.xpt @@ -24,55 +24,7 @@ «DEFINE _constructor FOR gmfgen::GenDiagram-» «EXPAND xpt::Common::generatedMemberComment» public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) { - super(view); - - «REM» Add clipping strategy settings, see bug313985: https://bugs.eclipse.org/bugs/show_bug.cgi?id=313985«ENDREM» - getFigure ().setClippingStrategy (new org.eclipse.draw2d.IClippingStrategy () { - - public org.eclipse.draw2d.geometry.Rectangle[] getClip(org.eclipse.draw2d.IFigure childFigure) { - // very inefficient, since it implies several tree traversals. Bit handles modifications of the tree structure - // It's a workaround instead of the better solution to fix BorderedNodeFigure (overload and let it return - // getExtendedBounds) - // See bug 313985 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=313985) for more details - applyClippingStrategy (childFigure); - if (childFigure instanceof org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure) { - return new org.eclipse.draw2d.geometry.Rectangle [] { ((org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure) childFigure).getExtendedBounds () }; - - } else { - return new org.eclipse.draw2d.geometry.Rectangle [] { childFigure.getBounds () }; - } - } - }); - } -«ENDDEFINE» - -«REM» Add clipping strategy settings, see bug313985: https://bugs.eclipse.org/bugs/show_bug.cgi?id=313985«ENDREM» -«DEFINE _applyClippingStrategy FOR gmfgen::GenDiagram-» - «EXPAND xpt::Common::generatedMemberComment» - public void applyClippingStrategy (org.eclipse.draw2d.IFigure fig) { - boolean hasBorderedNodeChild = false; - for (Object child : fig.getChildren ()) { - if (child instanceof org.eclipse.draw2d.IFigure) { - applyClippingStrategy ((org.eclipse.draw2d.IFigure) child); - if (child instanceof org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure) { - hasBorderedNodeChild = true; - } - } - } - if (hasBorderedNodeChild && (fig.getClippingStrategy () == null)) { - fig.setClippingStrategy (new org.eclipse.draw2d.IClippingStrategy () { - - public org.eclipse.draw2d.geometry.Rectangle[] getClip(org.eclipse.draw2d.IFigure childFigure) { - if (childFigure instanceof org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure) { - return new org.eclipse.draw2d.geometry.Rectangle [] { ((org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure) childFigure).getExtendedBounds () }; - } - else { - return new org.eclipse.draw2d.geometry.Rectangle [] { childFigure.getBounds () }; - } - } - }); - } - + super(view); } «ENDDEFINE» |