Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-07-02 11:20:42 -0400
committerashatalin2008-07-02 11:20:42 -0400
commit75f7558f5637f01859ad162ed8f5724e1daea45d (patch)
treef07cadb67785a65b04d24f4d19f631fe3a120786 /plugins
parente22392a16b92a7619e30510004f99ad4a8b9e994 (diff)
downloadorg.eclipse.gmf-tooling-75f7558f5637f01859ad162ed8f5724e1daea45d.tar.gz
org.eclipse.gmf-tooling-75f7558f5637f01859ad162ed8f5724e1daea45d.tar.xz
org.eclipse.gmf-tooling-75f7558f5637f01859ad162ed8f5724e1daea45d.zip
[233207] - Support Label figure in .gmfgraph editor
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/messages.properties12
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen543
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgraph61
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfmap94
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmftool18
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.trace31
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/plugin.properties6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/plugin.xml42
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src-extra/org/eclipse/gmf/graphdef/editor/edit/parts/AbstractFigureEditPart.java15
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/DiagramLabelCreateCommand.java49
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label2CreateCommand.java62
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label3CreateCommand.java50
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/LabelCreateCommand.java50
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/DiagramLabelEditHelper.java17
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/LabelEditHelper.java17
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelEditPart.java291
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelNameEditPart.java551
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelVisualFacetsEditPart.java70
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java27
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label2EditPart.java386
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label3EditPart.java386
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelEditPart.java443
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText2EditPart.java547
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText3EditPart.java547
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelTextEditPart.java547
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java42
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasItemSemanticEditPolicy.java7
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelItemSemanticEditPolicy.java138
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelVisualFacetsItemSemanticEditPolicy.java18
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2ItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3CanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3ItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorCanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresCanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresItemSemanticEditPolicy.java7
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryItemSemanticEditPolicy.java4
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/GMFGraphBaseItemSemanticEditPolicy.java33
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label2ItemSemanticEditPolicy.java81
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label3ItemSemanticEditPolicy.java81
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/LabelItemSemanticEditPolicy.java81
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2ItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3CanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3ItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2ItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3CanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3ItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleItemSemanticEditPolicy.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorContentProvider.java98
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorLabelProvider.java93
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorSorter.java4
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/parsers/RegexpParser.java75
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDiagramUpdater.java200
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphPaletteFactory.java28
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java123
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/Messages.java50
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphElementTypes.java32
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphModelingAssistantProvider.java26
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java110
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java61
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/FigureSectionProxy.java5
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutDataSectionProxy.java7
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutSectionProxy.java7
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/SizeSectionProxy.java7
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelNameViewFactory.java31
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelViewFactory.java68
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelVisualFacetsViewFactory.java75
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label2ViewFactory.java55
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label3ViewFactory.java55
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText2ViewFactory.java31
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText3ViewFactory.java31
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelTextViewFactory.java31
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelViewFactory.java63
81 files changed, 6734 insertions, 118 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/messages.properties b/plugins/org.eclipse.gmf.graphdef.editor/messages.properties
index b39b95928..6aff94249 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/messages.properties
+++ b/plugins/org.eclipse.gmf.graphdef.editor/messages.properties
@@ -116,3 +116,15 @@ Polygon8CreationTool_desc=Create new Polygon
NavigatorGroupName_Polygon_3023_incominglinks=incoming links
NavigatorGroupName_Polygon_3024_incominglinks=incoming links
NavigatorGroupName_Polygon_3025_incominglinks=incoming links
+Label9CreationTool_title=Label
+Label9CreationTool_desc=Create new Label
+NavigatorGroupName_Label_3026_incominglinks=incoming links
+NavigatorGroupName_Label_3027_incominglinks=incoming links
+NavigatorGroupName_Label_3028_incominglinks=incoming links
+Label7CreationTool_title=Label
+Label7CreationTool_desc=Create Diagram Element representing Label
+LabelFigure9CreationTool_title=Label Figure
+LabelFigure9CreationTool_desc=Create new Label
+DiagramLabelVisualFacetsEditPart_title=VisualFacets
+ NavigatorGroupName_DiagramLabel_2009_outgoinglinks=outgoing links
+NavigatorGroupName_DiagramLabelAccessor_4004_source=source
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen
index ad8ba16d8..037ec5efc 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen
+++ b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen
@@ -41,7 +41,7 @@
itemSemanticEditPolicyClassName="FigureDescriptorItemSemanticEditPolicy"
notationViewFactoryClassName="FigureDescriptorViewFactory"
canonicalEditPolicyClassName="FigureDescriptorCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
graphicalNodeEditPolicyClassName="FigureDescriptorGraphicalNodeEditPolicy"
createCommandClassName="FigureDescriptorCreateCommand"
containers="/0/@diagram/@compartments.3">
@@ -90,7 +90,7 @@
itemSemanticEditPolicyClassName="RectangleItemSemanticEditPolicy"
notationViewFactoryClassName="RectangleViewFactory"
canonicalEditPolicyClassName="RectangleCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="RectangleGraphicalNodeEditPolicy"
createCommandClassName="RectangleCreateCommand"
containers="/0/@diagram/@childNodes.0">
@@ -126,10 +126,10 @@
itemSemanticEditPolicyClassName="Rectangle2ItemSemanticEditPolicy"
notationViewFactoryClassName="Rectangle2ViewFactory"
canonicalEditPolicyClassName="Rectangle2CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="Rectangle2GraphicalNodeEditPolicy"
createCommandClassName="Rectangle2CreateCommand"
- containers="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14">
+ containers="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -162,10 +162,10 @@
itemSemanticEditPolicyClassName="EllipseItemSemanticEditPolicy"
notationViewFactoryClassName="EllipseViewFactory"
canonicalEditPolicyClassName="EllipseCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="EllipseGraphicalNodeEditPolicy"
createCommandClassName="EllipseCreateCommand"
- containers="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14">
+ containers="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -198,10 +198,10 @@
itemSemanticEditPolicyClassName="RoundedRectangleItemSemanticEditPolicy"
notationViewFactoryClassName="RoundedRectangleViewFactory"
canonicalEditPolicyClassName="RoundedRectangleCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="RoundedRectangleGraphicalNodeEditPolicy"
createCommandClassName="RoundedRectangleCreateCommand"
- containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14">
+ containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -237,7 +237,7 @@
childNodes="/0/@diagram/@childNodes.6"
graphicalNodeEditPolicyClassName="PolylineGraphicalNodeEditPolicy"
createCommandClassName="PolylineCreateCommand"
- containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14">
+ containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -254,7 +254,7 @@
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.0">
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.1">
<metaClass
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Polyline"/>
<containmentMetaFeature
@@ -270,13 +270,13 @@
<newElementInitializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
+ value="/0/@expressionProviders/@providers.0/@expressions.2">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/x"/>
</initializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.2">
+ value="/0/@expressionProviders/@providers.0/@expressions.3">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/y"/>
</initializers>
@@ -284,13 +284,13 @@
<newElementInitializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.3">
+ value="/0/@expressionProviders/@providers.0/@expressions.4">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/x"/>
</initializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.4">
+ value="/0/@expressionProviders/@providers.0/@expressions.5">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/y"/>
</initializers>
@@ -307,7 +307,7 @@
canonicalEditPolicyClassName="PointCanonicalEditPolicy"
graphicalNodeEditPolicyClassName="PointGraphicalNodeEditPolicy"
createCommandClassName="PointCreateCommand"
- containers="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
+ containers="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -344,7 +344,7 @@
childNodes="/0/@diagram/@childNodes.6"
graphicalNodeEditPolicyClassName="PolygonGraphicalNodeEditPolicy"
createCommandClassName="PolygonCreateCommand"
- containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14">
+ containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -372,13 +372,13 @@
<newElementInitializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.5">
+ value="/0/@expressionProviders/@providers.0/@expressions.6">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/x"/>
</initializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.6">
+ value="/0/@expressionProviders/@providers.0/@expressions.7">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/y"/>
</initializers>
@@ -386,13 +386,13 @@
<newElementInitializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
+ value="/0/@expressionProviders/@providers.0/@expressions.8">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/x"/>
</initializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.8">
+ value="/0/@expressionProviders/@providers.0/@expressions.9">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/y"/>
</initializers>
@@ -400,13 +400,13 @@
<newElementInitializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.9">
+ value="/0/@expressionProviders/@providers.0/@expressions.10">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/x"/>
</initializers>
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.10">
+ value="/0/@expressionProviders/@providers.0/@expressions.11">
<feature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Point/y"/>
</initializers>
@@ -416,12 +416,68 @@
</modelFacet>
</childNodes>
<childNodes
+ visualID="3026"
+ editPartClassName="LabelEditPart"
+ itemSemanticEditPolicyClassName="LabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="LabelViewFactory"
+ canonicalEditPolicyClassName="LabelCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="LabelGraphicalNodeEditPolicy"
+ createCommandClassName="LabelCreateCommand"
+ containers="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="LabelEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="LabelFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LabelFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureLabelFigure_TextLabel; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LabelFigure() {&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xD;&#xA;&#x9;&#x9;this.setFill(false);&#xA;this.setOutline(false);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fFigureLabelFigure_TextLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xD;&#xA;fFigureLabelFigure_TextLabel.setText(&quot;&lt;&lt;Label>>&quot;);&#xD;&#xA;&#xD;&#xA;this.add(fFigureLabelFigure_TextLabel);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureLabelFigure_TextLabel() {&#xD;&#xA;&#x9;&#x9;return fFigureLabelFigure_TextLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:ResizeConstraints"/>
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="0"
+ height="0"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Label"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/RealFigure/children"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/RealFigure/children"/>
+ </modelFacet>
+ <labels
+ visualID="5010"
+ editPartClassName="LabelTextEditPart"
+ itemSemanticEditPolicyClassName="LabelTextItemSemanticEditPolicy"
+ notationViewFactoryClassName="LabelTextViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureLabelFigure_TextLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Label/text"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
visualID="3015"
editPartClassName="Ellipse2EditPart"
itemSemanticEditPolicyClassName="Ellipse2ItemSemanticEditPolicy"
notationViewFactoryClassName="Ellipse2ViewFactory"
canonicalEditPolicyClassName="Ellipse2CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="Ellipse2GraphicalNodeEditPolicy"
createCommandClassName="Ellipse2CreateCommand"
containers="/0/@diagram/@childNodes.0">
@@ -457,7 +513,7 @@
itemSemanticEditPolicyClassName="RoundedRectangle2ItemSemanticEditPolicy"
notationViewFactoryClassName="RoundedRectangle2ViewFactory"
canonicalEditPolicyClassName="RoundedRectangle2CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="RoundedRectangle2GraphicalNodeEditPolicy"
createCommandClassName="RoundedRectangle2CreateCommand"
containers="/0/@diagram/@childNodes.0">
@@ -513,7 +569,7 @@
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.11">
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.12">
<metaClass
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Polyline"/>
<containmentMetaFeature
@@ -553,12 +609,68 @@
</modelFacet>
</childNodes>
<childNodes
+ visualID="3027"
+ editPartClassName="Label2EditPart"
+ itemSemanticEditPolicyClassName="Label2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="Label2ViewFactory"
+ canonicalEditPolicyClassName="Label2CanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="Label2GraphicalNodeEditPolicy"
+ createCommandClassName="Label2CreateCommand"
+ containers="/0/@diagram/@childNodes.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.8/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="BorderedLabelFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class BorderedLabelFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureBorderedLabelFigure_TextLabel; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public BorderedLabelFigure() {&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xD;&#xA;&#x9;&#x9;this.setFill(false);&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fFigureBorderedLabelFigure_TextLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xD;&#xA;fFigureBorderedLabelFigure_TextLabel.setText(&quot;&lt;&lt;Label>>&quot;);&#xD;&#xA;&#xD;&#xA;this.add(fFigureBorderedLabelFigure_TextLabel);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureBorderedLabelFigure_TextLabel() {&#xD;&#xA;&#x9;&#x9;return fFigureBorderedLabelFigure_TextLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:ResizeConstraints"/>
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="0"
+ height="0"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Label"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/FigureDescriptor/actualFigure"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/FigureDescriptor/actualFigure"/>
+ </modelFacet>
+ <labels
+ visualID="5011"
+ editPartClassName="LabelText2EditPart"
+ itemSemanticEditPolicyClassName="LabelText2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="LabelText2ViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureBorderedLabelFigure_TextLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Label/text"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
visualID="3018"
editPartClassName="Rectangle3EditPart"
itemSemanticEditPolicyClassName="Rectangle3ItemSemanticEditPolicy"
notationViewFactoryClassName="Rectangle3ViewFactory"
canonicalEditPolicyClassName="Rectangle3CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="Rectangle3GraphicalNodeEditPolicy"
createCommandClassName="Rectangle3CreateCommand"
containers="/0/@diagram/@compartments.3">
@@ -594,7 +706,7 @@
itemSemanticEditPolicyClassName="Ellipse3ItemSemanticEditPolicy"
notationViewFactoryClassName="Ellipse3ViewFactory"
canonicalEditPolicyClassName="Ellipse3CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="Ellipse3GraphicalNodeEditPolicy"
createCommandClassName="Ellipse3CreateCommand"
containers="/0/@diagram/@compartments.3">
@@ -630,7 +742,7 @@
itemSemanticEditPolicyClassName="RoundedRectangle3ItemSemanticEditPolicy"
notationViewFactoryClassName="RoundedRectangle3ViewFactory"
canonicalEditPolicyClassName="RoundedRectangle3CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8"
graphicalNodeEditPolicyClassName="RoundedRectangle3GraphicalNodeEditPolicy"
createCommandClassName="RoundedRectangle3CreateCommand"
containers="/0/@diagram/@compartments.3">
@@ -686,7 +798,7 @@
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.11">
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.12">
<metaClass
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Polyline"/>
<containmentMetaFeature
@@ -725,6 +837,62 @@
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/FigureGallery/figures"/>
</modelFacet>
</childNodes>
+ <childNodes
+ visualID="3028"
+ editPartClassName="Label3EditPart"
+ itemSemanticEditPolicyClassName="Label3ItemSemanticEditPolicy"
+ notationViewFactoryClassName="Label3ViewFactory"
+ canonicalEditPolicyClassName="Label3CanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="Label3GraphicalNodeEditPolicy"
+ createCommandClassName="Label3CreateCommand"
+ containers="/0/@diagram/@compartments.3">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.8/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="BorderedLabelFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class BorderedLabelFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureBorderedLabelFigure_TextLabel; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public BorderedLabelFigure() {&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xD;&#xA;&#x9;&#x9;this.setFill(false);&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fFigureBorderedLabelFigure_TextLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xD;&#xA;fFigureBorderedLabelFigure_TextLabel.setText(&quot;&lt;&lt;Label>>&quot;);&#xD;&#xA;&#xD;&#xA;this.add(fFigureBorderedLabelFigure_TextLabel);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureBorderedLabelFigure_TextLabel() {&#xD;&#xA;&#x9;&#x9;return fFigureBorderedLabelFigure_TextLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:ResizeConstraints"/>
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="0"
+ height="0"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Label"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/FigureGallery/figures"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/FigureGallery/figures"/>
+ </modelFacet>
+ <labels
+ visualID="5012"
+ editPartClassName="LabelText3EditPart"
+ itemSemanticEditPolicyClassName="LabelText3ItemSemanticEditPolicy"
+ notationViewFactoryClassName="LabelText3ViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureBorderedLabelFigure_TextLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Label/text"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
<topLevelNodes
visualID="2005"
editPartClassName="CompartmentEditPart"
@@ -796,7 +964,8 @@
<requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
- <modelFacet>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.0">
<metaClass
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Node"/>
<containmentMetaFeature
@@ -920,6 +1089,55 @@
</modelFacet>
</labels>
</topLevelNodes>
+ <topLevelNodes
+ visualID="2009"
+ editPartClassName="DiagramLabelEditPart"
+ itemSemanticEditPolicyClassName="DiagramLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="DiagramLabelViewFactory"
+ canonicalEditPolicyClassName="DiagramLabelCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.4"
+ graphicalNodeEditPolicyClassName="DiagramLabelGraphicalNodeEditPolicy"
+ createCommandClassName="DiagramLabelCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="DiagramLabelEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ layoutType="TOOLBAR_LAYOUT"
+ className="DiagramElementFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureDiagramElementFigure_NameLabel; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;layoutThis.setStretchMinorAxis(true);&#xD;&#xA;&#x9;layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;&#x9;layoutThis.setSpacing(0);&#xD;&#xA;&#x9;layoutThis.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fFigureDiagramElementFigure_NameLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xD;&#xA;fFigureDiagramElementFigure_NameLabel.setText(&quot;&quot;);&#xD;&#xA;&#xD;&#xA;this.add(fFigureDiagramElementFigure_NameLabel);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;return fFigureDiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/DiagramLabel"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Canvas/labels"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Canvas/labels"/>
+ </modelFacet>
+ <labels
+ visualID="5013"
+ editPartClassName="DiagramLabelNameEditPart"
+ itemSemanticEditPolicyClassName="DiagramLabelNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="DiagramLabelNameViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureDiagramElementFigure_NameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Identity/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
<links
visualID="4002"
editPartClassName="ChildAccessEditPart"
@@ -1022,6 +1240,8 @@
<metaFeature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Node/contentPane"/>
</modelFacet>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.13"/>
</links>
<links
visualID="4005"
@@ -1104,7 +1324,7 @@
itemSemanticEditPolicyClassName="FigureGalleryFiguresItemSemanticEditPolicy"
notationViewFactoryClassName="FigureGalleryFiguresViewFactory"
canonicalEditPolicyClassName="FigureGalleryFiguresCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19"
title="Figures"
node="/0/@diagram/@topLevelNodes.3"
listLayout="false">
@@ -1117,6 +1337,23 @@
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
</compartments>
+ <compartments
+ visualID="7009"
+ editPartClassName="DiagramLabelVisualFacetsEditPart"
+ itemSemanticEditPolicyClassName="DiagramLabelVisualFacetsItemSemanticEditPolicy"
+ notationViewFactoryClassName="DiagramLabelVisualFacetsViewFactory"
+ canonicalEditPolicyClassName="DiagramLabelVisualFacetsCanonicalEditPolicy"
+ title="VisualFacets"
+ node="/0/@diagram/@topLevelNodes.4">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ </compartments>
<palette>
<groups
title="Diagram Elements"
@@ -1152,6 +1389,11 @@
title="Child Access Link"
description="Link from the Diagram Element to the structure subelement of its descriptor"
genLinks="/0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Label"
+ description="Create Diagram Element representing Label"
+ genNodes="/0/@diagram/@topLevelNodes.4"/>
</groups>
<groups
title="Figures"
@@ -1171,22 +1413,22 @@
xsi:type="gmfgen:ToolEntry"
title="Rectangle"
description="Create Rectangle"
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.12"/>
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.14"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Ellipse"
description="Create Ellipse"
- genNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13"/>
+ genNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.15"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Rounded Rectangle"
description="Create Rounded Rectangle"
- genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.14"/>
+ genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.16"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Polyline"
description="Create new Polyline"
- genNodes="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15"/>
+ genNodes="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="PolylinePoint"
@@ -1196,7 +1438,12 @@
xsi:type="gmfgen:ToolEntry"
title="Polygon"
description="Create new Polygon"
- genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16"/>
+ genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Label Figure"
+ description="Create new Label"
+ genNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19"/>
</groups>
</palette>
<preferencePages
@@ -1279,6 +1526,9 @@
parent="/0/@diagram/@childNodes.4"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.4"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@childNodes.3"
child="/0/@diagram/@childNodes.4"/>
<childReferences
@@ -1288,6 +1538,9 @@
parent="/0/@diagram/@childNodes.3"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.3"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@childNodes.2"
child="/0/@diagram/@childNodes.3"/>
<childReferences
@@ -1300,6 +1553,9 @@
parent="/0/@diagram/@childNodes.2"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.2"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@childNodes.1"
child="/0/@diagram/@childNodes.2"/>
<childReferences
@@ -1315,47 +1571,50 @@
parent="/0/@diagram/@childNodes.1"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.1"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@childNodes.0"
child="/0/@diagram/@childNodes.1"/>
<childReferences
- parent="/0/@diagram/@childNodes.8"
+ parent="/0/@diagram/@childNodes.9"
child="/0/@diagram/@childNodes.2"/>
<childReferences
- parent="/0/@diagram/@childNodes.8"
+ parent="/0/@diagram/@childNodes.9"
child="/0/@diagram/@childNodes.3"/>
<childReferences
- parent="/0/@diagram/@childNodes.8"
+ parent="/0/@diagram/@childNodes.9"
child="/0/@diagram/@childNodes.4"/>
<childReferences
- parent="/0/@diagram/@childNodes.8"
+ parent="/0/@diagram/@childNodes.9"
child="/0/@diagram/@childNodes.5"/>
<childReferences
- parent="/0/@diagram/@childNodes.8"
+ parent="/0/@diagram/@childNodes.9"
child="/0/@diagram/@childNodes.7"/>
<childReferences
- parent="/0/@diagram/@childNodes.0"
+ parent="/0/@diagram/@childNodes.9"
child="/0/@diagram/@childNodes.8"/>
<childReferences
- parent="/0/@diagram/@childNodes.9"
+ parent="/0/@diagram/@childNodes.0"
+ child="/0/@diagram/@childNodes.9"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
child="/0/@diagram/@childNodes.2"/>
<childReferences
- parent="/0/@diagram/@childNodes.9"
+ parent="/0/@diagram/@childNodes.10"
child="/0/@diagram/@childNodes.3"/>
<childReferences
- parent="/0/@diagram/@childNodes.9"
+ parent="/0/@diagram/@childNodes.10"
child="/0/@diagram/@childNodes.4"/>
<childReferences
- parent="/0/@diagram/@childNodes.9"
+ parent="/0/@diagram/@childNodes.10"
child="/0/@diagram/@childNodes.5"/>
<childReferences
- parent="/0/@diagram/@childNodes.9"
+ parent="/0/@diagram/@childNodes.10"
child="/0/@diagram/@childNodes.7"/>
<childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@childNodes.9"/>
- <childReferences
parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@childNodes.6"/>
+ child="/0/@diagram/@childNodes.8"/>
<childReferences
parent="/0/@diagram/@childNodes.0"
child="/0/@diagram/@childNodes.10"/>
@@ -1366,79 +1625,103 @@
parent="/0/@diagram/@childNodes.0"
child="/0/@diagram/@childNodes.11"/>
<childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@childNodes.6"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.0"
+ child="/0/@diagram/@childNodes.12"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.0"
+ child="/0/@diagram/@childNodes.13"/>
+ <childReferences
parent="/0/@diagram/@topLevelNodes.3"
child="/0/@diagram/@childNodes.0"/>
<childReferences
- parent="/0/@diagram/@childNodes.12"
+ parent="/0/@diagram/@childNodes.14"
child="/0/@diagram/@childNodes.2"/>
<childReferences
- parent="/0/@diagram/@childNodes.12"
+ parent="/0/@diagram/@childNodes.14"
child="/0/@diagram/@childNodes.3"/>
<childReferences
- parent="/0/@diagram/@childNodes.12"
+ parent="/0/@diagram/@childNodes.14"
child="/0/@diagram/@childNodes.4"/>
<childReferences
- parent="/0/@diagram/@childNodes.12"
+ parent="/0/@diagram/@childNodes.14"
child="/0/@diagram/@childNodes.5"/>
<childReferences
- parent="/0/@diagram/@childNodes.12"
+ parent="/0/@diagram/@childNodes.14"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@topLevelNodes.3"
- child="/0/@diagram/@childNodes.12"/>
+ child="/0/@diagram/@childNodes.14"/>
<childReferences
- parent="/0/@diagram/@childNodes.13"
+ parent="/0/@diagram/@childNodes.15"
child="/0/@diagram/@childNodes.2"/>
<childReferences
- parent="/0/@diagram/@childNodes.13"
+ parent="/0/@diagram/@childNodes.15"
child="/0/@diagram/@childNodes.3"/>
<childReferences
- parent="/0/@diagram/@childNodes.13"
+ parent="/0/@diagram/@childNodes.15"
child="/0/@diagram/@childNodes.4"/>
<childReferences
- parent="/0/@diagram/@childNodes.13"
+ parent="/0/@diagram/@childNodes.15"
child="/0/@diagram/@childNodes.5"/>
<childReferences
- parent="/0/@diagram/@childNodes.13"
+ parent="/0/@diagram/@childNodes.15"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@topLevelNodes.3"
- child="/0/@diagram/@childNodes.13"/>
+ child="/0/@diagram/@childNodes.15"/>
<childReferences
- parent="/0/@diagram/@childNodes.14"
+ parent="/0/@diagram/@childNodes.16"
child="/0/@diagram/@childNodes.2"/>
<childReferences
- parent="/0/@diagram/@childNodes.14"
+ parent="/0/@diagram/@childNodes.16"
child="/0/@diagram/@childNodes.3"/>
<childReferences
- parent="/0/@diagram/@childNodes.14"
+ parent="/0/@diagram/@childNodes.16"
child="/0/@diagram/@childNodes.4"/>
<childReferences
- parent="/0/@diagram/@childNodes.14"
+ parent="/0/@diagram/@childNodes.16"
child="/0/@diagram/@childNodes.5"/>
<childReferences
- parent="/0/@diagram/@childNodes.14"
+ parent="/0/@diagram/@childNodes.16"
child="/0/@diagram/@childNodes.7"/>
<childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
parent="/0/@diagram/@topLevelNodes.3"
- child="/0/@diagram/@childNodes.14"/>
+ child="/0/@diagram/@childNodes.16"/>
<childReferences
- parent="/0/@diagram/@childNodes.15"
+ parent="/0/@diagram/@childNodes.17"
child="/0/@diagram/@childNodes.6"/>
<childReferences
parent="/0/@diagram/@topLevelNodes.3"
- child="/0/@diagram/@childNodes.15"/>
+ child="/0/@diagram/@childNodes.17"/>
<childReferences
- parent="/0/@diagram/@childNodes.16"
+ parent="/0/@diagram/@childNodes.18"
child="/0/@diagram/@childNodes.6"/>
<childReferences
parent="/0/@diagram/@topLevelNodes.3"
- child="/0/@diagram/@childNodes.16"/>
+ child="/0/@diagram/@childNodes.18"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.3"
+ child="/0/@diagram/@childNodes.19"/>
<childReferences
parent="/0/@diagram"
child="/0/@diagram/@topLevelNodes.3"/>
<childReferences
parent="/0/@diagram"
+ child="/0/@diagram/@topLevelNodes.4"/>
+ <childReferences
+ parent="/0/@diagram"
child="/0/@diagram/@links.0"
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
@@ -1624,6 +1907,42 @@
groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
<childReferences
parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
child="/0/@diagram/@childNodes.0"
referenceType="in_source"
groupName="source"
@@ -1657,6 +1976,18 @@
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
<childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@topLevelNodes.4"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.4"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
parent="/0/@diagram"
child="/0/@diagram/@links.3"
groupName="links"
@@ -1674,6 +2005,18 @@
groupName="outgoing links"
groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
<childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@topLevelNodes.4"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.4"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
parent="/0/@diagram"
child="/0/@diagram/@links.4"
groupName="links"
@@ -1726,6 +2069,18 @@
referenceType="out_target"
groupName="outgoing links"
groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@topLevelNodes.4"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.4"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
</navigator>
<diagramUpdater/>
<propertySheet>
@@ -1791,6 +2146,9 @@
xsi:type="gmfgen:GenExpressionInterpreter">
<expressions
xsi:type="gmfgen:GenConstraint"
+ body="not self.oclIsKindOf(gmfgraph::DiagramLabel)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
body="not oclIsKindOf(gmfgraph::Polygon)"/>
<expressions
body="10"/>
@@ -1815,38 +2173,41 @@
<expressions
xsi:type="gmfgen:GenConstraint"
body="not oclIsKindOf(gmfgraph::Polygon)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="not self.oclIsKindOf(gmfgraph::DiagramLabel)"/>
</providers>
</expressionProviders>
</gmfgen:GenEditorGenerator>
<propsheet:PropertySectionContainer>
<customSections
tab="/0/@propertySheet/@tabs.6"
- nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15">
+ nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<section
href="FigureSection.xmi#/"/>
</customSections>
<customSections
tab="/0/@propertySheet/@tabs.4"
- nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15">
+ nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19">
<section
href="LayoutDataSection.xmi#/"/>
</customSections>
<customSections
tab="/0/@propertySheet/@tabs.3"
- nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15">
+ nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19">
<section
href="LayoutSection.xmi#/"/>
</customSections>
<customSections
tab="/0/@propertySheet/@tabs.5"
- nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15">
+ nodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19">
<section
href="SizeSection.xmi#/"/>
</customSections>
</propsheet:PropertySectionContainer>
<wysiwyg:SynchronizerContainer>
<synchronizers
- genNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5">
+ genNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8">
<contexts
xsi:type="ctx:FeatureContext">
<children
@@ -1888,7 +2249,7 @@
methodName="refreshBounds"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7">
+ genNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8">
<contexts
xsi:type="ctx:FeatureContext">
<children
@@ -2008,7 +2369,7 @@
methodName="refreshLayoutData"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2020,7 +2381,7 @@
figureAttribute="Outline"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2032,7 +2393,7 @@
figureAttribute="Fill"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2044,7 +2405,7 @@
figureAttribute="LineWidth"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2057,7 +2418,7 @@
domainValueTransformerName="getLineStyle"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2069,7 +2430,7 @@
figureAttribute="FillXOR"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2081,7 +2442,7 @@
figureAttribute="OutlineXOR"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.14">
+ genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.16">
<contexts
xsi:type="ctx:FeatureContext">
<selector
@@ -2100,7 +2461,7 @@
domainValueTransformerName="getCornerDimensions"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<children
@@ -2224,7 +2585,7 @@
methodName="refreshLayoutManager"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19">
<contexts
xsi:type="ctx:FeatureContext">
<children
@@ -2261,7 +2622,7 @@
domainValueTransformerName="getColor"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19">
<contexts
xsi:type="ctx:FeatureContext">
<children
@@ -2298,7 +2659,7 @@
domainValueTransformerName="getColor"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.19">
<contexts
xsi:type="ctx:FeatureContext">
<children
@@ -2328,7 +2689,7 @@
methodName="refreshFont"/>
</synchronizers>
<synchronizers
- genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16">
+ genNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18">
<contexts
xsi:type="ctx:FeatureContext">
<children
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgraph b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgraph
index 604a24187..cd441c4e0 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgraph
+++ b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgraph
@@ -199,6 +199,39 @@
<actualFigure
xsi:type="gmfgraph:Polygon"/>
</descriptors>
+ <descriptors
+ name="LabelFigure">
+ <actualFigure
+ xsi:type="gmfgraph:Rectangle"
+ name="LabelFigure"
+ outline="false"
+ fill="false">
+ <layout
+ xsi:type="gmfgraph:StackLayout"/>
+ <children
+ xsi:type="gmfgraph:Label"
+ name="LabelFigure_TextLabel"
+ text="&lt;&lt;Label>>"/>
+ </actualFigure>
+ <accessors
+ figure="//@figures.0/@descriptors.14/@actualFigure/@children.0"/>
+ </descriptors>
+ <descriptors
+ name="BorderedLabelFigure">
+ <actualFigure
+ xsi:type="gmfgraph:Rectangle"
+ name="LabelFigure"
+ fill="false">
+ <layout
+ xsi:type="gmfgraph:StackLayout"/>
+ <children
+ xsi:type="gmfgraph:Label"
+ name="BorderedLabelFigure_TextLabel"
+ text="&lt;&lt;Label>>"/>
+ </actualFigure>
+ <accessors
+ figure="//@figures.0/@descriptors.15/@actualFigure/@children.0"/>
+ </descriptors>
</figures>
<nodes
name="DiagramElementNode"
@@ -257,6 +290,24 @@
<nodes
name="PolygonNode"
figure="PolygonFigure"/>
+ <nodes
+ name="LabelNode"
+ figure="LabelFigure"
+ resizeConstraint="NONE">
+ <facets
+ xsi:type="gmfgraph:DefaultSizeFacet">
+ <defaultSize/>
+ </facets>
+ </nodes>
+ <nodes
+ name="BorderedLabelNode"
+ figure="BorderedLabelFigure"
+ resizeConstraint="NONE">
+ <facets
+ xsi:type="gmfgraph:DefaultSizeFacet">
+ <defaultSize/>
+ </facets>
+ </nodes>
<connections
name="FigureLink"
figure="FigureConnectionFigure"/>
@@ -293,4 +344,14 @@
name="FigureDescriptorNode_Name"
figure="FigureDescriptorFigure"
accessor="//@figures.0/@descriptors.1/@accessors.0"/>
+ <labels
+ name="LabelNode_Text"
+ figure="LabelFigure"
+ elementIcon="false"
+ accessor="//@figures.0/@descriptors.14/@accessors.0"/>
+ <labels
+ name="BorderedLabelNode_Text"
+ figure="BorderedLabelFigure"
+ elementIcon="false"
+ accessor="//@figures.0/@descriptors.15/@accessors.0"/>
</gmfgraph:Canvas>
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfmap b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfmap
index a29a3f29c..c87c88be0 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfmap
+++ b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfmap
@@ -35,6 +35,8 @@
<ownedChild>
<domainMetaElement
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Node"/>
+ <domainSpecialization
+ body="not self.oclIsKindOf(gmfgraph::DiagramLabel)"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
@@ -139,6 +141,11 @@
<containmentFeature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//FigureDescriptor/actualFigure"/>
</children>
+ <children
+ referencedChild="//@nodes.3/@ownedChild/@children.6/@ownedChild">
+ <containmentFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//FigureDescriptor/actualFigure"/>
+ </children>
</ownedChild>
</children>
<children
@@ -314,6 +321,29 @@
</children>
</ownedChild>
</children>
+ <children>
+ <containmentFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//RealFigure/children"/>
+ <ownedChild>
+ <domainMetaElement
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Label"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <diagramLabel
+ href="graphdef.gmfgraph#LabelNode_Text"/>
+ <features
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Label/text"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="graphdef.gmftool#//@palette/@tools.1/@tools.8"/>
+ <diagramNode
+ href="graphdef.gmfgraph#LabelNode"/>
+ </ownedChild>
+ </children>
</ownedChild>
</children>
<children
@@ -353,6 +383,11 @@
<containmentFeature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//RealFigure/children"/>
</children>
+ <children
+ referencedChild="//@nodes.3/@ownedChild/@children.1/@ownedChild/@children.5/@ownedChild">
+ <containmentFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//RealFigure/children"/>
+ </children>
</ownedChild>
</children>
<children
@@ -392,6 +427,11 @@
<containmentFeature
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//RealFigure/children"/>
</children>
+ <children
+ referencedChild="//@nodes.3/@ownedChild/@children.1/@ownedChild/@children.5/@ownedChild">
+ <containmentFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//RealFigure/children"/>
+ </children>
</ownedChild>
</children>
<children
@@ -442,13 +482,61 @@
</children>
</ownedChild>
</children>
+ <children
+ compartment="//@nodes.3/@ownedChild/@compartments.0">
+ <containmentFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//FigureGallery/figures"/>
+ <ownedChild>
+ <domainMetaElement
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Label"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <diagramLabel
+ href="graphdef.gmfgraph#BorderedLabelNode_Text"/>
+ <features
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Label/text"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="graphdef.gmftool#//@palette/@tools.1/@tools.8"/>
+ <diagramNode
+ href="graphdef.gmfgraph#BorderedLabelNode"/>
+ </ownedChild>
+ </children>
<compartments
- children="//@nodes.3/@ownedChild/@children.1 //@nodes.3/@ownedChild/@children.2 //@nodes.3/@ownedChild/@children.3 //@nodes.3/@ownedChild/@children.4 //@nodes.3/@ownedChild/@children.0 //@nodes.3/@ownedChild/@children.5">
+ children="//@nodes.3/@ownedChild/@children.1 //@nodes.3/@ownedChild/@children.2 //@nodes.3/@ownedChild/@children.3 //@nodes.3/@ownedChild/@children.4 //@nodes.3/@ownedChild/@children.0 //@nodes.3/@ownedChild/@children.5 //@nodes.3/@ownedChild/@children.6">
<compartment
href="graphdef.gmfgraph#Figures"/>
</compartments>
</ownedChild>
</nodes>
+ <nodes>
+ <containmentFeature
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Canvas/labels"/>
+ <ownedChild>
+ <domainMetaElement
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//DiagramLabel"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping">
+ <diagramLabel
+ href="graphdef.gmfgraph#DiagramElementNode_Name"/>
+ <features
+ href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Identity/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="graphdef.gmftool#//@palette/@tools.0/@tools.6"/>
+ <diagramNode
+ href="graphdef.gmfgraph#DiagramElementNode"/>
+ <compartments>
+ <compartment
+ href="graphdef.gmfgraph#VisualFacets"/>
+ </compartments>
+ </ownedChild>
+ </nodes>
<links>
<domainMetaElement
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//ChildAccess"/>
@@ -492,6 +580,10 @@
<linkMetaFeature
xsi:type="ecore:EReference"
href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Node/contentPane"/>
+ <creationConstraints>
+ <sourceEnd
+ body="not self.oclIsKindOf(gmfgraph::DiagramLabel)"/>
+ </creationConstraints>
</links>
<links>
<tool
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmftool b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmftool
index db1a18c50..3ed5ed1bb 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmftool
+++ b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmftool
@@ -50,6 +50,15 @@
xsi:type="gmftool:CreationTool"
title="Child Access Link"
description="Link from the Diagram Element to the structure subelement of its descriptor"/>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="Label"
+ description="Create Diagram Element representing Label">
+ <smallIcon
+ xsi:type="gmftool:DefaultImage"/>
+ <largeIcon
+ xsi:type="gmftool:DefaultImage"/>
+ </tools>
</tools>
<tools
xsi:type="gmftool:ToolGroup"
@@ -128,6 +137,15 @@
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="Label Figure"
+ description="Create new Label">
+ <smallIcon
+ xsi:type="gmftool:DefaultImage"/>
+ <largeIcon
+ xsi:type="gmftool:DefaultImage"/>
+ </tools>
</tools>
</palette>
</gmftool:ToolRegistry>
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.trace b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.trace
index d618c0d84..8cf1a1637 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.trace
+++ b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.trace
@@ -42,6 +42,16 @@
visualID="7008"
queryText="true"/>
</nodeTraces>
+ <nodeTraces
+ visualID="2009"
+ queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'DiagramLabel') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'Canvas') and _containmentMF_.name = 'labels')">
+ <nodeLabelTraces
+ visualID="5013"
+ queryText="true"/>
+ <compartmentTraces
+ visualID="7009"
+ queryText="true"/>
+ </nodeTraces>
<childNodeTraces
visualID="3009"
queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'FigureDescriptor') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'FigureGallery') and _containmentMF_.name = 'descriptors')">
@@ -97,6 +107,27 @@
<childNodeTraces
visualID="3025"
queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'Polygon') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'FigureGallery') and _containmentMF_.name = 'figures')"/>
+ <childNodeTraces
+ visualID="3026"
+ queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'Label') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'RealFigure') and _containmentMF_.name = 'children')">
+ <nodeLabelTraces
+ visualID="5010"
+ queryText="true"/>
+ </childNodeTraces>
+ <childNodeTraces
+ visualID="3027"
+ queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'Label') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'FigureDescriptor') and _containmentMF_.name = 'actualFigure')">
+ <nodeLabelTraces
+ visualID="5011"
+ queryText="true"/>
+ </childNodeTraces>
+ <childNodeTraces
+ visualID="3028"
+ queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'Label') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'FigureGallery') and _containmentMF_.name = 'figures')">
+ <nodeLabelTraces
+ visualID="5012"
+ queryText="true"/>
+ </childNodeTraces>
<linkTraces
visualID="4002"
queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/gmf/2006/GraphicalDefinition' and _eClass_.name = 'ChildAccess')"/>
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/plugin.properties b/plugins/org.eclipse.gmf.graphdef.editor/plugin.properties
index 1981c9902..50f9a6f04 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/plugin.properties
+++ b/plugins/org.eclipse.gmf.graphdef.editor/plugin.properties
@@ -91,4 +91,8 @@ tab.styles=Styles
metatype.name.Point_3022=Point
metatype.name.Polygon_3023=Polygon
metatype.name.Polygon_3024=Polygon
-metatype.name.Polygon_3025=Polygon \ No newline at end of file
+metatype.name.Polygon_3025=Polygon
+metatype.name.Label_3026=Label
+metatype.name.Label_3027=Label
+metatype.name.Label_3028=Label
+metatype.name.DiagramLabel_2009=DiagramLabel
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/plugin.xml b/plugins/org.eclipse.gmf.graphdef.editor/plugin.xml
index ee0b58519..6a3803817 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/plugin.xml
+++ b/plugins/org.eclipse.gmf.graphdef.editor/plugin.xml
@@ -389,6 +389,16 @@
</metamodel>
<metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
<metamodelType
+ id="org.eclipse.gmf.graphdef.editor.DiagramLabel_2009"
+ name="%metatype.name.DiagramLabel_2009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="DiagramLabel"
+ edithelper="org.eclipse.gmf.graphdef.editor.edit.helpers.DiagramLabelEditHelper">
+ <param name="semanticHint" value="2009"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
+ <metamodelType
id="org.eclipse.gmf.graphdef.editor.FigureDescriptor_3009"
name="%metatype.name.FigureDescriptor_3009"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
@@ -467,6 +477,16 @@
</metamodelType>
</metamodel>
<metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
+ <metamodelType
+ id="org.eclipse.gmf.graphdef.editor.Label_3026"
+ name="%metatype.name.Label_3026"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Label"
+ edithelper="org.eclipse.gmf.graphdef.editor.edit.helpers.LabelEditHelper">
+ <param name="semanticHint" value="3026"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
<specializationType
id="org.eclipse.gmf.graphdef.editor.Ellipse_3015"
name="%metatype.name.Ellipse_3015"
@@ -504,6 +524,15 @@
</metamodel>
<metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
<specializationType
+ id="org.eclipse.gmf.graphdef.editor.Label_3027"
+ name="%metatype.name.Label_3027"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.graphdef.editor.Label_3026"/>
+ <param name="semanticHint" value="3027"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
+ <specializationType
id="org.eclipse.gmf.graphdef.editor.Rectangle_3018"
name="%metatype.name.Rectangle_3018"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
@@ -548,6 +577,15 @@
</specializationType>
</metamodel>
<metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
+ <specializationType
+ id="org.eclipse.gmf.graphdef.editor.Label_3028"
+ name="%metatype.name.Label_3028"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.graphdef.editor.Label_3026"/>
+ <param name="semanticHint" value="3028"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
<metamodelType
id="org.eclipse.gmf.graphdef.editor.ChildAccess_4002"
name="%metatype.name.ChildAccess_4002"
@@ -610,6 +648,7 @@
<elementType ref="org.eclipse.gmf.graphdef.editor.Node_2006"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Connection_2007"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.FigureGallery_2008"/>
+ <elementType ref="org.eclipse.gmf.graphdef.editor.DiagramLabel_2009"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.FigureDescriptor_3009"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Rectangle_3010"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Rectangle_3011"/>
@@ -618,15 +657,18 @@
<elementType ref="org.eclipse.gmf.graphdef.editor.Polyline_3014"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Point_3022"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Polygon_3023"/>
+ <elementType ref="org.eclipse.gmf.graphdef.editor.Label_3026"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Ellipse_3015"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.RoundedRectangle_3016"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Polyline_3017"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Polygon_3024"/>
+ <elementType ref="org.eclipse.gmf.graphdef.editor.Label_3027"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Rectangle_3018"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Ellipse_3019"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.RoundedRectangle_3020"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Polyline_3021"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.Polygon_3025"/>
+ <elementType ref="org.eclipse.gmf.graphdef.editor.Label_3028"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.ChildAccess_4002"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.CompartmentAccessor_4003"/>
<elementType ref="org.eclipse.gmf.graphdef.editor.DiagramLabelAccessor_4004"/>
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src-extra/org/eclipse/gmf/graphdef/editor/edit/parts/AbstractFigureEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src-extra/org/eclipse/gmf/graphdef/editor/edit/parts/AbstractFigureEditPart.java
index a07eab1b6..ad08c9f2e 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src-extra/org/eclipse/gmf/graphdef/editor/edit/parts/AbstractFigureEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src-extra/org/eclipse/gmf/graphdef/editor/edit/parts/AbstractFigureEditPart.java
@@ -41,7 +41,6 @@ import org.eclipse.gmf.gmfgraph.LineKind;
import org.eclipse.gmf.gmfgraph.Point;
import org.eclipse.gmf.gmfgraph.RGBColor;
import org.eclipse.gmf.gmfgraph.RealFigure;
-import org.eclipse.gmf.gmfgraph.Shape;
import org.eclipse.gmf.gmfgraph.StackLayout;
import org.eclipse.gmf.gmfgraph.XYLayout;
import org.eclipse.gmf.gmfgraph.XYLayoutData;
@@ -158,11 +157,11 @@ public abstract class AbstractFigureEditPart extends ShapeNodeEditPart {
}
private Object getLayoutConstraint() {
- Shape shape = getShape();
- if (shape == null || shape.getLayoutData() == null) {
+ RealFigure realFigure = getRealFigure();
+ if (realFigure == null || realFigure.getLayoutData() == null) {
return null;
}
- LayoutData layoutData = shape.getLayoutData();
+ LayoutData layoutData = realFigure.getLayoutData();
switch (layoutData.eClass().getClassifierID()) {
case GMFGraphPackage.BORDER_LAYOUT_DATA: {
BorderLayoutData borderLayoutData = (BorderLayoutData) layoutData;
@@ -374,10 +373,10 @@ public abstract class AbstractFigureEditPart extends ShapeNodeEditPart {
handleMajorSemanticChange();
}
- protected Shape getShape() {
+ protected RealFigure getRealFigure() {
View view = getNotationView();
- if (view != null && view.getElement() instanceof Shape) {
- return (Shape) view.getElement();
+ if (view != null && view.getElement() instanceof RealFigure) {
+ return (RealFigure) view.getElement();
}
return null;
}
@@ -390,7 +389,7 @@ public abstract class AbstractFigureEditPart extends ShapeNodeEditPart {
* use getPrimaryShape().
*/
protected void refreshFont() {
- Font modelFont = getShape().getFont();
+ Font modelFont = getRealFigure().getFont();
if (modelFont instanceof BasicFont) {
BasicFont basicFont = (BasicFont) modelFont;
int fontStyle = SWT.NONE;
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/DiagramLabelCreateCommand.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/DiagramLabelCreateCommand.java
new file mode 100644
index 000000000..2e279aaf5
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/DiagramLabelCreateCommand.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.commands;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelCreateCommand extends CreateElementCommand {
+
+ /**
+ * @generated
+ */
+ public DiagramLabelCreateCommand(CreateElementRequest req) {
+ super(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ protected EClass getEClassToEdit() {
+ return GMFGraphPackage.eINSTANCE.getCanvas();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label2CreateCommand.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label2CreateCommand.java
new file mode 100644
index 000000000..c07d8ba6c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label2CreateCommand.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.commands;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.gmfgraph.FigureDescriptor;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Label2CreateCommand extends CreateElementCommand {
+
+ /**
+ * @generated
+ */
+ public Label2CreateCommand(CreateElementRequest req) {
+ super(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ FigureDescriptor container = (FigureDescriptor) getElementToEdit();
+ if (container.getActualFigure() != null) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ protected EClass getEClassToEdit() {
+ return GMFGraphPackage.eINSTANCE.getFigureDescriptor();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label3CreateCommand.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label3CreateCommand.java
new file mode 100644
index 000000000..c66aa36eb
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/Label3CreateCommand.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.commands;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Label3CreateCommand extends CreateElementCommand {
+
+ /**
+ * @generated
+ */
+ public Label3CreateCommand(CreateElementRequest req) {
+ super(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ protected EClass getEClassToEdit() {
+ return GMFGraphPackage.eINSTANCE.getFigureGallery();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/LabelCreateCommand.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/LabelCreateCommand.java
new file mode 100644
index 000000000..90b54cede
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/commands/LabelCreateCommand.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.commands;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class LabelCreateCommand extends CreateElementCommand {
+
+ /**
+ * @generated
+ */
+ public LabelCreateCommand(CreateElementRequest req) {
+ super(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ protected EClass getEClassToEdit() {
+ return GMFGraphPackage.eINSTANCE.getRealFigure();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/DiagramLabelEditHelper.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/DiagramLabelEditHelper.java
new file mode 100644
index 000000000..95e8d7d80
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/DiagramLabelEditHelper.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.helpers;
+
+/**
+ * @generated
+ */
+public class DiagramLabelEditHelper extends GMFGraphBaseEditHelper {
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/LabelEditHelper.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/LabelEditHelper.java
new file mode 100644
index 000000000..5630fab56
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/helpers/LabelEditHelper.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.helpers;
+
+/**
+ * @generated
+ */
+public class LabelEditHelper extends GMFGraphBaseEditHelper {
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelEditPart.java
new file mode 100644
index 000000000..58535fd51
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelEditPart.java
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.graphdef.editor.edit.policies.DiagramLabelItemSemanticEditPolicy;
+import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelEditPart extends ShapeNodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2009;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DiagramLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DiagramLabelItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+
+ ConstrainedToolbarLayoutEditPolicy lep = new ConstrainedToolbarLayoutEditPolicy() {
+
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null) {
+ if (child instanceof ITextAwareEditPart) {
+ return new GMFGraphTextSelectionEditPolicy();
+ }
+ }
+ return super.createChildEditPolicy(child);
+ }
+ };
+ return lep;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ DiagramElementFigure figure = new DiagramElementFigure();
+ return primaryShape = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public DiagramElementFigure getPrimaryShape() {
+ return (DiagramElementFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DiagramLabelNameEditPart) {
+ ((DiagramLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getFigureDiagramElementFigure_NameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+
+ return super.getContentPaneFor(editPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(getMapMode().DPtoLP(40), getMapMode().DPtoLP(40));
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ * @param nodeShape instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(getMapMode().DPtoLP(5));
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(DiagramLabelNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ if (event.getNotifier() == getModel() && EcorePackage.eINSTANCE.getEModelElement_EAnnotations().equals(event.getFeature())) {
+ handleMajorSemanticChange();
+ } else {
+ super.handleNotificationEvent(event);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public class DiagramElementFigure extends RectangleFigure {
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fFigureDiagramElementFigure_NameLabel;
+
+ /**
+ * @generated
+ */
+ public DiagramElementFigure() {
+
+ ToolbarLayout layoutThis = new ToolbarLayout();
+ layoutThis.setStretchMinorAxis(true);
+ layoutThis.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
+
+ layoutThis.setSpacing(0);
+ layoutThis.setVertical(true);
+
+ this.setLayoutManager(layoutThis);
+
+ createContents();
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents() {
+
+ fFigureDiagramElementFigure_NameLabel = new WrappingLabel();
+ fFigureDiagramElementFigure_NameLabel.setText("");
+
+ this.add(fFigureDiagramElementFigure_NameLabel);
+
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates() {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getFigureDiagramElementFigure_NameLabel() {
+ return fFigureDiagramElementFigure_NameLabel;
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelNameEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelNameEditPart.java
new file mode 100644
index 000000000..39d2daa83
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelNameEditPart.java
@@ -0,0 +1,551 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.NonResizableHandleKit;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphParserProvider;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class DiagramLabelNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5013;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public DiagramLabelNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
+
+ protected List createSelectionHandles() {
+ List handles = new ArrayList();
+ NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
+ return handles;
+ }
+
+ public Command getCommand(Request request) {
+ return null;
+ }
+
+ public boolean understandsRequest(Request request) {
+ return false;
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+ return GMFGraphElementTypes.getImage(parserElement.eClass());
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if (parser == null) {
+ String parserHint = ((View) getModel()).getType();
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.DiagramLabel_2009, getParserElement(), parserHint);
+ parser = ParserService.getInstance().getParser(hintAdapter);
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this), GMFGraphEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager().getClass() == TextDirectEditManager.class) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelVisualFacetsEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelVisualFacetsEditPart.java
new file mode 100644
index 000000000..ded349ca5
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/DiagramLabelVisualFacetsEditPart.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.graphdef.editor.edit.policies.DiagramLabelVisualFacetsItemSemanticEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.Messages;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelVisualFacetsEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7009;
+
+ /**
+ * @generated
+ */
+ public DiagramLabelVisualFacetsEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.DiagramLabelVisualFacetsEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DiagramLabelVisualFacetsItemSemanticEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ // nothing to do -- parent layout does not accept Double constraints as ratio
+ // super.setRatio(ratio);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java
index 3473e139d..9d88d4328 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java
@@ -65,6 +65,12 @@ public class GMFGraphEditPartFactory implements EditPartFactory {
case FigureGalleryNameEditPart.VISUAL_ID:
return new FigureGalleryNameEditPart(view);
+ case DiagramLabelEditPart.VISUAL_ID:
+ return new DiagramLabelEditPart(view);
+
+ case DiagramLabelNameEditPart.VISUAL_ID:
+ return new DiagramLabelNameEditPart(view);
+
case FigureDescriptorEditPart.VISUAL_ID:
return new FigureDescriptorEditPart(view);
@@ -92,6 +98,12 @@ public class GMFGraphEditPartFactory implements EditPartFactory {
case PolygonEditPart.VISUAL_ID:
return new PolygonEditPart(view);
+ case LabelEditPart.VISUAL_ID:
+ return new LabelEditPart(view);
+
+ case LabelTextEditPart.VISUAL_ID:
+ return new LabelTextEditPart(view);
+
case Ellipse2EditPart.VISUAL_ID:
return new Ellipse2EditPart(view);
@@ -104,6 +116,12 @@ public class GMFGraphEditPartFactory implements EditPartFactory {
case Polygon2EditPart.VISUAL_ID:
return new Polygon2EditPart(view);
+ case Label2EditPart.VISUAL_ID:
+ return new Label2EditPart(view);
+
+ case LabelText2EditPart.VISUAL_ID:
+ return new LabelText2EditPart(view);
+
case Rectangle3EditPart.VISUAL_ID:
return new Rectangle3EditPart(view);
@@ -119,6 +137,12 @@ public class GMFGraphEditPartFactory implements EditPartFactory {
case Polygon3EditPart.VISUAL_ID:
return new Polygon3EditPart(view);
+ case Label3EditPart.VISUAL_ID:
+ return new Label3EditPart(view);
+
+ case LabelText3EditPart.VISUAL_ID:
+ return new LabelText3EditPart(view);
+
case CompartmentVisualFacetsEditPart.VISUAL_ID:
return new CompartmentVisualFacetsEditPart(view);
@@ -131,6 +155,9 @@ public class GMFGraphEditPartFactory implements EditPartFactory {
case FigureGalleryFiguresEditPart.VISUAL_ID:
return new FigureGalleryFiguresEditPart(view);
+ case DiagramLabelVisualFacetsEditPart.VISUAL_ID:
+ return new DiagramLabelVisualFacetsEditPart(view);
+
case ChildAccessEditPart.VISUAL_ID:
return new ChildAccessEditPart(view);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label2EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label2EditPart.java
new file mode 100644
index 000000000..5790725b5
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label2EditPart.java
@@ -0,0 +1,386 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.ResizableEditPolicy;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.graphdef.editor.edit.policies.Label2ItemSemanticEditPolicy;
+import org.eclipse.gmf.graphdef.editor.edit.polocies.FigureContainerXYLayoutEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.graphdef.editor.sheet.AttachAdapter;
+import org.eclipse.gmf.graphdef.editor.sheet.ChangeTracker;
+import org.eclipse.gmf.graphdef.editor.sheet.FeatureTracker;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Label2EditPart extends AbstractFigureEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3027;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public Label2EditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Label2ItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ return new FigureContainerXYLayoutEditPolicy(getMapMode());
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ BorderedLabelFigure figure = new BorderedLabelFigure();
+ return primaryShape = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public BorderedLabelFigure getPrimaryShape() {
+ return (BorderedLabelFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof LabelText2EditPart) {
+ ((LabelText2EditPart) childEditPart).setLabel(getPrimaryShape().getFigureBorderedLabelFigure_TextLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+
+ return super.getContentPaneFor(editPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+ result.setMinimumSize(new Dimension(0, 0));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public EditPolicy getPrimaryDragEditPolicy() {
+ EditPolicy result = super.getPrimaryDragEditPolicy();
+ if (result instanceof ResizableEditPolicy) {
+ ResizableEditPolicy ep = (ResizableEditPolicy) result;
+ ep.setResizeDirections(PositionConstants.NONE);
+ }
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ * @param nodeShape instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(getMapMode().DPtoLP(5));
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(LabelText2EditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getFillStyle_FillColor().equals(feature)) {
+ return;
+ } else if (NotationPackage.eINSTANCE.getLineStyle_LineColor().equals(feature)) {
+ return;
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ public class BorderedLabelFigure extends RectangleFigure {
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fFigureBorderedLabelFigure_TextLabel;
+
+ /**
+ * @generated
+ */
+ public BorderedLabelFigure() {
+ this.setLayoutManager(new StackLayout());
+ this.setFill(false);
+ createContents();
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents() {
+
+ fFigureBorderedLabelFigure_TextLabel = new WrappingLabel();
+ fFigureBorderedLabelFigure_TextLabel.setText("<<Label>>");
+
+ this.add(fFigureBorderedLabelFigure_TextLabel);
+
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates() {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getFigureBorderedLabelFigure_TextLabel() {
+ return fFigureBorderedLabelFigure_TextLabel;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<Adapter> myDomainElementAdapters = new ArrayList<Adapter>();
+
+ /**
+ * @generated
+ */
+ private Label getGmfgraphElement() {
+ View view = getNotationView();
+ if (view == null) {
+ return null;
+ }
+ EObject element = view.getElement();
+ if (element instanceof Label) {
+ Label modelFigureElement = (Label) element;
+ return modelFigureElement;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ Label modelElement = getGmfgraphElement();
+ if (modelElement != null) {
+ modelElement.eAdapters().removeAll(myDomainElementAdapters);
+ myDomainElementAdapters.clear();
+ }
+ super.removeSemanticListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFigure(IFigure figure) {
+ super.setFigure(figure);
+ Label modelElement = getGmfgraphElement();
+ if (modelElement != null) {
+ getPrimaryShape().setBackgroundColor(getColor(modelElement.getBackgroundColor()));
+ getPrimaryShape().setForegroundColor(getColor(modelElement.getForegroundColor()));
+ refreshFont();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ if (isActive()) {
+ return;
+ }
+ final Label modelElement = getGmfgraphElement();
+ if (modelElement == null) {
+ super.activate();
+ return;
+ }
+
+ ChangeTracker backgroundColorTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ getPrimaryShape().setBackgroundColor(getColor(modelElement.getBackgroundColor()));
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor(), backgroundColorTracker, new FeatureTracker(backgroundColorTracker,
+ GMFGraphPackage.eINSTANCE.getConstantColor_Value()), new FeatureTracker(backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Red()), new FeatureTracker(
+ backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Green()), new FeatureTracker(backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Blue())));
+
+ ChangeTracker foregroundColorTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ getPrimaryShape().setForegroundColor(getColor(modelElement.getForegroundColor()));
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor(), foregroundColorTracker, new FeatureTracker(foregroundColorTracker,
+ GMFGraphPackage.eINSTANCE.getConstantColor_Value()), new FeatureTracker(foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Red()), new FeatureTracker(
+ foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Green()), new FeatureTracker(foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Blue())));
+
+ ChangeTracker refreshFontTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ refreshFont();
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_Font(), refreshFontTracker, new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE
+ .getBasicFont_FaceName()), new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE.getBasicFont_Height()), new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE
+ .getBasicFont_Style())));
+ modelElement.eAdapters().addAll(myDomainElementAdapters);
+ super.activate();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label3EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label3EditPart.java
new file mode 100644
index 000000000..1c336d6c7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Label3EditPart.java
@@ -0,0 +1,386 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.ResizableEditPolicy;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.graphdef.editor.edit.policies.Label3ItemSemanticEditPolicy;
+import org.eclipse.gmf.graphdef.editor.edit.polocies.FigureContainerXYLayoutEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.graphdef.editor.sheet.AttachAdapter;
+import org.eclipse.gmf.graphdef.editor.sheet.ChangeTracker;
+import org.eclipse.gmf.graphdef.editor.sheet.FeatureTracker;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Label3EditPart extends AbstractFigureEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3028;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public Label3EditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Label3ItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ return new FigureContainerXYLayoutEditPolicy(getMapMode());
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ BorderedLabelFigure figure = new BorderedLabelFigure();
+ return primaryShape = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public BorderedLabelFigure getPrimaryShape() {
+ return (BorderedLabelFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof LabelText3EditPart) {
+ ((LabelText3EditPart) childEditPart).setLabel(getPrimaryShape().getFigureBorderedLabelFigure_TextLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+
+ return super.getContentPaneFor(editPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+ result.setMinimumSize(new Dimension(0, 0));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public EditPolicy getPrimaryDragEditPolicy() {
+ EditPolicy result = super.getPrimaryDragEditPolicy();
+ if (result instanceof ResizableEditPolicy) {
+ ResizableEditPolicy ep = (ResizableEditPolicy) result;
+ ep.setResizeDirections(PositionConstants.NONE);
+ }
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ * @param nodeShape instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(getMapMode().DPtoLP(5));
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(LabelText3EditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getFillStyle_FillColor().equals(feature)) {
+ return;
+ } else if (NotationPackage.eINSTANCE.getLineStyle_LineColor().equals(feature)) {
+ return;
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ public class BorderedLabelFigure extends RectangleFigure {
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fFigureBorderedLabelFigure_TextLabel;
+
+ /**
+ * @generated
+ */
+ public BorderedLabelFigure() {
+ this.setLayoutManager(new StackLayout());
+ this.setFill(false);
+ createContents();
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents() {
+
+ fFigureBorderedLabelFigure_TextLabel = new WrappingLabel();
+ fFigureBorderedLabelFigure_TextLabel.setText("<<Label>>");
+
+ this.add(fFigureBorderedLabelFigure_TextLabel);
+
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates() {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getFigureBorderedLabelFigure_TextLabel() {
+ return fFigureBorderedLabelFigure_TextLabel;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<Adapter> myDomainElementAdapters = new ArrayList<Adapter>();
+
+ /**
+ * @generated
+ */
+ private Label getGmfgraphElement() {
+ View view = getNotationView();
+ if (view == null) {
+ return null;
+ }
+ EObject element = view.getElement();
+ if (element instanceof Label) {
+ Label modelFigureElement = (Label) element;
+ return modelFigureElement;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ Label modelElement = getGmfgraphElement();
+ if (modelElement != null) {
+ modelElement.eAdapters().removeAll(myDomainElementAdapters);
+ myDomainElementAdapters.clear();
+ }
+ super.removeSemanticListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFigure(IFigure figure) {
+ super.setFigure(figure);
+ Label modelElement = getGmfgraphElement();
+ if (modelElement != null) {
+ getPrimaryShape().setBackgroundColor(getColor(modelElement.getBackgroundColor()));
+ getPrimaryShape().setForegroundColor(getColor(modelElement.getForegroundColor()));
+ refreshFont();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ if (isActive()) {
+ return;
+ }
+ final Label modelElement = getGmfgraphElement();
+ if (modelElement == null) {
+ super.activate();
+ return;
+ }
+
+ ChangeTracker backgroundColorTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ getPrimaryShape().setBackgroundColor(getColor(modelElement.getBackgroundColor()));
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor(), backgroundColorTracker, new FeatureTracker(backgroundColorTracker,
+ GMFGraphPackage.eINSTANCE.getConstantColor_Value()), new FeatureTracker(backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Red()), new FeatureTracker(
+ backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Green()), new FeatureTracker(backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Blue())));
+
+ ChangeTracker foregroundColorTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ getPrimaryShape().setForegroundColor(getColor(modelElement.getForegroundColor()));
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor(), foregroundColorTracker, new FeatureTracker(foregroundColorTracker,
+ GMFGraphPackage.eINSTANCE.getConstantColor_Value()), new FeatureTracker(foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Red()), new FeatureTracker(
+ foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Green()), new FeatureTracker(foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Blue())));
+
+ ChangeTracker refreshFontTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ refreshFont();
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_Font(), refreshFontTracker, new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE
+ .getBasicFont_FaceName()), new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE.getBasicFont_Height()), new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE
+ .getBasicFont_Style())));
+ modelElement.eAdapters().addAll(myDomainElementAdapters);
+ super.activate();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelEditPart.java
new file mode 100644
index 000000000..0a8c95a19
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelEditPart.java
@@ -0,0 +1,443 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.Ellipse;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.RoundedRectangle;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.ResizableEditPolicy;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.graphdef.editor.edit.policies.LabelItemSemanticEditPolicy;
+import org.eclipse.gmf.graphdef.editor.edit.polocies.FigureContainerXYLayoutEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.graphdef.editor.sheet.AttachAdapter;
+import org.eclipse.gmf.graphdef.editor.sheet.ChangeTracker;
+import org.eclipse.gmf.graphdef.editor.sheet.FeatureTracker;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class LabelEditPart extends AbstractFigureEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3026;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public LabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LabelItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ return new FigureContainerXYLayoutEditPolicy(getMapMode());
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ LabelFigure figure = new LabelFigure();
+ return primaryShape = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public LabelFigure getPrimaryShape() {
+ return (LabelFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof LabelTextEditPart) {
+ ((LabelTextEditPart) childEditPart).setLabel(getPrimaryShape().getFigureLabelFigure_TextLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+
+ return super.getContentPaneFor(editPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+ result.setMinimumSize(new Dimension(0, 0));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public EditPolicy getPrimaryDragEditPolicy() {
+ EditPolicy result = super.getPrimaryDragEditPolicy();
+ if (result instanceof ResizableEditPolicy) {
+ ResizableEditPolicy ep = (ResizableEditPolicy) result;
+ ep.setResizeDirections(PositionConstants.NONE);
+ }
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ * @param nodeShape instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(getMapMode().DPtoLP(5));
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(LabelTextEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ return;
+ } else if (NotationPackage.eINSTANCE.getFillStyle_FillColor().equals(feature)) {
+ return;
+ } else if (NotationPackage.eINSTANCE.getLineStyle_LineColor().equals(feature)) {
+ return;
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ public class LabelFigure extends RectangleFigure {
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fFigureLabelFigure_TextLabel;
+
+ /**
+ * @generated
+ */
+ public LabelFigure() {
+ this.setLayoutManager(new StackLayout());
+ this.setFill(false);
+ this.setOutline(false);
+ createContents();
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents() {
+
+ fFigureLabelFigure_TextLabel = new WrappingLabel();
+ fFigureLabelFigure_TextLabel.setText("<<Label>>");
+
+ this.add(fFigureLabelFigure_TextLabel);
+
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates() {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getFigureLabelFigure_TextLabel() {
+ return fFigureLabelFigure_TextLabel;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<Adapter> myDomainElementAdapters = new ArrayList<Adapter>();
+
+ /**
+ * @generated
+ */
+ private Label getGmfgraphElement() {
+ View view = getNotationView();
+ if (view == null) {
+ return null;
+ }
+ EObject element = view.getElement();
+ if (element instanceof Label) {
+ Label modelFigureElement = (Label) element;
+ return modelFigureElement;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ Label modelElement = getGmfgraphElement();
+ if (modelElement != null) {
+ modelElement.eAdapters().removeAll(myDomainElementAdapters);
+ myDomainElementAdapters.clear();
+ }
+ super.removeSemanticListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFigure(IFigure figure) {
+ super.setFigure(figure);
+ Label modelElement = getGmfgraphElement();
+ if (modelElement != null) {
+ refreshBounds();
+ refreshLayoutData();
+ getPrimaryShape().setBackgroundColor(getColor(modelElement.getBackgroundColor()));
+ getPrimaryShape().setForegroundColor(getColor(modelElement.getForegroundColor()));
+ refreshFont();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ if (isActive()) {
+ return;
+ }
+ final Label modelElement = getGmfgraphElement();
+ if (modelElement == null) {
+ super.activate();
+ return;
+ }
+
+ ChangeTracker refreshBoundsTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ refreshBounds();
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_Location(), refreshBoundsTracker, new FeatureTracker(refreshBoundsTracker, GMFGraphPackage.eINSTANCE
+ .getPoint_X()), new FeatureTracker(refreshBoundsTracker, GMFGraphPackage.eINSTANCE.getPoint_Y())));
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_PreferredSize(), refreshBoundsTracker, new FeatureTracker(refreshBoundsTracker, GMFGraphPackage.eINSTANCE
+ .getDimension_Dx()), new FeatureTracker(refreshBoundsTracker, GMFGraphPackage.eINSTANCE.getDimension_Dy())));
+
+ ChangeTracker refreshLayoutDataTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ refreshLayoutData();
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getLayoutable_LayoutData(), refreshLayoutDataTracker, new AttachAdapter(GMFGraphPackage.eINSTANCE
+ .getXYLayoutData_TopLeft(), refreshLayoutDataTracker, new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getPoint_X()), new FeatureTracker(
+ refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getPoint_Y())), new AttachAdapter(GMFGraphPackage.eINSTANCE.getXYLayoutData_Size(), refreshLayoutDataTracker, new FeatureTracker(
+ refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getDimension_Dx()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getDimension_Dy())), new FeatureTracker(
+ refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getBorderLayoutData_Alignment()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE
+ .getBorderLayoutData_Vertical()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getGridLayoutData_GrabExcessHorizontalSpace()), new FeatureTracker(
+ refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getGridLayoutData_GrabExcessVerticalSpace()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE
+ .getGridLayoutData_VerticalAlignment()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getGridLayoutData_HorizontalAlignment()), new FeatureTracker(
+ refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getGridLayoutData_VerticalSpan()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE
+ .getGridLayoutData_HorizontalSpan()), new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getGridLayoutData_HorizontalIndent()), new AttachAdapter(
+ GMFGraphPackage.eINSTANCE.getGridLayoutData_SizeHint(), refreshLayoutDataTracker, new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getDimension_Dx()),
+ new FeatureTracker(refreshLayoutDataTracker, GMFGraphPackage.eINSTANCE.getDimension_Dy()))));
+
+ ChangeTracker backgroundColorTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ getPrimaryShape().setBackgroundColor(getColor(modelElement.getBackgroundColor()));
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor(), backgroundColorTracker, new FeatureTracker(backgroundColorTracker,
+ GMFGraphPackage.eINSTANCE.getConstantColor_Value()), new FeatureTracker(backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Red()), new FeatureTracker(
+ backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Green()), new FeatureTracker(backgroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Blue())));
+
+ ChangeTracker foregroundColorTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ getPrimaryShape().setForegroundColor(getColor(modelElement.getForegroundColor()));
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor(), foregroundColorTracker, new FeatureTracker(foregroundColorTracker,
+ GMFGraphPackage.eINSTANCE.getConstantColor_Value()), new FeatureTracker(foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Red()), new FeatureTracker(
+ foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Green()), new FeatureTracker(foregroundColorTracker, GMFGraphPackage.eINSTANCE.getRGBColor_Blue())));
+
+ ChangeTracker refreshFontTracker = new ChangeTracker() {
+
+ public void modelChanged(Notification msg) {
+ refreshFont();
+ }
+ };
+ myDomainElementAdapters.add(new AttachAdapter(GMFGraphPackage.eINSTANCE.getFigure_Font(), refreshFontTracker, new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE
+ .getBasicFont_FaceName()), new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE.getBasicFont_Height()), new FeatureTracker(refreshFontTracker, GMFGraphPackage.eINSTANCE
+ .getBasicFont_Style())));
+ modelElement.eAdapters().addAll(myDomainElementAdapters);
+ super.activate();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ Label modelElement = getGmfgraphElement();
+ if (modelElement == null) {
+ return;
+ }
+ if (modelElement.getPreferredSize() != null) {
+ getFigure().setPreferredSize(getDraw2dDimension(modelElement.getPreferredSize()));
+ }
+ if (modelElement.getLocation() != null) {
+ getFigure().setLocation(getDraw2DPoint(modelElement.getLocation()));
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText2EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText2EditPart.java
new file mode 100644
index 000000000..c8a5dca75
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText2EditPart.java
@@ -0,0 +1,547 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.NonResizableHandleKit;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphParserProvider;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class LabelText2EditPart extends CompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5011;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public LabelText2EditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
+
+ protected List createSelectionHandles() {
+ List handles = new ArrayList();
+ NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
+ return handles;
+ }
+
+ public Command getCommand(Request request) {
+ return null;
+ }
+
+ public boolean understandsRequest(Request request) {
+ return false;
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if (parser == null) {
+ String parserHint = ((View) getModel()).getType();
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.Label_3027, getParserElement(), parserHint);
+ parser = ParserService.getInstance().getParser(hintAdapter);
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this), GMFGraphEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager().getClass() == TextDirectEditManager.class) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText3EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText3EditPart.java
new file mode 100644
index 000000000..70aa6553f
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelText3EditPart.java
@@ -0,0 +1,547 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.NonResizableHandleKit;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphParserProvider;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class LabelText3EditPart extends CompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5012;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public LabelText3EditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
+
+ protected List createSelectionHandles() {
+ List handles = new ArrayList();
+ NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
+ return handles;
+ }
+
+ public Command getCommand(Request request) {
+ return null;
+ }
+
+ public boolean understandsRequest(Request request) {
+ return false;
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if (parser == null) {
+ String parserHint = ((View) getModel()).getType();
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.Label_3028, getParserElement(), parserHint);
+ parser = ParserService.getInstance().getParser(hintAdapter);
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this), GMFGraphEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager().getClass() == TextDirectEditManager.class) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelTextEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelTextEditPart.java
new file mode 100644
index 000000000..34f7c93d7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/LabelTextEditPart.java
@@ -0,0 +1,547 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.NonResizableHandleKit;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphParserProvider;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class LabelTextEditPart extends CompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5010;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public LabelTextEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
+
+ protected List createSelectionHandles() {
+ List handles = new ArrayList();
+ NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
+ return handles;
+ }
+
+ public Command getCommand(Request request) {
+ return null;
+ }
+
+ public boolean understandsRequest(Request request) {
+ return false;
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if (parser == null) {
+ String parserHint = ((View) getModel()).getType();
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.Label_3026, getParserElement(), parserHint);
+ parser = ParserService.getInstance().getParser(hintAdapter);
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this), GMFGraphEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager().getClass() == TextDirectEditManager.class) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof GMFGraphTextSelectionEditPolicy) {
+ ((GMFGraphTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java
index 81ab2f75a..e54ba590c 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java
@@ -29,11 +29,15 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.CanvasEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PointEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polygon2EditPart;
@@ -105,6 +109,7 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
case NodeEditPart.VISUAL_ID:
case ConnectionEditPart.VISUAL_ID:
case FigureGalleryEditPart.VISUAL_ID:
+ case DiagramLabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
@@ -129,6 +134,7 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
myFeaturesToSynchronize.add(GMFGraphPackage.eINSTANCE.getCanvas_Nodes());
myFeaturesToSynchronize.add(GMFGraphPackage.eINSTANCE.getCanvas_Connections());
myFeaturesToSynchronize.add(GMFGraphPackage.eINSTANCE.getCanvas_Figures());
+ myFeaturesToSynchronize.add(GMFGraphPackage.eINSTANCE.getCanvas_Labels());
}
return myFeaturesToSynchronize;
}
@@ -274,6 +280,15 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
}
break;
}
+ case DiagramLabelEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(GMFGraphDiagramUpdater.getDiagramLabel_2009ContainedLinks(view));
+ }
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
+ domain2NotationMap.put(view.getElement(), view);
+ }
+ break;
+ }
case FigureDescriptorEditPart.VISUAL_ID: {
if (!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(GMFGraphDiagramUpdater.getFigureDescriptor_3009ContainedLinks(view));
@@ -346,6 +361,15 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
}
break;
}
+ case LabelEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(GMFGraphDiagramUpdater.getLabel_3026ContainedLinks(view));
+ }
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
+ domain2NotationMap.put(view.getElement(), view);
+ }
+ break;
+ }
case Ellipse2EditPart.VISUAL_ID: {
if (!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(GMFGraphDiagramUpdater.getEllipse_3015ContainedLinks(view));
@@ -382,6 +406,15 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
}
break;
}
+ case Label2EditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(GMFGraphDiagramUpdater.getLabel_3027ContainedLinks(view));
+ }
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
+ domain2NotationMap.put(view.getElement(), view);
+ }
+ break;
+ }
case Rectangle3EditPart.VISUAL_ID: {
if (!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(GMFGraphDiagramUpdater.getRectangle_3018ContainedLinks(view));
@@ -427,6 +460,15 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
}
break;
}
+ case Label3EditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(GMFGraphDiagramUpdater.getLabel_3028ContainedLinks(view));
+ }
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
+ domain2NotationMap.put(view.getElement(), view);
+ }
+ break;
+ }
case ChildAccessEditPart.VISUAL_ID: {
if (!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(GMFGraphDiagramUpdater.getChildAccess_4002ContainedLinks(view));
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasItemSemanticEditPolicy.java
index e4013b0ed..ae6206c2b 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasItemSemanticEditPolicy.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.CompartmentCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ConnectionCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramLabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.FigureGalleryCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.NodeCreateCommand;
@@ -59,6 +60,12 @@ public class CanvasItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditPo
}
return getGEFWrapper(new FigureGalleryCreateCommand(req));
}
+ if (GMFGraphElementTypes.DiagramLabel_2009 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getCanvas_Labels());
+ }
+ return getGEFWrapper(new DiagramLabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelItemSemanticEditPolicy.java
new file mode 100644
index 000000000..d1f0932d3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelItemSemanticEditPolicy.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.policies;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramElementFigureCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramElementFigureReorientCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramLabelAccessorCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramLabelAccessorReorientCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.NodeContentPaneCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.NodeContentPaneReorientCommand;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramElementFigureEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelAccessorEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelVisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.NodeContentPaneEditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ CompoundCommand cc = getDestroyEdgesCommand();
+ addDestroyChildNodesCommand(cc);
+ addDestroyShortcutsCommand(cc);
+ View view = (View) getHost().getModel();
+ if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
+ req.setElementToDestroy(view);
+ }
+ cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+ return cc.unwrap();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addDestroyChildNodesCommand(CompoundCommand cmd) {
+ View view = (View) getHost().getModel();
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation != null) {
+ return;
+ }
+ for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
+ Node node = (Node) it.next();
+ switch (GMFGraphVisualIDRegistry.getVisualID(node)) {
+ case DiagramLabelVisualFacetsEditPart.VISUAL_ID:
+ for (Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (GMFGraphVisualIDRegistry.getVisualID(cnode)) {
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.DiagramLabelAccessor_4004 == req.getElementType()) {
+ return getGEFWrapper(new DiagramLabelAccessorCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (GMFGraphElementTypes.NodeContentPane_4006 == req.getElementType()) {
+ return getGEFWrapper(new NodeContentPaneCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (GMFGraphElementTypes.DiagramElementFigure_4005 == req.getElementType()) {
+ return getGEFWrapper(new DiagramElementFigureCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.DiagramLabelAccessor_4004 == req.getElementType()) {
+ return null;
+ }
+ if (GMFGraphElementTypes.NodeContentPane_4006 == req.getElementType()) {
+ return null;
+ }
+ if (GMFGraphElementTypes.DiagramElementFigure_4005 == req.getElementType()) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DiagramLabelAccessorEditPart.VISUAL_ID:
+ return getGEFWrapper(new DiagramLabelAccessorReorientCommand(req));
+ case NodeContentPaneEditPart.VISUAL_ID:
+ return getGEFWrapper(new NodeContentPaneReorientCommand(req));
+ case DiagramElementFigureEditPart.VISUAL_ID:
+ return getGEFWrapper(new DiagramElementFigureReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelVisualFacetsItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelVisualFacetsItemSemanticEditPolicy.java
new file mode 100644
index 000000000..36478ed91
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/DiagramLabelVisualFacetsItemSemanticEditPolicy.java
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.policies;
+
+/**
+ * @generated
+ */
+public class DiagramLabelVisualFacetsItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditPolicy {
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java
index 7d4b01b6a..906c95240 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class Ellipse2CanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2ItemSemanticEditPolicy.java
index 43d950ace..f8fdecbdf 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2ItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2ItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class Ellipse2ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEdit
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class Ellipse2ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEdit
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3CanonicalEditPolicy.java
index 21e052b22..92eebb2e7 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3CanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class Ellipse3CanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3ItemSemanticEditPolicy.java
index 66edb3792..673575ad3 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3ItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse3ItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class Ellipse3ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEdit
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class Ellipse3ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEdit
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java
index 58ddab309..413853c98 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class EllipseCanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseItemSemanticEditPolicy.java
index adb314075..83f838e04 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class EllipseItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditP
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class EllipseItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditP
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorCanonicalEditPolicy.java
index ce0d4747d..c45c137c9 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorCanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polygon2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart;
@@ -62,6 +63,7 @@ public class FigureDescriptorCanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangle2EditPart.VISUAL_ID:
case Polyline2EditPart.VISUAL_ID:
case Polygon2EditPart.VISUAL_ID:
+ case Label2EditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorItemSemanticEditPolicy.java
index 84eb244e9..a72fa5242 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureDescriptorItemSemanticEditPolicy.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramElementFigureCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.DiagramElementFigureReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Ellipse2CreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.Label2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Polygon2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Polyline2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RectangleCreateCommand;
@@ -28,6 +29,7 @@ import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangle2CreateComm
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramElementFigureEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polygon2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart;
@@ -82,6 +84,12 @@ public class FigureDescriptorItemSemanticEditPolicy extends GMFGraphBaseItemSema
}
return getGEFWrapper(new Polygon2CreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3027 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getFigureDescriptor_ActualFigure());
+ }
+ return getGEFWrapper(new Label2CreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -123,6 +131,9 @@ public class FigureDescriptorItemSemanticEditPolicy extends GMFGraphBaseItemSema
case Polygon2EditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case Label2EditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresCanonicalEditPolicy.java
index 8a24dc842..7fad60b11 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresCanonicalEditPolicy.java
@@ -20,6 +20,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polygon3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle3EditPart;
@@ -64,6 +65,7 @@ public class FigureGalleryFiguresCanonicalEditPolicy extends CanonicalEditPolicy
case RoundedRectangle3EditPart.VISUAL_ID:
case Polyline3EditPart.VISUAL_ID:
case Polygon3EditPart.VISUAL_ID:
+ case Label3EditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresItemSemanticEditPolicy.java
index 55d38ffb6..d4c970af4 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryFiguresItemSemanticEditPolicy.java
@@ -16,6 +16,7 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.Ellipse3CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.FigureDescriptorCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.Label3CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Polygon3CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Polyline3CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle3CreateCommand;
@@ -70,6 +71,12 @@ public class FigureGalleryFiguresItemSemanticEditPolicy extends GMFGraphBaseItem
}
return getGEFWrapper(new Polygon3CreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3028 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getFigureGallery_Figures());
+ }
+ return getGEFWrapper(new Label3CreateCommand(req));
+ }
return super.getCreateCommand(req);
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryItemSemanticEditPolicy.java
index 5cecf3e79..be72993eb 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGalleryItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryFiguresEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polygon3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle3EditPart;
@@ -82,6 +83,9 @@ public class FigureGalleryItemSemanticEditPolicy extends GMFGraphBaseItemSemanti
case Polygon3EditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(cnode));
break;
+ case Label3EditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(cnode));
+ break;
}
}
break;
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/GMFGraphBaseItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/GMFGraphBaseItemSemanticEditPolicy.java
index 7a51566f5..0285b44ed 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/GMFGraphBaseItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/GMFGraphBaseItemSemanticEditPolicy.java
@@ -13,6 +13,7 @@ package org.eclipse.gmf.graphdef.editor.edit.policies;
import java.util.Collections;
import java.util.Iterator;
+import java.util.Map;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
@@ -27,8 +28,12 @@ import org.eclipse.gmf.gmfgraph.DiagramElement;
import org.eclipse.gmf.gmfgraph.DiagramLabel;
import org.eclipse.gmf.gmfgraph.Figure;
import org.eclipse.gmf.gmfgraph.FigureDescriptor;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.gmfgraph.Node;
import org.eclipse.gmf.graphdef.editor.edit.helpers.GMFGraphBaseEditHelper;
+import org.eclipse.gmf.graphdef.editor.expressions.GMFGraphAbstractExpression;
+import org.eclipse.gmf.graphdef.editor.expressions.GMFGraphOCLFactory;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphDiagramEditorPlugin;
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
@@ -344,6 +349,11 @@ public class GMFGraphBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
+ private static GMFGraphAbstractExpression NodeContentPane_4006_SourceExpression;
+
+ /**
+ * @generated
+ */
public static boolean canCreateChildAccess_4002(FigureDescriptor source, Figure target) {
return canExistChildAccess_4002(source, target);
}
@@ -400,7 +410,6 @@ public class GMFGraphBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistChildAccess_4002(FigureDescriptor source, Figure target) {
-
return true;
}
@@ -408,7 +417,6 @@ public class GMFGraphBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistCompartmentAccessor_4003(Compartment source, ChildAccess target) {
-
return true;
}
@@ -416,7 +424,6 @@ public class GMFGraphBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistDiagramLabelAccessor_4004(DiagramLabel source, ChildAccess target) {
-
return true;
}
@@ -424,15 +431,29 @@ public class GMFGraphBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistNodeContentPane_4006(Node source, ChildAccess target) {
-
- return true;
+ try {
+ if (source == null) {
+ return true;
+ }
+ if (NodeContentPane_4006_SourceExpression == null) {
+ Map env = Collections.singletonMap(OPPOSITE_END_VAR, GMFGraphPackage.eINSTANCE.getChildAccess());
+ NodeContentPane_4006_SourceExpression = GMFGraphOCLFactory.getExpression("not self.oclIsKindOf(gmfgraph::DiagramLabel)", GMFGraphPackage.eINSTANCE.getNode(), env); //$NON-NLS-1$
+ }
+ Object sourceVal = NodeContentPane_4006_SourceExpression.evaluate(source, Collections.singletonMap(OPPOSITE_END_VAR, target));
+ if (false == sourceVal instanceof Boolean || !((Boolean) sourceVal).booleanValue()) {
+ return false;
+ } // else fall-through
+ return true;
+ } catch (Exception e) {
+ GMFGraphDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
+ return false;
+ }
}
/**
* @generated
*/
public static boolean canExistDiagramElementFigure_4005(DiagramElement source, FigureDescriptor target) {
-
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label2ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label2ItemSemanticEditPolicy.java
new file mode 100644
index 000000000..049d9f863
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label2ItemSemanticEditPolicy.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
+import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+
+/**
+ * @generated
+ */
+public class Label2ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ CompoundCommand cc = getDestroyEdgesCommand();
+ addDestroyShortcutsCommand(cc);
+ cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+ return cc.unwrap();
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.ChildAccess_4002 == req.getElementType()) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.ChildAccess_4002 == req.getElementType()) {
+ return getGEFWrapper(new ChildAccessCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case ChildAccessEditPart.VISUAL_ID:
+ return getGEFWrapper(new ChildAccessReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label3ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label3ItemSemanticEditPolicy.java
new file mode 100644
index 000000000..f62b4589c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Label3ItemSemanticEditPolicy.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
+import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+
+/**
+ * @generated
+ */
+public class Label3ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ CompoundCommand cc = getDestroyEdgesCommand();
+ addDestroyShortcutsCommand(cc);
+ cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+ return cc.unwrap();
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.ChildAccess_4002 == req.getElementType()) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.ChildAccess_4002 == req.getElementType()) {
+ return getGEFWrapper(new ChildAccessCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case ChildAccessEditPart.VISUAL_ID:
+ return getGEFWrapper(new ChildAccessReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/LabelItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/LabelItemSemanticEditPolicy.java
new file mode 100644
index 000000000..4d73dc801
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/LabelItemSemanticEditPolicy.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
+import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
+import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+
+/**
+ * @generated
+ */
+public class LabelItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ CompoundCommand cc = getDestroyEdgesCommand();
+ addDestroyShortcutsCommand(cc);
+ cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+ return cc.unwrap();
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.ChildAccess_4002 == req.getElementType()) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (GMFGraphElementTypes.ChildAccess_4002 == req.getElementType()) {
+ return getGEFWrapper(new ChildAccessCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case ChildAccessEditPart.VISUAL_ID:
+ return getGEFWrapper(new ChildAccessReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java
index a1ac66fc2..a9f4df0ae 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class Rectangle2CanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2ItemSemanticEditPolicy.java
index 88839b23a..e7c394551 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2ItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2ItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class Rectangle2ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEd
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class Rectangle2ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEd
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3CanonicalEditPolicy.java
index 1b65307b2..ebebaa1c2 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3CanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class Rectangle3CanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3ItemSemanticEditPolicy.java
index ebe48ba2b..6db71fb60 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3ItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle3ItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class Rectangle3ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEd
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class Rectangle3ItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEd
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java
index 5df1648ea..5cf5b76c2 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class RectangleCanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleItemSemanticEditPolicy.java
index df479a9ec..9b102f399 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class RectangleItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEdi
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class RectangleItemSemanticEditPolicy extends GMFGraphBaseItemSemanticEdi
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java
index 32f884c7d..b15f8e75b 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class RoundedRectangle2CanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2ItemSemanticEditPolicy.java
index 49cf4ac75..39a3e9a78 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2ItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2ItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class RoundedRectangle2ItemSemanticEditPolicy extends GMFGraphBaseItemSem
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class RoundedRectangle2ItemSemanticEditPolicy extends GMFGraphBaseItemSem
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3CanonicalEditPolicy.java
index dfa98d1a8..747c3b64d 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3CanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class RoundedRectangle3CanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3ItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3ItemSemanticEditPolicy.java
index 8defbd82e..882616e44 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3ItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle3ItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class RoundedRectangle3ItemSemanticEditPolicy extends GMFGraphBaseItemSem
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class RoundedRectangle3ItemSemanticEditPolicy extends GMFGraphBaseItemSem
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java
index 02643a3e4..d995ad31c 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -62,6 +63,7 @@ public class RoundedRectangleCanonicalEditPolicy extends CanonicalEditPolicy {
case RoundedRectangleEditPart.VISUAL_ID:
case PolylineEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
if (!semanticChildren.contains(view.getElement())) {
return true;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleItemSemanticEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleItemSemanticEditPolicy.java
index 104133cc8..0d2f41dce 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleItemSemanticEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleItemSemanticEditPolicy.java
@@ -19,12 +19,14 @@ import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.ChildAccessReorientCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.EllipseCreateCommand;
+import org.eclipse.gmf.graphdef.editor.edit.commands.LabelCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolygonCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.PolylineCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.Rectangle2CreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.commands.RoundedRectangleCreateCommand;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolygonEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
@@ -78,6 +80,12 @@ public class RoundedRectangleItemSemanticEditPolicy extends GMFGraphBaseItemSema
}
return getGEFWrapper(new PolygonCreateCommand(req));
}
+ if (GMFGraphElementTypes.Label_3026 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(GMFGraphPackage.eINSTANCE.getRealFigure_Children());
+ }
+ return getGEFWrapper(new LabelCreateCommand(req));
+ }
return super.getCreateCommand(req);
}
@@ -119,6 +127,9 @@ public class RoundedRectangleItemSemanticEditPolicy extends GMFGraphBaseItemSema
case PolygonEditPart.VISUAL_ID:
cmd.add(getDestroyElementCommand(node));
break;
+ case LabelEditPart.VISUAL_ID:
+ cmd.add(getDestroyElementCommand(node));
+ break;
}
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorContentProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorContentProvider.java
index 3a639e224..e6e93ecc1 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorContentProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorContentProvider.java
@@ -30,12 +30,16 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramElementFigureEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelAccessorEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryFiguresEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeContentPaneEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PointEditPart;
@@ -260,6 +264,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), FigureGalleryEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), DiagramLabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getDiagramLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
links.addChildren(createNavigatorItems(connectedViews, links, false));
connectedViews = getDiagramLinksByType(Collections.singleton(view), CompartmentAccessorEditPart.VISUAL_ID);
@@ -333,6 +339,24 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
connectedViews = getChildrenByType(Collections.singleton(view), FigureGalleryFiguresEditPart.VISUAL_ID);
connectedViews = getChildrenByType(connectedViews, Polygon3EditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), FigureGalleryFiguresEditPart.VISUAL_ID);
+ connectedViews = getChildrenByType(connectedViews, Label3EditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ return result.toArray();
+ }
+
+ case DiagramLabelEditPart.VISUAL_ID: {
+ Collection result = new ArrayList();
+ GMFGraphNavigatorGroup outgoinglinks = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_DiagramLabel_2009_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), DiagramLabelAccessorEditPart.VISUAL_ID);
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), NodeContentPaneEditPart.VISUAL_ID);
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), DiagramElementFigureEditPart.VISUAL_ID);
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
return result.toArray();
}
@@ -350,6 +374,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), Polygon2EditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), Label2EditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getOutgoingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
connectedViews = getIncomingLinksByType(Collections.singleton(view), DiagramElementFigureEditPart.VISUAL_ID);
@@ -376,6 +402,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -397,6 +425,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -418,6 +448,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -439,6 +471,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -473,6 +507,17 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
return result.toArray();
}
+ case LabelEditPart.VISUAL_ID: {
+ Collection result = new ArrayList();
+ GMFGraphNavigatorGroup incominglinks = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_Label_3026_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ return result.toArray();
+ }
+
case Ellipse2EditPart.VISUAL_ID: {
Collection result = new ArrayList();
GMFGraphNavigatorGroup incominglinks = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_Ellipse_3015_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
@@ -486,6 +531,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -507,6 +554,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -541,6 +590,17 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
return result.toArray();
}
+ case Label2EditPart.VISUAL_ID: {
+ Collection result = new ArrayList();
+ GMFGraphNavigatorGroup incominglinks = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_Label_3027_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ return result.toArray();
+ }
+
case Rectangle3EditPart.VISUAL_ID: {
Collection result = new ArrayList();
GMFGraphNavigatorGroup incominglinks = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_Rectangle_3018_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
@@ -554,6 +614,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -575,6 +637,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -596,6 +660,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
if (!incominglinks.isEmpty()) {
@@ -630,6 +696,17 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
return result.toArray();
}
+ case Label3EditPart.VISUAL_ID: {
+ Collection result = new ArrayList();
+ GMFGraphNavigatorGroup incominglinks = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_Label_3028_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), ChildAccessEditPart.VISUAL_ID);
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ return result.toArray();
+ }
+
case ChildAccessEditPart.VISUAL_ID: {
Collection result = new ArrayList();
GMFGraphNavigatorGroup target = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_ChildAccess_4002_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
@@ -646,6 +723,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), PolygonEditPart.VISUAL_ID);
target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksTargetByType(Collections.singleton(view), LabelEditPart.VISUAL_ID);
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), Ellipse2EditPart.VISUAL_ID);
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), RoundedRectangle2EditPart.VISUAL_ID);
@@ -654,6 +733,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), Polygon2EditPart.VISUAL_ID);
target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksTargetByType(Collections.singleton(view), Label2EditPart.VISUAL_ID);
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), Rectangle3EditPart.VISUAL_ID);
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), Ellipse3EditPart.VISUAL_ID);
@@ -664,6 +745,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view), Polygon3EditPart.VISUAL_ID);
target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksTargetByType(Collections.singleton(view), Label3EditPart.VISUAL_ID);
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksSourceByType(Collections.singleton(view), FigureDescriptorEditPart.VISUAL_ID);
source.addChildren(createNavigatorItems(connectedViews, source, true));
if (!target.isEmpty()) {
@@ -686,11 +769,24 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
return result.toArray();
}
+ case DiagramLabelAccessorEditPart.VISUAL_ID: {
+ Collection result = new ArrayList();
+ GMFGraphNavigatorGroup source = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_DiagramLabelAccessor_4004_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(view), DiagramLabelEditPart.VISUAL_ID);
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
+ if (!source.isEmpty()) {
+ result.add(source);
+ }
+ return result.toArray();
+ }
+
case NodeContentPaneEditPart.VISUAL_ID: {
Collection result = new ArrayList();
GMFGraphNavigatorGroup source = new GMFGraphNavigatorGroup(Messages.NavigatorGroupName_NodeContentPane_4006_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection connectedViews = getLinksSourceByType(Collections.singleton(view), NodeEditPart.VISUAL_ID);
source.addChildren(createNavigatorItems(connectedViews, source, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), DiagramLabelEditPart.VISUAL_ID);
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
if (!source.isEmpty()) {
result.add(source);
}
@@ -709,6 +805,8 @@ public class GMFGraphNavigatorContentProvider implements ICommonContentProvider
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view), ConnectionEditPart.VISUAL_ID);
source.addChildren(createNavigatorItems(connectedViews, source, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), DiagramLabelEditPart.VISUAL_ID);
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
if (!target.isEmpty()) {
result.add(target);
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorLabelProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorLabelProvider.java
index 85bbb18ae..bf4e1d700 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorLabelProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorLabelProvider.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.gmf.gmfgraph.Canvas;
import org.eclipse.gmf.gmfgraph.ChildAccess;
import org.eclipse.gmf.gmfgraph.Ellipse;
+import org.eclipse.gmf.gmfgraph.Label;
import org.eclipse.gmf.gmfgraph.Point;
import org.eclipse.gmf.gmfgraph.Polygon;
import org.eclipse.gmf.gmfgraph.Polyline;
@@ -28,6 +29,8 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramElementFigureEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelAccessorEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
@@ -35,6 +38,12 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelTextEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeContentPaneEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeNameEditPart;
@@ -139,6 +148,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getImage("Navigator?TopLevelNode?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Connection", GMFGraphElementTypes.Connection_2007); //$NON-NLS-1$
case FigureGalleryEditPart.VISUAL_ID:
return getImage("Navigator?TopLevelNode?http://www.eclipse.org/gmf/2006/GraphicalDefinition?FigureGallery", GMFGraphElementTypes.FigureGallery_2008); //$NON-NLS-1$
+ case DiagramLabelEditPart.VISUAL_ID:
+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/gmf/2006/GraphicalDefinition?DiagramLabel", GMFGraphElementTypes.DiagramLabel_2009); //$NON-NLS-1$
case FigureDescriptorEditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?FigureDescriptor", GMFGraphElementTypes.FigureDescriptor_3009); //$NON-NLS-1$
case RectangleEditPart.VISUAL_ID:
@@ -155,6 +166,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Point", GMFGraphElementTypes.Point_3022); //$NON-NLS-1$
case PolygonEditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Polygon", GMFGraphElementTypes.Polygon_3023); //$NON-NLS-1$
+ case LabelEditPart.VISUAL_ID:
+ return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Label", GMFGraphElementTypes.Label_3026); //$NON-NLS-1$
case Ellipse2EditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Ellipse", GMFGraphElementTypes.Ellipse_3015); //$NON-NLS-1$
case RoundedRectangle2EditPart.VISUAL_ID:
@@ -163,6 +176,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Polyline", GMFGraphElementTypes.Polyline_3017); //$NON-NLS-1$
case Polygon2EditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Polygon", GMFGraphElementTypes.Polygon_3024); //$NON-NLS-1$
+ case Label2EditPart.VISUAL_ID:
+ return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Label", GMFGraphElementTypes.Label_3027); //$NON-NLS-1$
case Rectangle3EditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Rectangle", GMFGraphElementTypes.Rectangle_3018); //$NON-NLS-1$
case Ellipse3EditPart.VISUAL_ID:
@@ -173,6 +188,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Polyline", GMFGraphElementTypes.Polyline_3021); //$NON-NLS-1$
case Polygon3EditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Polygon", GMFGraphElementTypes.Polygon_3025); //$NON-NLS-1$
+ case Label3EditPart.VISUAL_ID:
+ return getImage("Navigator?Node?http://www.eclipse.org/gmf/2006/GraphicalDefinition?Label", GMFGraphElementTypes.Label_3028); //$NON-NLS-1$
case ChildAccessEditPart.VISUAL_ID:
return getImage("Navigator?Link?http://www.eclipse.org/gmf/2006/GraphicalDefinition?ChildAccess", GMFGraphElementTypes.ChildAccess_4002); //$NON-NLS-1$
case CompartmentAccessorEditPart.VISUAL_ID:
@@ -251,6 +268,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getConnection_2007Text(view);
case FigureGalleryEditPart.VISUAL_ID:
return getFigureGallery_2008Text(view);
+ case DiagramLabelEditPart.VISUAL_ID:
+ return getDiagramLabel_2009Text(view);
case FigureDescriptorEditPart.VISUAL_ID:
return getFigureDescriptor_3009Text(view);
case RectangleEditPart.VISUAL_ID:
@@ -267,6 +286,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getPoint_3022Text(view);
case PolygonEditPart.VISUAL_ID:
return getPolygon_3023Text(view);
+ case LabelEditPart.VISUAL_ID:
+ return getLabel_3026Text(view);
case Ellipse2EditPart.VISUAL_ID:
return getEllipse_3015Text(view);
case RoundedRectangle2EditPart.VISUAL_ID:
@@ -275,6 +296,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getPolyline_3017Text(view);
case Polygon2EditPart.VISUAL_ID:
return getPolygon_3024Text(view);
+ case Label2EditPart.VISUAL_ID:
+ return getLabel_3027Text(view);
case Rectangle3EditPart.VISUAL_ID:
return getRectangle_3018Text(view);
case Ellipse3EditPart.VISUAL_ID:
@@ -285,6 +308,8 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
return getPolyline_3021Text(view);
case Polygon3EditPart.VISUAL_ID:
return getPolygon_3025Text(view);
+ case Label3EditPart.VISUAL_ID:
+ return getLabel_3028Text(view);
case ChildAccessEditPart.VISUAL_ID:
return getChildAccess_4002Text(view);
case CompartmentAccessorEditPart.VISUAL_ID:
@@ -370,6 +395,23 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
/**
* @generated
*/
+ private String getDiagramLabel_2009Text(View view) {
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.DiagramLabel_2009, (view.getElement() != null ? view.getElement() : view), GMFGraphVisualIDRegistry
+ .getType(DiagramLabelNameEditPart.VISUAL_ID));
+ IParser parser = ParserService.getInstance().getParser(hintAdapter);
+
+ if (parser != null) {
+ return parser.getPrintString(hintAdapter, ParserOptions.NONE.intValue());
+ } else {
+ GMFGraphDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5013); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * @generated
+ */
private String getFigureDescriptor_3009Text(View view) {
IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.FigureDescriptor_3009, (view.getElement() != null ? view.getElement() : view), GMFGraphVisualIDRegistry
.getType(FigureDescriptorNameEditPart.VISUAL_ID));
@@ -478,6 +520,23 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
/**
* @generated
*/
+ private String getLabel_3026Text(View view) {
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.Label_3026, (view.getElement() != null ? view.getElement() : view), GMFGraphVisualIDRegistry
+ .getType(LabelTextEditPart.VISUAL_ID));
+ IParser parser = ParserService.getInstance().getParser(hintAdapter);
+
+ if (parser != null) {
+ return parser.getPrintString(hintAdapter, ParserOptions.NONE.intValue());
+ } else {
+ GMFGraphDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5010); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * @generated
+ */
private String getEllipse_3015Text(View view) {
Ellipse domainModelElement = (Ellipse) view.getElement();
if (domainModelElement != null) {
@@ -530,6 +589,23 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
/**
* @generated
*/
+ private String getLabel_3027Text(View view) {
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.Label_3027, (view.getElement() != null ? view.getElement() : view), GMFGraphVisualIDRegistry
+ .getType(LabelText2EditPart.VISUAL_ID));
+ IParser parser = ParserService.getInstance().getParser(hintAdapter);
+
+ if (parser != null) {
+ return parser.getPrintString(hintAdapter, ParserOptions.NONE.intValue());
+ } else {
+ GMFGraphDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5011); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * @generated
+ */
private String getRectangle_3018Text(View view) {
Rectangle domainModelElement = (Rectangle) view.getElement();
if (domainModelElement != null) {
@@ -595,6 +671,23 @@ public class GMFGraphNavigatorLabelProvider extends LabelProvider implements ICo
/**
* @generated
*/
+ private String getLabel_3028Text(View view) {
+ IAdaptable hintAdapter = new GMFGraphParserProvider.HintAdapter(GMFGraphElementTypes.Label_3028, (view.getElement() != null ? view.getElement() : view), GMFGraphVisualIDRegistry
+ .getType(LabelText3EditPart.VISUAL_ID));
+ IParser parser = ParserService.getInstance().getParser(hintAdapter);
+
+ if (parser != null) {
+ return parser.getPrintString(hintAdapter, ParserOptions.NONE.intValue());
+ } else {
+ GMFGraphDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5012); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * @generated
+ */
private String getCanvas_1000Text(View view) {
Canvas domainModelElement = (Canvas) view.getElement();
if (domainModelElement != null) {
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorSorter.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorSorter.java
index d7382db60..aa29715b2 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorSorter.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/navigator/GMFGraphNavigatorSorter.java
@@ -22,12 +22,12 @@ public class GMFGraphNavigatorSorter extends ViewerSorter {
/**
* @generated
*/
- private static final int GROUP_CATEGORY = 7010;
+ private static final int GROUP_CATEGORY = 7011;
/**
* @generated
*/
- private static final int SHORTCUTS_CATEGORY = 7009;
+ private static final int SHORTCUTS_CATEGORY = 7010;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/parsers/RegexpParser.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/parsers/RegexpParser.java
new file mode 100644
index 000000000..8a23415fe
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/parsers/RegexpParser.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.parsers;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+
+/**
+ * @generated
+ */
+public class RegexpParser extends AbstractParser {
+
+ /**
+ * @generated
+ */
+ public RegexpParser(EAttribute[] features) {
+ super(features);
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditPattern() {
+ String pattern = super.getEditPattern();
+ return pattern != null ? pattern : " "; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ public String getPrintString(IAdaptable adapter, int flags) {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditString(IAdaptable adapter, int flags) {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
+ if (editString == null) {
+ return ParserEditStatus.UNEDITABLE_STATUS;
+ }
+ Object[] values = editString.split(getEditPattern());
+ return validateNewValues(values);
+ }
+
+ /**
+ * @generated
+ */
+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
+ if (newString == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ Object[] values = newString.split(getEditPattern());
+ return super.getParseCommand(adapter, values, flags);
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDiagramUpdater.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDiagramUpdater.java
index d851fa156..f8b449527 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDiagramUpdater.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDiagramUpdater.java
@@ -25,11 +25,13 @@ import org.eclipse.gmf.gmfgraph.ChildAccess;
import org.eclipse.gmf.gmfgraph.Compartment;
import org.eclipse.gmf.gmfgraph.Connection;
import org.eclipse.gmf.gmfgraph.DiagramElement;
+import org.eclipse.gmf.gmfgraph.DiagramLabel;
import org.eclipse.gmf.gmfgraph.Ellipse;
import org.eclipse.gmf.gmfgraph.Figure;
import org.eclipse.gmf.gmfgraph.FigureDescriptor;
import org.eclipse.gmf.gmfgraph.FigureGallery;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.Label;
import org.eclipse.gmf.gmfgraph.Node;
import org.eclipse.gmf.gmfgraph.Point;
import org.eclipse.gmf.gmfgraph.Polygon;
@@ -44,12 +46,16 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramElementFigureEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelAccessorEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryFiguresEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeContentPaneEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.PointEditPart;
@@ -152,6 +158,9 @@ public class GMFGraphDiagramUpdater {
if (visualID == Polygon2EditPart.VISUAL_ID) {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
}
+ if (visualID == Label2EditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ }
}
return result;
}
@@ -188,6 +197,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -224,6 +237,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -260,6 +277,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -296,6 +317,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -372,6 +397,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -408,6 +437,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -484,6 +517,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -520,6 +557,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -556,6 +597,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == LabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -644,6 +689,10 @@ public class GMFGraphDiagramUpdater {
result.add(new GMFGraphNodeDescriptor(childElement, visualID));
continue;
}
+ if (visualID == Label3EditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -689,6 +738,14 @@ public class GMFGraphDiagramUpdater {
continue;
}
}
+ for (Iterator it = modelElement.getLabels().iterator(); it.hasNext();) {
+ DiagramLabel childElement = (DiagramLabel) it.next();
+ int visualID = GMFGraphVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == DiagramLabelEditPart.VISUAL_ID) {
+ result.add(new GMFGraphNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
return result;
}
@@ -707,6 +764,8 @@ public class GMFGraphDiagramUpdater {
return getConnection_2007ContainedLinks(view);
case FigureGalleryEditPart.VISUAL_ID:
return getFigureGallery_2008ContainedLinks(view);
+ case DiagramLabelEditPart.VISUAL_ID:
+ return getDiagramLabel_2009ContainedLinks(view);
case FigureDescriptorEditPart.VISUAL_ID:
return getFigureDescriptor_3009ContainedLinks(view);
case RectangleEditPart.VISUAL_ID:
@@ -723,6 +782,8 @@ public class GMFGraphDiagramUpdater {
return getPoint_3022ContainedLinks(view);
case PolygonEditPart.VISUAL_ID:
return getPolygon_3023ContainedLinks(view);
+ case LabelEditPart.VISUAL_ID:
+ return getLabel_3026ContainedLinks(view);
case Ellipse2EditPart.VISUAL_ID:
return getEllipse_3015ContainedLinks(view);
case RoundedRectangle2EditPart.VISUAL_ID:
@@ -731,6 +792,8 @@ public class GMFGraphDiagramUpdater {
return getPolyline_3017ContainedLinks(view);
case Polygon2EditPart.VISUAL_ID:
return getPolygon_3024ContainedLinks(view);
+ case Label2EditPart.VISUAL_ID:
+ return getLabel_3027ContainedLinks(view);
case Rectangle3EditPart.VISUAL_ID:
return getRectangle_3018ContainedLinks(view);
case Ellipse3EditPart.VISUAL_ID:
@@ -741,6 +804,8 @@ public class GMFGraphDiagramUpdater {
return getPolyline_3021ContainedLinks(view);
case Polygon3EditPart.VISUAL_ID:
return getPolygon_3025ContainedLinks(view);
+ case Label3EditPart.VISUAL_ID:
+ return getLabel_3028ContainedLinks(view);
case ChildAccessEditPart.VISUAL_ID:
return getChildAccess_4002ContainedLinks(view);
}
@@ -760,6 +825,8 @@ public class GMFGraphDiagramUpdater {
return getConnection_2007IncomingLinks(view);
case FigureGalleryEditPart.VISUAL_ID:
return getFigureGallery_2008IncomingLinks(view);
+ case DiagramLabelEditPart.VISUAL_ID:
+ return getDiagramLabel_2009IncomingLinks(view);
case FigureDescriptorEditPart.VISUAL_ID:
return getFigureDescriptor_3009IncomingLinks(view);
case RectangleEditPart.VISUAL_ID:
@@ -776,6 +843,8 @@ public class GMFGraphDiagramUpdater {
return getPoint_3022IncomingLinks(view);
case PolygonEditPart.VISUAL_ID:
return getPolygon_3023IncomingLinks(view);
+ case LabelEditPart.VISUAL_ID:
+ return getLabel_3026IncomingLinks(view);
case Ellipse2EditPart.VISUAL_ID:
return getEllipse_3015IncomingLinks(view);
case RoundedRectangle2EditPart.VISUAL_ID:
@@ -784,6 +853,8 @@ public class GMFGraphDiagramUpdater {
return getPolyline_3017IncomingLinks(view);
case Polygon2EditPart.VISUAL_ID:
return getPolygon_3024IncomingLinks(view);
+ case Label2EditPart.VISUAL_ID:
+ return getLabel_3027IncomingLinks(view);
case Rectangle3EditPart.VISUAL_ID:
return getRectangle_3018IncomingLinks(view);
case Ellipse3EditPart.VISUAL_ID:
@@ -794,6 +865,8 @@ public class GMFGraphDiagramUpdater {
return getPolyline_3021IncomingLinks(view);
case Polygon3EditPart.VISUAL_ID:
return getPolygon_3025IncomingLinks(view);
+ case Label3EditPart.VISUAL_ID:
+ return getLabel_3028IncomingLinks(view);
case ChildAccessEditPart.VISUAL_ID:
return getChildAccess_4002IncomingLinks(view);
}
@@ -813,6 +886,8 @@ public class GMFGraphDiagramUpdater {
return getConnection_2007OutgoingLinks(view);
case FigureGalleryEditPart.VISUAL_ID:
return getFigureGallery_2008OutgoingLinks(view);
+ case DiagramLabelEditPart.VISUAL_ID:
+ return getDiagramLabel_2009OutgoingLinks(view);
case FigureDescriptorEditPart.VISUAL_ID:
return getFigureDescriptor_3009OutgoingLinks(view);
case RectangleEditPart.VISUAL_ID:
@@ -829,6 +904,8 @@ public class GMFGraphDiagramUpdater {
return getPoint_3022OutgoingLinks(view);
case PolygonEditPart.VISUAL_ID:
return getPolygon_3023OutgoingLinks(view);
+ case LabelEditPart.VISUAL_ID:
+ return getLabel_3026OutgoingLinks(view);
case Ellipse2EditPart.VISUAL_ID:
return getEllipse_3015OutgoingLinks(view);
case RoundedRectangle2EditPart.VISUAL_ID:
@@ -837,6 +914,8 @@ public class GMFGraphDiagramUpdater {
return getPolyline_3017OutgoingLinks(view);
case Polygon2EditPart.VISUAL_ID:
return getPolygon_3024OutgoingLinks(view);
+ case Label2EditPart.VISUAL_ID:
+ return getLabel_3027OutgoingLinks(view);
case Rectangle3EditPart.VISUAL_ID:
return getRectangle_3018OutgoingLinks(view);
case Ellipse3EditPart.VISUAL_ID:
@@ -847,6 +926,8 @@ public class GMFGraphDiagramUpdater {
return getPolyline_3021OutgoingLinks(view);
case Polygon3EditPart.VISUAL_ID:
return getPolygon_3025OutgoingLinks(view);
+ case Label3EditPart.VISUAL_ID:
+ return getLabel_3028OutgoingLinks(view);
case ChildAccessEditPart.VISUAL_ID:
return getChildAccess_4002OutgoingLinks(view);
}
@@ -902,6 +983,18 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getDiagramLabel_2009ContainedLinks(View view) {
+ DiagramLabel modelElement = (DiagramLabel) view.getElement();
+ List result = new LinkedList();
+ result.addAll(getOutgoingFeatureModelFacetLinks_DiagramLabel_Accessor_4004(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Node_ContentPane_4006(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_DiagramElement_Figure_4005(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List getFigureDescriptor_3009ContainedLinks(View view) {
FigureDescriptor modelElement = (FigureDescriptor) view.getElement();
List result = new LinkedList();
@@ -961,6 +1054,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3026ContainedLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getEllipse_3015ContainedLinks(View view) {
return Collections.EMPTY_LIST;
}
@@ -989,6 +1089,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3027ContainedLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getRectangle_3018ContainedLinks(View view) {
return Collections.EMPTY_LIST;
}
@@ -1024,6 +1131,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3028ContainedLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getChildAccess_4002ContainedLinks(View view) {
return Collections.EMPTY_LIST;
}
@@ -1059,6 +1173,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getDiagramLabel_2009IncomingLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getFigureDescriptor_3009IncomingLinks(View view) {
FigureDescriptor modelElement = (FigureDescriptor) view.getElement();
Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
@@ -1143,6 +1264,17 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3026IncomingLinks(View view) {
+ Label modelElement = (Label) view.getElement();
+ Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ List result = new LinkedList();
+ result.addAll(getIncomingTypeModelFacetLinks_ChildAccess_4002(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List getEllipse_3015IncomingLinks(View view) {
Ellipse modelElement = (Ellipse) view.getElement();
Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
@@ -1187,6 +1319,17 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3027IncomingLinks(View view) {
+ Label modelElement = (Label) view.getElement();
+ Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ List result = new LinkedList();
+ result.addAll(getIncomingTypeModelFacetLinks_ChildAccess_4002(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List getRectangle_3018IncomingLinks(View view) {
Rectangle modelElement = (Rectangle) view.getElement();
Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
@@ -1242,6 +1385,17 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3028IncomingLinks(View view) {
+ Label modelElement = (Label) view.getElement();
+ Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ List result = new LinkedList();
+ result.addAll(getIncomingTypeModelFacetLinks_ChildAccess_4002(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List getChildAccess_4002IncomingLinks(View view) {
ChildAccess modelElement = (ChildAccess) view.getElement();
Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
@@ -1294,6 +1448,18 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getDiagramLabel_2009OutgoingLinks(View view) {
+ DiagramLabel modelElement = (DiagramLabel) view.getElement();
+ List result = new LinkedList();
+ result.addAll(getOutgoingFeatureModelFacetLinks_DiagramLabel_Accessor_4004(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Node_ContentPane_4006(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_DiagramElement_Figure_4005(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List getFigureDescriptor_3009OutgoingLinks(View view) {
FigureDescriptor modelElement = (FigureDescriptor) view.getElement();
List result = new LinkedList();
@@ -1353,6 +1519,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3026OutgoingLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getEllipse_3015OutgoingLinks(View view) {
return Collections.EMPTY_LIST;
}
@@ -1381,6 +1554,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3027OutgoingLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getRectangle_3018OutgoingLinks(View view) {
return Collections.EMPTY_LIST;
}
@@ -1416,6 +1596,13 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ public static List getLabel_3028OutgoingLinks(View view) {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
public static List getChildAccess_4002OutgoingLinks(View view) {
return Collections.EMPTY_LIST;
}
@@ -1541,6 +1728,19 @@ public class GMFGraphDiagramUpdater {
/**
* @generated
*/
+ private static Collection getOutgoingFeatureModelFacetLinks_DiagramLabel_Accessor_4004(DiagramLabel source) {
+ Collection result = new LinkedList();
+ ChildAccess destination = source.getAccessor();
+ if (destination == null) {
+ return result;
+ }
+ result.add(new GMFGraphLinkDescriptor(source, destination, GMFGraphElementTypes.DiagramLabelAccessor_4004, DiagramLabelAccessorEditPart.VISUAL_ID));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
private static Collection getOutgoingFeatureModelFacetLinks_Node_ContentPane_4006(Node source) {
Collection result = new LinkedList();
ChildAccess destination = source.getContentPane();
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphPaletteFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphPaletteFactory.java
index 45f3feacb..2417ba63b 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphPaletteFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphPaletteFactory.java
@@ -48,6 +48,7 @@ public class GMFGraphPaletteFactory {
paletteContainer.add(createFigureLink4CreationTool());
paletteContainer.add(createNestedFigureLink5CreationTool());
paletteContainer.add(createChildAccessLink6CreationTool());
+ paletteContainer.add(createLabel7CreationTool());
return paletteContainer;
}
@@ -66,6 +67,7 @@ public class GMFGraphPaletteFactory {
paletteContainer.add(createPolyline6CreationTool());
paletteContainer.add(createPolylinePoint7CreationTool());
paletteContainer.add(createPolygon8CreationTool());
+ paletteContainer.add(createLabelFigure9CreationTool());
return paletteContainer;
}
@@ -146,6 +148,18 @@ public class GMFGraphPaletteFactory {
/**
* @generated
*/
+ private ToolEntry createLabel7CreationTool() {
+ List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+ types.add(GMFGraphElementTypes.DiagramLabel_2009);
+ NodeToolEntry entry = new NodeToolEntry(Messages.Label7CreationTool_title, Messages.Label7CreationTool_desc, types);
+ entry.setSmallIcon(GMFGraphElementTypes.getImageDescriptor(GMFGraphElementTypes.DiagramLabel_2009));
+ entry.setLargeIcon(entry.getSmallIcon());
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
private ToolEntry createFigureGallery1CreationTool() {
List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
types.add(GMFGraphElementTypes.FigureGallery_2008);
@@ -252,6 +266,20 @@ public class GMFGraphPaletteFactory {
/**
* @generated
*/
+ private ToolEntry createLabelFigure9CreationTool() {
+ List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(3);
+ types.add(GMFGraphElementTypes.Label_3026);
+ types.add(GMFGraphElementTypes.Label_3027);
+ types.add(GMFGraphElementTypes.Label_3028);
+ NodeToolEntry entry = new NodeToolEntry(Messages.LabelFigure9CreationTool_title, Messages.LabelFigure9CreationTool_desc, types);
+ entry.setSmallIcon(GMFGraphElementTypes.getImageDescriptor(GMFGraphElementTypes.Label_3026));
+ entry.setLargeIcon(entry.getSmallIcon());
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
private static class NodeToolEntry extends ToolEntry {
/**
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java
index c00f3d756..60c1e7cd7 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Canvas;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.Node;
import org.eclipse.gmf.gmfgraph.Polyline;
import org.eclipse.gmf.graphdef.editor.edit.parts.CanvasEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ChildAccessEditPart;
@@ -24,6 +25,9 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentVisualFacetsEditPar
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionVisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelVisualFacetsEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
@@ -32,6 +36,12 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryFiguresEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelTextEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeVisualFacetsEditPart;
@@ -70,6 +80,11 @@ public class GMFGraphVisualIDRegistry {
/**
* @generated
*/
+ private static GMFGraphAbstractExpression Node_2006_Constraint;
+
+ /**
+ * @generated
+ */
private static GMFGraphAbstractExpression Polyline_3014_Constraint;
/**
@@ -183,6 +198,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return Polygon2EditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return Label2EditPart.VISUAL_ID;
+ }
break;
case RectangleEditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -200,6 +218,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case Rectangle2EditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -217,6 +238,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case EllipseEditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -234,6 +258,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case RoundedRectangleEditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -251,6 +278,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case PolylineEditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getPoint().isSuperTypeOf(domainElement.eClass())) {
@@ -278,6 +308,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case RoundedRectangle2EditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -295,6 +328,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case Polyline2EditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getPoint().isSuperTypeOf(domainElement.eClass())) {
@@ -322,6 +358,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case Ellipse3EditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -339,6 +378,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case RoundedRectangle3EditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getRectangle().isSuperTypeOf(domainElement.eClass())) {
@@ -356,6 +398,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return PolygonEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return LabelEditPart.VISUAL_ID;
+ }
break;
case Polyline3EditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getPoint().isSuperTypeOf(domainElement.eClass())) {
@@ -386,12 +431,15 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getPolygon().isSuperTypeOf(domainElement.eClass())) {
return Polygon3EditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getLabel().isSuperTypeOf(domainElement.eClass())) {
+ return Label3EditPart.VISUAL_ID;
+ }
break;
case CanvasEditPart.VISUAL_ID:
if (GMFGraphPackage.eINSTANCE.getCompartment().isSuperTypeOf(domainElement.eClass())) {
return CompartmentEditPart.VISUAL_ID;
}
- if (GMFGraphPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ if (GMFGraphPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass()) && isNode_2006((Node) domainElement)) {
return NodeEditPart.VISUAL_ID;
}
if (GMFGraphPackage.eINSTANCE.getConnection().isSuperTypeOf(domainElement.eClass())) {
@@ -400,6 +448,9 @@ public class GMFGraphVisualIDRegistry {
if (GMFGraphPackage.eINSTANCE.getFigureGallery().isSuperTypeOf(domainElement.eClass())) {
return FigureGalleryEditPart.VISUAL_ID;
}
+ if (GMFGraphPackage.eINSTANCE.getDiagramLabel().isSuperTypeOf(domainElement.eClass())) {
+ return DiagramLabelEditPart.VISUAL_ID;
+ }
break;
}
return -1;
@@ -456,6 +507,14 @@ public class GMFGraphVisualIDRegistry {
return true;
}
break;
+ case DiagramLabelEditPart.VISUAL_ID:
+ if (DiagramLabelNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DiagramLabelVisualFacetsEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case FigureDescriptorEditPart.VISUAL_ID:
if (FigureDescriptorNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -475,6 +534,9 @@ public class GMFGraphVisualIDRegistry {
if (Polygon2EditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (Label2EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case RectangleEditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -492,6 +554,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case Rectangle2EditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -509,6 +574,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case EllipseEditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -526,6 +594,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case RoundedRectangleEditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -543,6 +614,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case PolylineEditPart.VISUAL_ID:
if (PointEditPart.VISUAL_ID == nodeVisualID) {
@@ -554,6 +628,11 @@ public class GMFGraphVisualIDRegistry {
return true;
}
break;
+ case LabelEditPart.VISUAL_ID:
+ if (LabelTextEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case Ellipse2EditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -570,6 +649,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case RoundedRectangle2EditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -587,6 +669,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case Polyline2EditPart.VISUAL_ID:
if (PointEditPart.VISUAL_ID == nodeVisualID) {
@@ -598,6 +683,11 @@ public class GMFGraphVisualIDRegistry {
return true;
}
break;
+ case Label2EditPart.VISUAL_ID:
+ if (LabelText2EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case Rectangle3EditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -614,6 +704,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case Ellipse3EditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -631,6 +724,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case RoundedRectangle3EditPart.VISUAL_ID:
if (Rectangle2EditPart.VISUAL_ID == nodeVisualID) {
@@ -648,6 +744,9 @@ public class GMFGraphVisualIDRegistry {
if (PolygonEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case Polyline3EditPart.VISUAL_ID:
if (PointEditPart.VISUAL_ID == nodeVisualID) {
@@ -659,6 +758,11 @@ public class GMFGraphVisualIDRegistry {
return true;
}
break;
+ case Label3EditPart.VISUAL_ID:
+ if (LabelText3EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case FigureGalleryFiguresEditPart.VISUAL_ID:
if (FigureDescriptorEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -678,6 +782,9 @@ public class GMFGraphVisualIDRegistry {
if (Polygon3EditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (Label3EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case CanvasEditPart.VISUAL_ID:
if (CompartmentEditPart.VISUAL_ID == nodeVisualID) {
@@ -692,6 +799,9 @@ public class GMFGraphVisualIDRegistry {
if (FigureGalleryEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (DiagramLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
}
return false;
@@ -723,6 +833,17 @@ public class GMFGraphVisualIDRegistry {
/**
* @generated
*/
+ private static boolean isNode_2006(Node domainElement) {
+ if (Node_2006_Constraint == null) { // lazy initialization
+ Node_2006_Constraint = GMFGraphOCLFactory.getExpression("not self.oclIsKindOf(gmfgraph::DiagramLabel)", GMFGraphPackage.eINSTANCE.getNode()); //$NON-NLS-1$
+ }
+ Object result = Node_2006_Constraint.evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
private static boolean isPolyline_3014(Polyline domainElement) {
if (Polyline_3014_Constraint == null) { // lazy initialization
Polyline_3014_Constraint = GMFGraphOCLFactory.getExpression("not oclIsKindOf(gmfgraph::Polygon)", GMFGraphPackage.eINSTANCE.getPolyline()); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/Messages.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/Messages.java
index aa4492315..24a0aa129 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/Messages.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/Messages.java
@@ -333,6 +333,16 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String Label7CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String Label7CreationTool_desc;
+
+ /**
+ * @generated
+ */
public static String FigureGallery1CreationTool_title;
/**
@@ -413,6 +423,16 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String LabelFigure9CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String LabelFigure9CreationTool_desc;
+
+ /**
+ * @generated
+ */
public static String CompartmentVisualFacetsEditPart_title;
/**
@@ -433,6 +453,11 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String DiagramLabelVisualFacetsEditPart_title;
+
+ /**
+ * @generated
+ */
public static String CommandName_OpenDiagram;
/**
@@ -458,6 +483,11 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String NavigatorGroupName_DiagramLabel_2009_outgoinglinks;
+
+ /**
+ * @generated
+ */
public static String NavigatorGroupName_FigureDescriptor_3009_outgoinglinks;
/**
@@ -498,6 +528,11 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String NavigatorGroupName_Label_3026_incominglinks;
+
+ /**
+ * @generated
+ */
public static String NavigatorGroupName_Ellipse_3015_incominglinks;
/**
@@ -518,6 +553,11 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String NavigatorGroupName_Label_3027_incominglinks;
+
+ /**
+ * @generated
+ */
public static String NavigatorGroupName_Rectangle_3018_incominglinks;
/**
@@ -543,6 +583,11 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String NavigatorGroupName_Label_3028_incominglinks;
+
+ /**
+ * @generated
+ */
public static String NavigatorGroupName_ChildAccess_4002_target;
/**
@@ -558,6 +603,11 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String NavigatorGroupName_DiagramLabelAccessor_4004_source;
+
+ /**
+ * @generated
+ */
public static String NavigatorGroupName_NodeContentPane_4006_source;
/**
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphElementTypes.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphElementTypes.java
index b1e110bcc..f73b55d6f 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphElementTypes.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphElementTypes.java
@@ -82,6 +82,11 @@ public class GMFGraphElementTypes extends ElementInitializers {
/**
* @generated
*/
+ public static final IElementType DiagramLabel_2009 = getElementType("org.eclipse.gmf.graphdef.editor.DiagramLabel_2009"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType FigureDescriptor_3009 = getElementType("org.eclipse.gmf.graphdef.editor.FigureDescriptor_3009"); //$NON-NLS-1$
/**
@@ -122,6 +127,11 @@ public class GMFGraphElementTypes extends ElementInitializers {
/**
* @generated
*/
+ public static final IElementType Label_3026 = getElementType("org.eclipse.gmf.graphdef.editor.Label_3026"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Ellipse_3015 = getElementType("org.eclipse.gmf.graphdef.editor.Ellipse_3015"); //$NON-NLS-1$
/**
@@ -142,6 +152,11 @@ public class GMFGraphElementTypes extends ElementInitializers {
/**
* @generated
*/
+ public static final IElementType Label_3027 = getElementType("org.eclipse.gmf.graphdef.editor.Label_3027"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Rectangle_3018 = getElementType("org.eclipse.gmf.graphdef.editor.Rectangle_3018"); //$NON-NLS-1$
/**
@@ -167,6 +182,11 @@ public class GMFGraphElementTypes extends ElementInitializers {
/**
* @generated
*/
+ public static final IElementType Label_3028 = getElementType("org.eclipse.gmf.graphdef.editor.Label_3028"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType ChildAccess_4002 = getElementType("org.eclipse.gmf.graphdef.editor.ChildAccess_4002"); //$NON-NLS-1$
/**
@@ -305,6 +325,8 @@ public class GMFGraphElementTypes extends ElementInitializers {
elements.put(FigureGallery_2008, GMFGraphPackage.eINSTANCE.getFigureGallery());
+ elements.put(DiagramLabel_2009, GMFGraphPackage.eINSTANCE.getDiagramLabel());
+
elements.put(FigureDescriptor_3009, GMFGraphPackage.eINSTANCE.getFigureDescriptor());
elements.put(Rectangle_3010, GMFGraphPackage.eINSTANCE.getRectangle());
@@ -321,6 +343,8 @@ public class GMFGraphElementTypes extends ElementInitializers {
elements.put(Polygon_3023, GMFGraphPackage.eINSTANCE.getPolygon());
+ elements.put(Label_3026, GMFGraphPackage.eINSTANCE.getLabel());
+
elements.put(Ellipse_3015, GMFGraphPackage.eINSTANCE.getEllipse());
elements.put(RoundedRectangle_3016, GMFGraphPackage.eINSTANCE.getRoundedRectangle());
@@ -329,6 +353,8 @@ public class GMFGraphElementTypes extends ElementInitializers {
elements.put(Polygon_3024, GMFGraphPackage.eINSTANCE.getPolygon());
+ elements.put(Label_3027, GMFGraphPackage.eINSTANCE.getLabel());
+
elements.put(Rectangle_3018, GMFGraphPackage.eINSTANCE.getRectangle());
elements.put(Ellipse_3019, GMFGraphPackage.eINSTANCE.getEllipse());
@@ -339,6 +365,8 @@ public class GMFGraphElementTypes extends ElementInitializers {
elements.put(Polygon_3025, GMFGraphPackage.eINSTANCE.getPolygon());
+ elements.put(Label_3028, GMFGraphPackage.eINSTANCE.getLabel());
+
elements.put(ChildAccess_4002, GMFGraphPackage.eINSTANCE.getChildAccess());
elements.put(CompartmentAccessor_4003, GMFGraphPackage.eINSTANCE.getCompartment_Accessor());
@@ -370,6 +398,7 @@ public class GMFGraphElementTypes extends ElementInitializers {
KNOWN_ELEMENT_TYPES.add(Node_2006);
KNOWN_ELEMENT_TYPES.add(Connection_2007);
KNOWN_ELEMENT_TYPES.add(FigureGallery_2008);
+ KNOWN_ELEMENT_TYPES.add(DiagramLabel_2009);
KNOWN_ELEMENT_TYPES.add(FigureDescriptor_3009);
KNOWN_ELEMENT_TYPES.add(Rectangle_3010);
KNOWN_ELEMENT_TYPES.add(Rectangle_3011);
@@ -378,15 +407,18 @@ public class GMFGraphElementTypes extends ElementInitializers {
KNOWN_ELEMENT_TYPES.add(Polyline_3014);
KNOWN_ELEMENT_TYPES.add(Point_3022);
KNOWN_ELEMENT_TYPES.add(Polygon_3023);
+ KNOWN_ELEMENT_TYPES.add(Label_3026);
KNOWN_ELEMENT_TYPES.add(Ellipse_3015);
KNOWN_ELEMENT_TYPES.add(RoundedRectangle_3016);
KNOWN_ELEMENT_TYPES.add(Polyline_3017);
KNOWN_ELEMENT_TYPES.add(Polygon_3024);
+ KNOWN_ELEMENT_TYPES.add(Label_3027);
KNOWN_ELEMENT_TYPES.add(Rectangle_3018);
KNOWN_ELEMENT_TYPES.add(Ellipse_3019);
KNOWN_ELEMENT_TYPES.add(RoundedRectangle_3020);
KNOWN_ELEMENT_TYPES.add(Polyline_3021);
KNOWN_ELEMENT_TYPES.add(Polygon_3025);
+ KNOWN_ELEMENT_TYPES.add(Label_3028);
KNOWN_ELEMENT_TYPES.add(ChildAccess_4002);
KNOWN_ELEMENT_TYPES.add(CompartmentAccessor_4003);
KNOWN_ELEMENT_TYPES.add(DiagramLabelAccessor_4004);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphModelingAssistantProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphModelingAssistantProvider.java
index a04d9bc26..9d750983e 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphModelingAssistantProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphModelingAssistantProvider.java
@@ -32,6 +32,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.gmf.graphdef.editor.edit.parts.CanvasEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
@@ -71,6 +72,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3016);
types.add(GMFGraphElementTypes.Polyline_3017);
types.add(GMFGraphElementTypes.Polygon_3024);
+ types.add(GMFGraphElementTypes.Label_3027);
return types;
}
if (editPart instanceof RectangleEditPart) {
@@ -80,6 +82,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof Rectangle2EditPart) {
@@ -89,6 +92,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof EllipseEditPart) {
@@ -98,6 +102,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof RoundedRectangleEditPart) {
@@ -107,6 +112,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof PolylineEditPart) {
@@ -126,6 +132,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof RoundedRectangle2EditPart) {
@@ -135,6 +142,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof Polyline2EditPart) {
@@ -154,6 +162,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof Ellipse3EditPart) {
@@ -163,6 +172,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof RoundedRectangle3EditPart) {
@@ -172,6 +182,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3013);
types.add(GMFGraphElementTypes.Polyline_3014);
types.add(GMFGraphElementTypes.Polygon_3023);
+ types.add(GMFGraphElementTypes.Label_3026);
return types;
}
if (editPart instanceof Polyline3EditPart) {
@@ -192,6 +203,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.RoundedRectangle_3020);
types.add(GMFGraphElementTypes.Polyline_3021);
types.add(GMFGraphElementTypes.Polygon_3025);
+ types.add(GMFGraphElementTypes.Label_3028);
return types;
}
if (editPart instanceof CanvasEditPart) {
@@ -200,6 +212,7 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.Node_2006);
types.add(GMFGraphElementTypes.Connection_2007);
types.add(GMFGraphElementTypes.FigureGallery_2008);
+ types.add(GMFGraphElementTypes.DiagramLabel_2009);
return types;
}
return Collections.EMPTY_LIST;
@@ -220,6 +233,11 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
types.add(GMFGraphElementTypes.NodeContentPane_4006);
return types;
}
+ if (sourceEditPart instanceof DiagramLabelEditPart) {
+ List types = new ArrayList();
+ types.add(GMFGraphElementTypes.DiagramLabelAccessor_4004);
+ return types;
+ }
if (sourceEditPart instanceof FigureDescriptorEditPart) {
List types = new ArrayList();
types.add(GMFGraphElementTypes.ChildAccess_4002);
@@ -255,6 +273,10 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
List types = new ArrayList();
return types;
}
+ if (sourceEditPart instanceof DiagramLabelEditPart) {
+ List types = new ArrayList();
+ return types;
+ }
if (sourceEditPart instanceof FigureDescriptorEditPart) {
List types = new ArrayList();
return types;
@@ -287,6 +309,10 @@ public class GMFGraphModelingAssistantProvider extends ModelingAssistantProvider
List types = new ArrayList();
return types;
}
+ if (sourceEditPart instanceof DiagramLabelEditPart) {
+ List types = new ArrayList();
+ return types;
+ }
if (sourceEditPart instanceof FigureDescriptorEditPart) {
List types = new ArrayList();
return types;
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java
index 1359685c2..9cdb0c6d0 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java
@@ -16,10 +16,16 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelTextEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeNameEditPart;
+import org.eclipse.gmf.graphdef.editor.parsers.CompositeParser;
import org.eclipse.gmf.graphdef.editor.parsers.MessageFormatParser;
+import org.eclipse.gmf.graphdef.editor.parsers.RegexpParser;
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
@@ -134,6 +140,30 @@ public class GMFGraphParserProvider extends AbstractProvider implements IParserP
/**
* @generated
*/
+ private IParser diagramLabelName_5013Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDiagramLabelName_5013Parser() {
+ if (diagramLabelName_5013Parser == null) {
+ diagramLabelName_5013Parser = createDiagramLabelName_5013Parser();
+ }
+ return diagramLabelName_5013Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser createDiagramLabelName_5013Parser() {
+ EAttribute[] features = new EAttribute[] { GMFGraphPackage.eINSTANCE.getIdentity_Name(), };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser figureDescriptorName_5008Parser;
/**
@@ -158,6 +188,78 @@ public class GMFGraphParserProvider extends AbstractProvider implements IParserP
/**
* @generated
*/
+ private IParser labelText_5010Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getLabelText_5010Parser() {
+ if (labelText_5010Parser == null) {
+ labelText_5010Parser = createLabelText_5010Parser();
+ }
+ return labelText_5010Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser createLabelText_5010Parser() {
+ EAttribute[] features = new EAttribute[] { GMFGraphPackage.eINSTANCE.getLabel_Text(), };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser labelText_5011Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getLabelText_5011Parser() {
+ if (labelText_5011Parser == null) {
+ labelText_5011Parser = createLabelText_5011Parser();
+ }
+ return labelText_5011Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser createLabelText_5011Parser() {
+ EAttribute[] features = new EAttribute[] { GMFGraphPackage.eINSTANCE.getLabel_Text(), };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser labelText_5012Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getLabelText_5012Parser() {
+ if (labelText_5012Parser == null) {
+ labelText_5012Parser = createLabelText_5012Parser();
+ }
+ return labelText_5012Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser createLabelText_5012Parser() {
+ EAttribute[] features = new EAttribute[] { GMFGraphPackage.eINSTANCE.getLabel_Text(), };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
protected IParser getParser(int visualID) {
switch (visualID) {
case CompartmentNameEditPart.VISUAL_ID:
@@ -168,8 +270,16 @@ public class GMFGraphParserProvider extends AbstractProvider implements IParserP
return getConnectionName_5007Parser();
case FigureGalleryNameEditPart.VISUAL_ID:
return getFigureGalleryName_5009Parser();
+ case DiagramLabelNameEditPart.VISUAL_ID:
+ return getDiagramLabelName_5013Parser();
case FigureDescriptorNameEditPart.VISUAL_ID:
return getFigureDescriptorName_5008Parser();
+ case LabelTextEditPart.VISUAL_ID:
+ return getLabelText_5010Parser();
+ case LabelText2EditPart.VISUAL_ID:
+ return getLabelText_5011Parser();
+ case LabelText3EditPart.VISUAL_ID:
+ return getLabelText_5012Parser();
}
return null;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java
index 931775a9b..ff7892269 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java
@@ -23,6 +23,9 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionVisualFacetsEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramElementFigureEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelAccessorEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelVisualFacetsEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse3EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
@@ -31,6 +34,12 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.FigureDescriptorNameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryFiguresEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelTextEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeContentPaneEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.NodeNameEditPart;
@@ -60,6 +69,9 @@ import org.eclipse.gmf.graphdef.editor.view.factories.ConnectionViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.ConnectionVisualFacetsViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.DiagramElementFigureViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.DiagramLabelAccessorViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.DiagramLabelNameViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.DiagramLabelViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.DiagramLabelVisualFacetsViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.Ellipse2ViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.Ellipse3ViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.EllipseViewFactory;
@@ -68,6 +80,12 @@ import org.eclipse.gmf.graphdef.editor.view.factories.FigureDescriptorViewFactor
import org.eclipse.gmf.graphdef.editor.view.factories.FigureGalleryFiguresViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.FigureGalleryNameViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.FigureGalleryViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.Label2ViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.Label3ViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.LabelText2ViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.LabelText3ViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.LabelTextViewFactory;
+import org.eclipse.gmf.graphdef.editor.view.factories.LabelViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.NodeContentPaneViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.NodeNameViewFactory;
import org.eclipse.gmf.graphdef.editor.view.factories.NodeViewFactory;
@@ -154,6 +172,7 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
case NodeEditPart.VISUAL_ID:
case ConnectionEditPart.VISUAL_ID:
case FigureGalleryEditPart.VISUAL_ID:
+ case DiagramLabelEditPart.VISUAL_ID:
case FigureDescriptorEditPart.VISUAL_ID:
case RectangleEditPart.VISUAL_ID:
case EllipseEditPart.VISUAL_ID:
@@ -161,16 +180,19 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
case PolylineEditPart.VISUAL_ID:
case PointEditPart.VISUAL_ID:
case PolygonEditPart.VISUAL_ID:
+ case LabelEditPart.VISUAL_ID:
case Rectangle2EditPart.VISUAL_ID:
case Ellipse2EditPart.VISUAL_ID:
case RoundedRectangle2EditPart.VISUAL_ID:
case Polyline2EditPart.VISUAL_ID:
case Polygon2EditPart.VISUAL_ID:
+ case Label2EditPart.VISUAL_ID:
case Rectangle3EditPart.VISUAL_ID:
case Ellipse3EditPart.VISUAL_ID:
case RoundedRectangle3EditPart.VISUAL_ID:
case Polyline3EditPart.VISUAL_ID:
case Polygon3EditPart.VISUAL_ID:
+ case Label3EditPart.VISUAL_ID:
if (domainElement == null || visualID != GMFGraphVisualIDRegistry.getNodeVisualID(containerView, domainElement)) {
return null; // visual id in semantic hint should match visual id for domain element
}
@@ -199,11 +221,32 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
return null; // wrong container
}
break;
+ case DiagramLabelNameEditPart.VISUAL_ID:
+ case DiagramLabelVisualFacetsEditPart.VISUAL_ID:
+ if (DiagramLabelEditPart.VISUAL_ID != GMFGraphVisualIDRegistry.getVisualID(containerView) || containerView.getElement() != domainElement) {
+ return null; // wrong container
+ }
+ break;
case FigureDescriptorNameEditPart.VISUAL_ID:
if (FigureDescriptorEditPart.VISUAL_ID != GMFGraphVisualIDRegistry.getVisualID(containerView) || containerView.getElement() != domainElement) {
return null; // wrong container
}
break;
+ case LabelTextEditPart.VISUAL_ID:
+ if (LabelEditPart.VISUAL_ID != GMFGraphVisualIDRegistry.getVisualID(containerView) || containerView.getElement() != domainElement) {
+ return null; // wrong container
+ }
+ break;
+ case LabelText2EditPart.VISUAL_ID:
+ if (Label2EditPart.VISUAL_ID != GMFGraphVisualIDRegistry.getVisualID(containerView) || containerView.getElement() != domainElement) {
+ return null; // wrong container
+ }
+ break;
+ case LabelText3EditPart.VISUAL_ID:
+ if (Label3EditPart.VISUAL_ID != GMFGraphVisualIDRegistry.getVisualID(containerView) || containerView.getElement() != domainElement) {
+ return null; // wrong container
+ }
+ break;
default:
return null;
}
@@ -236,6 +279,10 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
return FigureGalleryViewFactory.class;
case FigureGalleryNameEditPart.VISUAL_ID:
return FigureGalleryNameViewFactory.class;
+ case DiagramLabelEditPart.VISUAL_ID:
+ return DiagramLabelViewFactory.class;
+ case DiagramLabelNameEditPart.VISUAL_ID:
+ return DiagramLabelNameViewFactory.class;
case FigureDescriptorEditPart.VISUAL_ID:
return FigureDescriptorViewFactory.class;
case FigureDescriptorNameEditPart.VISUAL_ID:
@@ -254,6 +301,10 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
return PointViewFactory.class;
case PolygonEditPart.VISUAL_ID:
return PolygonViewFactory.class;
+ case LabelEditPart.VISUAL_ID:
+ return LabelViewFactory.class;
+ case LabelTextEditPart.VISUAL_ID:
+ return LabelTextViewFactory.class;
case Ellipse2EditPart.VISUAL_ID:
return Ellipse2ViewFactory.class;
case RoundedRectangle2EditPart.VISUAL_ID:
@@ -262,6 +313,10 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
return Polyline2ViewFactory.class;
case Polygon2EditPart.VISUAL_ID:
return Polygon2ViewFactory.class;
+ case Label2EditPart.VISUAL_ID:
+ return Label2ViewFactory.class;
+ case LabelText2EditPart.VISUAL_ID:
+ return LabelText2ViewFactory.class;
case Rectangle3EditPart.VISUAL_ID:
return Rectangle3ViewFactory.class;
case Ellipse3EditPart.VISUAL_ID:
@@ -272,6 +327,10 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
return Polyline3ViewFactory.class;
case Polygon3EditPart.VISUAL_ID:
return Polygon3ViewFactory.class;
+ case Label3EditPart.VISUAL_ID:
+ return Label3ViewFactory.class;
+ case LabelText3EditPart.VISUAL_ID:
+ return LabelText3ViewFactory.class;
case CompartmentVisualFacetsEditPart.VISUAL_ID:
return CompartmentVisualFacetsViewFactory.class;
case NodeVisualFacetsEditPart.VISUAL_ID:
@@ -280,6 +339,8 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
return ConnectionVisualFacetsViewFactory.class;
case FigureGalleryFiguresEditPart.VISUAL_ID:
return FigureGalleryFiguresViewFactory.class;
+ case DiagramLabelVisualFacetsEditPart.VISUAL_ID:
+ return DiagramLabelVisualFacetsViewFactory.class;
}
return null;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/FigureSectionProxy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/FigureSectionProxy.java
index c4e9b3a95..ea3a90a52 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/FigureSectionProxy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/FigureSectionProxy.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gmf.gmfgraph.Ellipse;
+import org.eclipse.gmf.gmfgraph.Polygon;
import org.eclipse.gmf.gmfgraph.Polyline;
import org.eclipse.gmf.gmfgraph.Rectangle;
import org.eclipse.gmf.gmfgraph.RoundedRectangle;
@@ -60,7 +61,7 @@ public class FigureSectionProxy extends FigureSection {
*/
protected Object unwrap(Object element) {
Object rv = PropertySectionFilters.transformSelection(element);
- if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline) {
+ if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline || rv instanceof Polygon) {
return rv;
}
return null;
@@ -76,7 +77,7 @@ public class FigureSectionProxy extends FigureSection {
*/
public boolean select(Object toTest) {
Object transformed = PropertySectionFilters.transformSelection(toTest);
- return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline;
+ return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline || transformed instanceof Polygon;
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutDataSectionProxy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutDataSectionProxy.java
index b4b400a72..063e58fa7 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutDataSectionProxy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutDataSectionProxy.java
@@ -22,6 +22,8 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gmf.gmfgraph.Ellipse;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.gmfgraph.Polygon;
import org.eclipse.gmf.gmfgraph.Polyline;
import org.eclipse.gmf.gmfgraph.Rectangle;
import org.eclipse.gmf.gmfgraph.RoundedRectangle;
@@ -60,7 +62,7 @@ public class LayoutDataSectionProxy extends LayoutDataSection {
*/
protected Object unwrap(Object element) {
Object rv = PropertySectionFilters.transformSelection(element);
- if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline) {
+ if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline || rv instanceof Polygon || rv instanceof Label) {
return rv;
}
return null;
@@ -76,7 +78,8 @@ public class LayoutDataSectionProxy extends LayoutDataSection {
*/
public boolean select(Object toTest) {
Object transformed = PropertySectionFilters.transformSelection(toTest);
- return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline;
+ return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline || transformed instanceof Polygon
+ || transformed instanceof Label;
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutSectionProxy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutSectionProxy.java
index 9bbad10f4..e1d370ef3 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutSectionProxy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutSectionProxy.java
@@ -22,6 +22,8 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gmf.gmfgraph.Ellipse;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.gmfgraph.Polygon;
import org.eclipse.gmf.gmfgraph.Polyline;
import org.eclipse.gmf.gmfgraph.Rectangle;
import org.eclipse.gmf.gmfgraph.RoundedRectangle;
@@ -60,7 +62,7 @@ public class LayoutSectionProxy extends LayoutSection {
*/
protected Object unwrap(Object element) {
Object rv = PropertySectionFilters.transformSelection(element);
- if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline) {
+ if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline || rv instanceof Polygon || rv instanceof Label) {
return rv;
}
return null;
@@ -76,7 +78,8 @@ public class LayoutSectionProxy extends LayoutSection {
*/
public boolean select(Object toTest) {
Object transformed = PropertySectionFilters.transformSelection(toTest);
- return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline;
+ return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline || transformed instanceof Polygon
+ || transformed instanceof Label;
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/SizeSectionProxy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/SizeSectionProxy.java
index dd4f83fd1..c3ad58286 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/SizeSectionProxy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/SizeSectionProxy.java
@@ -22,6 +22,8 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gmf.gmfgraph.Ellipse;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.gmfgraph.Polygon;
import org.eclipse.gmf.gmfgraph.Polyline;
import org.eclipse.gmf.gmfgraph.Rectangle;
import org.eclipse.gmf.gmfgraph.RoundedRectangle;
@@ -60,7 +62,7 @@ public class SizeSectionProxy extends SizeSection {
*/
protected Object unwrap(Object element) {
Object rv = PropertySectionFilters.transformSelection(element);
- if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline) {
+ if (rv instanceof Rectangle || rv instanceof Ellipse || rv instanceof RoundedRectangle || rv instanceof Polyline || rv instanceof Polygon || rv instanceof Label) {
return rv;
}
return null;
@@ -76,7 +78,8 @@ public class SizeSectionProxy extends SizeSection {
*/
public boolean select(Object toTest) {
Object transformed = PropertySectionFilters.transformSelection(toTest);
- return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline;
+ return transformed instanceof Rectangle || transformed instanceof Ellipse || transformed instanceof RoundedRectangle || transformed instanceof Polyline || transformed instanceof Polygon
+ || transformed instanceof Label;
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelNameViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelNameViewFactory.java
new file mode 100644
index 000000000..e5c79a7a3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelNameViewFactory.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelNameViewFactory extends BasicNodeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelViewFactory.java
new file mode 100644
index 000000000..6b801fc0c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelViewFactory.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gmf.graphdef.editor.edit.parts.CanvasEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelNameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelVisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelViewFactory extends AbstractShapeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ styles.add(NotationFactory.eINSTANCE.createShapeStyle());
+ return styles;
+ }
+
+ /**
+ * @generated
+ */
+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+ if (semanticHint == null) {
+ semanticHint = GMFGraphVisualIDRegistry.getType(DiagramLabelEditPart.VISUAL_ID);
+ view.setType(semanticHint);
+ }
+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+ if (!CanvasEditPart.MODEL_ID.equals(GMFGraphVisualIDRegistry.getModelID(containerView))) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", CanvasEditPart.MODEL_ID); //$NON-NLS-1$
+ view.getEAnnotations().add(shortcutAnnotation);
+ }
+ IAdaptable eObjectAdapter = null;
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ eObjectAdapter = new EObjectAdapter(eObject);
+ }
+ getViewService().createNode(eObjectAdapter, view, GMFGraphVisualIDRegistry.getType(DiagramLabelNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(eObjectAdapter, view, GMFGraphVisualIDRegistry.getType(DiagramLabelVisualFacetsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelVisualFacetsViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelVisualFacetsViewFactory.java
new file mode 100644
index 000000000..31417c656
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/DiagramLabelVisualFacetsViewFactory.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.graphdef.editor.edit.parts.DiagramLabelVisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory;
+import org.eclipse.gmf.runtime.notation.DrawerStyle;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class DiagramLabelVisualFacetsViewFactory extends BasicNodeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle());
+ styles.add(NotationFactory.eINSTANCE.createTitleStyle());
+ styles.add(NotationFactory.eINSTANCE.createSortingStyle());
+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle());
+ return styles;
+ }
+
+ /**
+ * @generated
+ */
+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+ if (semanticHint == null) {
+ semanticHint = GMFGraphVisualIDRegistry.getType(DiagramLabelVisualFacetsEditPart.VISUAL_ID);
+ view.setType(semanticHint);
+ }
+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+ setupCompartmentTitle(view);
+ setupCompartmentCollapsed(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void setupCompartmentTitle(View view) {
+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle());
+ if (titleStyle != null) {
+ titleStyle.setShowTitle(true);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setupCompartmentCollapsed(View view) {
+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle());
+ if (drawerStyle != null) {
+ drawerStyle.setCollapsed(false);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label2ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label2ViewFactory.java
new file mode 100644
index 000000000..bde0cb9e4
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label2ViewFactory.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText2EditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Label2ViewFactory extends AbstractShapeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+
+ /**
+ * @generated
+ */
+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+ if (semanticHint == null) {
+ semanticHint = GMFGraphVisualIDRegistry.getType(Label2EditPart.VISUAL_ID);
+ view.setType(semanticHint);
+ }
+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+ IAdaptable eObjectAdapter = null;
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ eObjectAdapter = new EObjectAdapter(eObject);
+ }
+ getViewService().createNode(eObjectAdapter, view, GMFGraphVisualIDRegistry.getType(LabelText2EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label3ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label3ViewFactory.java
new file mode 100644
index 000000000..cf373c10c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Label3ViewFactory.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Label3EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelText3EditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Label3ViewFactory extends AbstractShapeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+
+ /**
+ * @generated
+ */
+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+ if (semanticHint == null) {
+ semanticHint = GMFGraphVisualIDRegistry.getType(Label3EditPart.VISUAL_ID);
+ view.setType(semanticHint);
+ }
+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+ IAdaptable eObjectAdapter = null;
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ eObjectAdapter = new EObjectAdapter(eObject);
+ }
+ getViewService().createNode(eObjectAdapter, view, GMFGraphVisualIDRegistry.getType(LabelText3EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText2ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText2ViewFactory.java
new file mode 100644
index 000000000..860c88542
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText2ViewFactory.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class LabelText2ViewFactory extends BasicNodeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText3ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText3ViewFactory.java
new file mode 100644
index 000000000..7c8b99129
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelText3ViewFactory.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class LabelText3ViewFactory extends BasicNodeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelTextViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelTextViewFactory.java
new file mode 100644
index 000000000..c33eccf14
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelTextViewFactory.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class LabelTextViewFactory extends BasicNodeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelViewFactory.java
new file mode 100644
index 000000000..a33099d1b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/LabelViewFactory.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2006, 2008 Borland Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Borland Software Corporation - initial API and implementation
+ */
+package org.eclipse.gmf.graphdef.editor.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.LabelTextEditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class LabelViewFactory extends AbstractShapeViewFactory {
+
+ /**
+ * @generated
+ */
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ return styles;
+ }
+
+ /**
+ * @generated
+ */
+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+ if (semanticHint == null) {
+ semanticHint = GMFGraphVisualIDRegistry.getType(LabelEditPart.VISUAL_ID);
+ view.setType(semanticHint);
+ }
+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+ IAdaptable eObjectAdapter = null;
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ eObjectAdapter = new EObjectAdapter(eObject);
+ }
+ getViewService().createNode(eObjectAdapter, view, GMFGraphVisualIDRegistry.getType(LabelTextEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutConstraint createLayoutConstraint() {
+ return null;
+ }
+}

Back to the top