Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 49066 Details for
Bug 155040
Lite Generator: Common functionality to be moved to lite runtime plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fixes the subj
155040.patch (text/plain), 1.51 MB, created by
Boris Blajer
on 2006-08-30 11:22:39 EDT
(
hide
)
Description:
Fixes the subj
Filename:
MIME Type:
Creator:
Boris Blajer
Created:
2006-08-30 11:22:39 EDT
Size:
1.51 MB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.tests >Index: src/org/eclipse/gmf/tests/setup/RuntimeWorkspaceSetup.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/setup/RuntimeWorkspaceSetup.java,v >retrieving revision 1.29 >diff -u -r1.29 RuntimeWorkspaceSetup.java >--- src/org/eclipse/gmf/tests/setup/RuntimeWorkspaceSetup.java 24 Aug 2006 17:47:52 -0000 1.29 >+++ src/org/eclipse/gmf/tests/setup/RuntimeWorkspaceSetup.java 30 Aug 2006 15:22:18 -0000 >@@ -131,7 +131,9 @@ > // > "org.eclipse.emf.edit", //$NON-NLS-1$ > "org.eclipse.emf.transaction", //$NON-NLS-1$ >- "org.eclipse.emf.workspace", //$NON-NLS-1$ >+ "org.eclipse.emf.workspace", //$NON-NLS-1$ >+ // For the lite generator >+ "org.eclipse.gmf.runtime.lite", //$NON-NLS-1$ > }); > } > return this; >@@ -311,7 +313,8 @@ > if (myBundleURL == null) { > Bundle bundle = Platform.getBundle(myPluginID); > if (bundle == null) { >- throw new NullPointerException("No plugin '" + myPluginID + "' found in the platform"); >+ //Do not throw exception. This allows requiring lite runtime plugin and not failing in configurations where it is not present. >+ return null; > } > try { > myBundleURL = FileLocator.resolve(bundle.getEntry("/")); //$NON-NLS-1$ >#P org.eclipse.gmf.tests.lite >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/tests/org.eclipse.gmf.tests.lite/META-INF/MANIFEST.MF,v >retrieving revision 1.5 >diff -u -r1.5 MANIFEST.MF >--- META-INF/MANIFEST.MF 3 Jul 2006 17:42:29 -0000 1.5 >+++ META-INF/MANIFEST.MF 30 Aug 2006 15:22:19 -0000 >@@ -22,5 +22,6 @@ > org.eclipse.emf.transaction, > org.eclipse.emf.workspace, > org.eclipse.gmf.runtime.diagram.core, >- org.eclipse.ui >+ org.eclipse.ui, >+ org.eclipse.gmf.runtime.lite > Eclipse-LazyStart: true >Index: src/org/eclipse/gmf/tests/lite/gen/LiteGeneratorConfiguration.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/tests/org.eclipse.gmf.tests.lite/src/org/eclipse/gmf/tests/lite/gen/LiteGeneratorConfiguration.java,v >retrieving revision 1.5 >diff -u -r1.5 LiteGeneratorConfiguration.java >--- src/org/eclipse/gmf/tests/lite/gen/LiteGeneratorConfiguration.java 23 Aug 2006 20:02:45 -0000 1.5 >+++ src/org/eclipse/gmf/tests/lite/gen/LiteGeneratorConfiguration.java 30 Aug 2006 15:22:19 -0000 >@@ -15,9 +15,6 @@ > > import junit.framework.Assert; > >-import org.eclipse.core.commands.ExecutionException; >-import org.eclipse.core.commands.operations.IUndoableOperation; >-import org.eclipse.core.runtime.NullProgressMonitor; > import org.eclipse.draw2d.geometry.Dimension; > import org.eclipse.draw2d.geometry.Point; > import org.eclipse.emf.common.command.AbstractCommand; >@@ -26,7 +23,6 @@ > import org.eclipse.emf.ecore.util.FeatureMapUtil; > import org.eclipse.emf.transaction.TransactionalEditingDomain; > import org.eclipse.emf.transaction.util.TransactionUtil; >-import org.eclipse.emf.workspace.EMFCommandOperation; > import org.eclipse.gef.EditPart; > import org.eclipse.gef.EditPartViewer; > import org.eclipse.gef.RequestConstants; >@@ -39,6 +35,10 @@ > import org.eclipse.gmf.internal.codegen.lite.Generator; > import org.eclipse.gmf.internal.common.codegen.GeneratorBase; > import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.lite.commands.WrappingCommand; >+import org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx; >+import org.eclipse.gmf.runtime.lite.requests.CreateRequestEx; >+import org.eclipse.gmf.runtime.lite.requests.ModelCreationFactory; > import org.eclipse.gmf.runtime.notation.Node; > import org.eclipse.gmf.runtime.notation.View; > import org.eclipse.gmf.tests.EPath; >@@ -70,50 +70,34 @@ > } > > public Command getCreateNodeCommand(View parentView, GenCommonBase nodeType) { >- try { >- Class requestClass = loadGeneratedClass(getGenModel().getGenDiagram().getPalette().getFactoryQualifiedClassName() + "$CreateRequestEx"); >- CreateRequest req = (CreateRequest) requestClass.getConstructor(new Class[] {int[].class}).newInstance(new Object[] {new int[] {nodeType.getVisualID()}}); >- req.setLocation(new Point(0,0)); >- req.setSize(new Dimension(100, 100)); >- Class factoryClass = loadGeneratedClass(getGenModel().getGenDiagram().getPalette().getFactoryQualifiedClassName() + "$ModelCreationFactory"); >- CreationFactory factory = (CreationFactory) factoryClass.getConstructor(new Class[] {Class.class}).newInstance(new Object[] {Node.class}); >- req.setFactory(factory); >- return findEditPart(parentView).getCommand(req); >- } catch (Exception e) { >- return null; >- } >+ CreateRequest req = new CreateRequestEx(new int[] {nodeType.getVisualID()}); >+ req.setLocation(new Point(0,0)); >+ req.setSize(new Dimension(100, 100)); >+ CreationFactory factory = new ModelCreationFactory(Node.class); >+ req.setFactory(factory); >+ return findEditPart(parentView).getCommand(req); > } > > public Command getCreateLinkCommand(View source, View target, GenCommonBase linkType) { >- try { >- Class requestClass = loadGeneratedClass(getGenModel().getGenDiagram().getPalette().getFactoryQualifiedClassName() + "$CreateConnectionRequestEx"); >- CreateConnectionRequest req = (CreateConnectionRequest) requestClass.getConstructor(new Class[] {int[].class}).newInstance(new Object[] {new int[] {linkType.getVisualID()}}); >- req.setType(RequestConstants.REQ_CONNECTION_END); >- EditPart sourceEditPart = findEditPart(source); >- Assert.assertNotNull(sourceEditPart); >- req.setSourceEditPart(sourceEditPart); >- EditPart targetEditPart = findEditPart(target); >- Assert.assertNotNull(targetEditPart); >- req.setTargetEditPart(targetEditPart); >- req.setStartCommand(getStartLinkCommand(source, linkType)); >- return targetEditPart.getCommand(req); >- } catch (Exception e) { >- return null; >- } >+ CreateConnectionRequest req = new CreateConnectionRequestEx(new int[] {linkType.getVisualID()}); >+ req.setType(RequestConstants.REQ_CONNECTION_END); >+ EditPart sourceEditPart = findEditPart(source); >+ Assert.assertNotNull(sourceEditPart); >+ req.setSourceEditPart(sourceEditPart); >+ EditPart targetEditPart = findEditPart(target); >+ Assert.assertNotNull(targetEditPart); >+ req.setTargetEditPart(targetEditPart); >+ req.setStartCommand(getStartLinkCommand(source, linkType)); >+ return targetEditPart.getCommand(req); > } > > public Command getStartLinkCommand(View source, GenCommonBase linkType) { >- try { >- Class requestClass = loadGeneratedClass(getGenModel().getGenDiagram().getPalette().getFactoryQualifiedClassName() + "$CreateConnectionRequestEx"); >- CreateConnectionRequest req = (CreateConnectionRequest) requestClass.getConstructor(new Class[] {int[].class}).newInstance(new Object[] {new int[] {linkType.getVisualID()}}); >- req.setType(RequestConstants.REQ_CONNECTION_START); >- EditPart sourceEditPart = findEditPart(source); >- Assert.assertNotNull(sourceEditPart); >- req.setTargetEditPart(sourceEditPart); >- return sourceEditPart.getCommand(req); >- } catch (Exception e) { >- return null; >- } >+ CreateConnectionRequest req = new CreateConnectionRequestEx(new int[] {linkType.getVisualID()}); >+ req.setType(RequestConstants.REQ_CONNECTION_START); >+ EditPart sourceEditPart = findEditPart(source); >+ Assert.assertNotNull(sourceEditPart); >+ req.setTargetEditPart(sourceEditPart); >+ return sourceEditPart.getCommand(req); > } > > public Command getSetBusinessElementStructuralFeatureCommand(View view, String featureName, final Object value) { >@@ -202,45 +186,4 @@ > private static class FakeLiteViewer extends AbstractFakeViewer { > //that is > } >- >- private static class WrappingCommand extends Command { >- private final IUndoableOperation operation; >- >- public WrappingCommand(TransactionalEditingDomain editingDomain, >- org.eclipse.emf.common.command.Command emfCommand) { >- this.operation = new EMFCommandOperation(editingDomain, emfCommand); >- } >- >- public void execute() { >- try { >- operation.execute(new NullProgressMonitor(), null); >- } catch (ExecutionException e) { >- Assert.fail("Exception occurred while executing operation"); >- } >- } >- >- public boolean canExecute() { >- return operation.canExecute(); >- } >- >- public void undo() { >- try { >- operation.undo(new NullProgressMonitor(), null); >- } catch (ExecutionException e) { >- Assert.fail("Exception occurred while executing operation"); >- } >- } >- >- public boolean canUndo() { >- return operation.canUndo(); >- } >- >- public void redo() { >- try { >- operation.redo(new NullProgressMonitor(), null); >- } catch (ExecutionException e) { >- Assert.fail("Exception occurred while executing operation"); >- } >- } >- } > } >#P org.eclipse.gmf.codegen.lite >Index: templates/parts/NodeLabelEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/NodeLabelEditPart.javajet,v >retrieving revision 1.8 >diff -u -r1.8 NodeLabelEditPart.javajet >--- templates/parts/NodeLabelEditPart.javajet 4 Aug 2006 17:05:48 -0000 1.8 >+++ templates/parts/NodeLabelEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -188,7 +188,7 @@ > /** > * @generated > */ >- private IUpdatableEditPart.Refresher labelRefresher = new IUpdatableEditPart.Refresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher labelRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher() { > public void refresh() { > refreshLabel(); > } >@@ -198,7 +198,7 @@ > /** > * @generated > */ >- private IUpdatableEditPart.Refresher fontColorRefresher = new IUpdatableEditPart.Refresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher fontColorRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher() { > public void refresh() { > refreshFontColor(); > } >@@ -207,7 +207,7 @@ > /** > * @generated > */ >- private IUpdatableEditPart.Refresher fontRefresher = new IUpdatableEditPart.Refresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher fontRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher() { > public void refresh() { > refreshFont(); > } >Index: templates/parts/linkComponentEditPolicy.javajetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/linkComponentEditPolicy.javajetinc,v >retrieving revision 1.3 >diff -u -r1.3 linkComponentEditPolicy.javajetinc >--- templates/parts/linkComponentEditPolicy.javajetinc 3 Jul 2006 17:42:27 -0000 1.3 >+++ templates/parts/linkComponentEditPolicy.javajetinc 30 Aug 2006 15:22:25 -0000 >@@ -27,7 +27,7 @@ > edgeToRemove.setTarget(null); > } > }); >- return new WrappingCommand(editingDomain, cc); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(editingDomain, cc); > } > <% > { >Index: templates/parts/NodeEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/NodeEditPart.javajet,v >retrieving revision 1.18 >diff -u -r1.18 NodeEditPart.javajet >--- templates/parts/NodeEditPart.javajet 9 Aug 2006 14:34:53 -0000 1.18 >+++ templates/parts/NodeEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -9,7 +9,6 @@ > boolean isXYLayout = ViewmapLayoutTypeHelper.getSharedInstance().isStoringChildPositions(genNode); > final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; > importManager.registerInnerClass("LinkNotationModelRefresher"); //from linkNotationModelRefresher.jetinc >-importManager.registerInnerClass("LinkDescriptor"); //from linkNotationModelRefresher.jetinc > %> > > <%@ include file="../common/featureGetAccessor.jetinc"%> >@@ -177,7 +176,7 @@ > /** > * @generated > */ >-public class <%=genNode.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")%> implements <%=importManager.getImportedName("org.eclipse.gef.NodeEditPart")%>, IUpdatableEditPart { >+public class <%=genNode.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")%> implements <%=importManager.getImportedName("org.eclipse.gef.NodeEditPart")%>, <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%> { > <%{ > GenCommonBase genCommonBase = genNode;%> > <%@ include file="visualID.jetinc"%> >@@ -286,7 +285,7 @@ > if (result == null) { > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; > } >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); > <% > } > %> >@@ -346,15 +345,15 @@ > if (result == null) { > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; > } >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); > <% > } > %> > } > protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getConnectionCreateCommand(<%=importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")%> request) { > <%if (palette != null && myHelper.hasOutgoingLinks()) {%> >- if (request instanceof <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx) { >- <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx requestEx = (<%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx) request; >+ if (request instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%>) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%> requestEx = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%>) request; > int[] visualIds = requestEx.getVisualIds(); > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); > for (int i = 0; i < visualIds.length; i++) { >@@ -398,7 +397,7 @@ > //returning an unexecutable command does not change cursor to "No". > return null; > } >- <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> wrappedResult = new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); >+ <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> wrappedResult = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); > request.setStartCommand(wrappedResult); > return wrappedResult; > } >@@ -410,8 +409,8 @@ > if (request.getStartCommand() == null || !request.getStartCommand().canExecute()) { > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; > } >- if (request instanceof <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx) { >- <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx requestEx = (<%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx) request; >+ if (request instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%>) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%> requestEx = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%>) request; > int[] visualIds = requestEx.getVisualIds(); > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); > for (int i = 0; i < visualIds.length; i++) { >@@ -452,7 +451,7 @@ > //Cannot create several connections at once. > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; > } >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramNode().getDiagram().getElement()), result); > } > <%}/*when there's palette*/%> > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; >@@ -1119,7 +1118,7 @@ > if (!command.canExecute()) { > return false; > } >- new WrappingCommand(domainModelEditDomain, command).execute(); >+ new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(domainModelEditDomain, command).execute(); > if (resultHolder[0]) { > reconnectCommand = createReconnectCommand(); > } >@@ -1224,7 +1223,7 @@ > private <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> createReconnectCommand() { > <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(oldSource.getDiagram().getElement()); > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); >- result.append(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeSourceCommand")%>(edge, newSource)); >+ result.append(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeSourceCommand")%>(edge, newSource)); > <% > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); >@@ -1374,7 +1373,7 @@ > /** > * @generated > */ >- public Create<%=createCommandNameInfix%><%=genLink.getVisualID()%>StartCommand(<%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx requestEx) { >+ public Create<%=createCommandNameInfix%><%=genLink.getVisualID()%>StartCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%> requestEx) { > //Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart(). > source = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>)requestEx.getTargetEditPart().getModel(); > } >@@ -1608,7 +1607,7 @@ > if (!command.canExecute()) { > return false; > } >- new WrappingCommand(domainModelEditDomain, command).execute(); >+ new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(domainModelEditDomain, command).execute(); > if (resultHolder[0]) { > reconnectCommand = createReconnectCommand(); > } >@@ -1665,7 +1664,7 @@ > private <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> createReconnectCommand() { > <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(oldTarget.getDiagram().getElement()); > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); >- result.append(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeTargetCommand")%>(edge, newTarget)); >+ result.append(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeTargetCommand")%>(edge, newTarget)); > <% > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); >@@ -1750,7 +1749,7 @@ > /** > * @generated > */ >- public Create<%=createCommandNameInfix%><%=genLink.getVisualID()%>Command(<%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateConnectionRequestEx requestEx) { >+ public Create<%=createCommandNameInfix%><%=genLink.getVisualID()%>Command(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%> requestEx) { > if (requestEx.getSourceEditPart().getModel() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) { > source = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>)requestEx.getSourceEditPart().getModel(); > } else { >Index: templates/parts/DiagramEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/DiagramEditPart.javajet,v >retrieving revision 1.7 >diff -u -r1.7 DiagramEditPart.javajet >--- templates/parts/DiagramEditPart.javajet 4 Aug 2006 17:05:48 -0000 1.7 >+++ templates/parts/DiagramEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -5,7 +5,6 @@ > final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; > importManager.registerInnerClass("NotationModelRefresher"); //from notationModelRefresher.jetinc > importManager.registerInnerClass("LinkNotationModelRefresher"); //from linkNotationModelRefresher.jetinc >-importManager.registerInnerClass("LinkDescriptor"); //from linkNotationModelRefresher.jetinc > List childNodes = genDiagram.getTopLevelNodes(); > %> > >@@ -102,7 +101,7 @@ > /** > * @generated > */ >-public class <%=genDiagram.getEditPartClassName()%> extends AbstractGraphicalEditPart implements IUpdatableEditPart { >+public class <%=genDiagram.getEditPartClassName()%> extends AbstractGraphicalEditPart implements <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%> { > /** > * @generated > */ >@@ -133,7 +132,7 @@ > * @generated > */ > public void addNotify() { >- getDiagram().eAdapters().add(updateManager); >+ getDiagram().eAdapters().add(getUpdateManager()); > getDiagram().getElement().eAdapters().add(domainModelRefresher); > super.addNotify(); > } >@@ -147,8 +146,8 @@ > protected Command getCreateCommand(CreateRequest request) { > <%if (null != genDiagram.getPalette()) { > final Palette palette = genDiagram.getPalette();%> >- if (request instanceof <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateRequestEx) { >- <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateRequestEx requestEx = (<%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateRequestEx) request; >+ if (request instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%> requestEx = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>) request; > int[] visualIds = requestEx.getVisualIds(); > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); > for(int i = 0; i < visualIds.length; i++) { >@@ -166,7 +165,7 @@ > %> > } > } >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagram().getElement()), result); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagram().getElement()), result); > } > <%}/*when there's palette*/%> > return null; >@@ -208,7 +207,7 @@ > bounds.setHeight(bounds.getHeight() + resize.height); > } > }; >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagram().getElement()), emfCommand); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagram().getElement()), emfCommand); > } > protected Command createChangeConstraintCommand(EditPart child, Object constraint) { > assert false; >@@ -279,60 +278,10 @@ > /** > * @generated > */ >- private class UpdateManager extends <%=importManager.getImportedName("org.eclipse.emf.ecore.util.EContentAdapter")%> { >- /** >- * @generated >- */ >- public void notifyChanged(<%=importManager.getImportedName("org.eclipse.emf.common.notify.Notification")%> msg) { >- super.notifyChanged(msg); >- if (msg.isTouch()) { >- return; >- } >- <%=importManager.getImportedName("java.util.Collection")%> affectedEditParts = findAffectedParts(msg); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = affectedEditParts.iterator(); it.hasNext(); ) { >- IUpdatableEditPart next = (IUpdatableEditPart) it.next(); >- IUpdatableEditPart.Refresher refresher = next.getRefresher((<%=importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>)msg.getFeature(), msg); >- if (refresher != null) { >- refresher.refresh(); >- } >- } >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("java.util.Collection")%>/*<IUpdatableEditPart>*/ findAffectedParts(<%=importManager.getImportedName("org.eclipse.emf.common.notify.Notification")%> msg) { >- Object notifier = msg.getNotifier(); >- if (notifier instanceof <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%>) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view = getView((EObject) notifier); >- if (view != null) { >- EditPart affectedEditPart = (EditPart) getViewer().getEditPartRegistry().get(view); >- if (affectedEditPart != null) { >- return <%=importManager.getImportedName("java.util.Collections")%>.singleton(affectedEditPart); >- } >- } >- } >- return <%=importManager.getImportedName("java.util.Collections")%>.EMPTY_LIST; >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getView(EObject offspring) { >- while (offspring != null && offspring instanceof View == false) { >- offspring = offspring.eContainer(); >- } >- return (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) offspring; >- } >- } >- >- /** >- * @generated >- */ > public void activate() { > super.activate(); >- if (!getDiagram().eAdapters().contains(updateManager)) { >- getDiagram().eAdapters().add(updateManager); >+ if (!getDiagram().eAdapters().contains(getUpdateManager())) { >+ getDiagram().eAdapters().add(getUpdateManager()); > } > if (!getDiagram().getElement().eAdapters().contains(domainModelRefresher)) { > getDiagram().getElement().eAdapters().add(domainModelRefresher); >@@ -362,7 +311,7 @@ > %> > uninstallNotationModelRefresher(); > getDiagram().getElement().eAdapters().remove(domainModelRefresher); >- getDiagram().eAdapters().remove(updateManager); >+ getDiagram().eAdapters().remove(getUpdateManager()); > super.deactivate(); > } > >@@ -385,6 +334,16 @@ > /** > * @generated > */ >- private UpdateManager updateManager = new UpdateManager(); >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager")%> updateManager; >+ >+ /** >+ * @generated >+ */ >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager")%> getUpdateManager() { >+ if (updateManager == null) { >+ updateManager = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager")%>(getViewer()); >+ } >+ return updateManager; >+ } > } > <%importManager.emitSortedImports();%> >Index: templates/parts/semanticChildren.jetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/semanticChildren.jetinc,v >retrieving revision 1.2 >diff -u -r1.2 semanticChildren.jetinc >--- templates/parts/semanticChildren.jetinc 4 Aug 2006 17:05:48 -0000 1.2 >+++ templates/parts/semanticChildren.jetinc 30 Aug 2006 15:22:25 -0000 >@@ -64,7 +64,7 @@ > <% > } > %> >- result.add(nextValue); >+ result.add(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")%>(nextValue, nodeVID)); > <% > if (generateSwitch) { > %> >Index: templates/parts/componentEditPolicy.javajetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/componentEditPolicy.javajetinc,v >retrieving revision 1.2 >diff -u -r1.2 componentEditPolicy.javajetinc >--- templates/parts/componentEditPolicy.javajetinc 22 May 2006 18:22:10 -0000 1.2 >+++ templates/parts/componentEditPolicy.javajetinc 30 Aug 2006 15:22:24 -0000 >@@ -4,7 +4,7 @@ > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> cc = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); > cc.append(getDomainModelRemoveCommand(editingDomain)); > cc.append(<%=importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")%>.create(editingDomain, getDiagramNode())); >- return new WrappingCommand(editingDomain, cc); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(editingDomain, cc); > } > > private org.eclipse.emf.common.command.Command getDomainModelRemoveCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain) { >Index: templates/parts/notationModelRefresher.jetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/notationModelRefresher.jetinc,v >retrieving revision 1.4 >diff -u -r1.4 notationModelRefresher.jetinc >--- templates/parts/notationModelRefresher.jetinc 9 Aug 2006 14:34:54 -0000 1.4 >+++ templates/parts/notationModelRefresher.jetinc 30 Aug 2006 15:22:25 -0000 >@@ -2,7 +2,7 @@ > * @generated > */ > private void installNotationModelRefresher() { >- NotationModelRefresher refresher = getNotationModelRefresher(); >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")%> refresher = getNotationModelRefresher(); > if (refresher.isInstalled()) { > return; > } >@@ -21,12 +21,12 @@ > /** > * @generated > */ >- private NotationModelRefresher notationModelRefresher; >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")%> notationModelRefresher; > > /** > * @generated > */ >- private NotationModelRefresher getNotationModelRefresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")%> getNotationModelRefresher() { > if (notationModelRefresher == null) { > notationModelRefresher = new NotationModelRefresher(); > } >@@ -36,22 +36,7 @@ > /** > * @generated > */ >- private class NotationModelRefresher extends <%=importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetListenerImpl")%> { >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter; >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain; >- >- /** >- * @generated >- */ >- public NotationModelRefresher() { >- createFilter(); >- } >+ private class NotationModelRefresher extends <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")%> { > <% > boolean hasConstraintsInChildren = false; > for (Iterator it = childNodes.iterator(); it.hasNext(); ) { >@@ -86,7 +71,7 @@ > * Creates a notification filter which filters notifications that may possibly affect the notational model > * @generated > */ >- private void createFilter() { >+ protected <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> createFilter() { > <% > { > boolean hasDeclaredFilter = false; >@@ -105,7 +90,7 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > %> >- filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createFeatureFilter(<%=importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName())%>.eINSTANCE.get<%=childMetaFeature.getFeatureAccessorName()%>()); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createFeatureFilter(<%=importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName())%>.eINSTANCE.get<%=childMetaFeature.getFeatureAccessorName()%>()); > <% > } else { > %> >@@ -120,65 +105,88 @@ > filter = filter.and(<%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createNotifierFilter(<%=_getViewCode%>.getElement())); > <% > } else { >+ hasDeclaredFilter = true; > %> >- filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createNotifierFilter(<%=_getViewCode%>.getElement()); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createNotifierFilter(<%=_getViewCode%>.getElement()); > <% > } >-} //local declaration of hasDeclaredFilter > %> > <% >-if (hasConstraintsInChildren) { >+ if (hasConstraintsInChildren) { >+ if (hasDeclaredFilter) { >+ hasDeclaredFilter = true; > %> > filter = getConstrainedChildrenFilter().or(filter); > <% >-} >+ } else { > %> >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = getConstrainedChildrenFilter(); >+<% > } >- /** >- * @generated >- */ >- public void install(<%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain) { >- if (this.editingDomain != null && !this.editingDomain.equals(editingDomain)) { >- throw new IllegalStateException("Already listening to another editing domain"); >- } >- this.editingDomain = editingDomain; >- this.editingDomain.addResourceSetListener(this); >- } >- >- /** >- * @generated >- */ >- public boolean isInstalled() { >- return editingDomain != null; >+ } >+ if (!hasDeclaredFilter) { >+%> >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.NOT_TOUCH; >+<% >+ } >+%> >+ return filter; >+<% >+} //local declaration of hasDeclaredFilter >+%> > } > > /** > * @generated > */ >- public void uninstall() { >- if (isInstalled()) { >- editingDomain.removeResourceSetListener(this); >- editingDomain = null; >+ protected <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")%> getCreateNotationalElementCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")%> descriptor) { >+ <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> domainElement = descriptor.getElement(); >+ int nodeVisualID = descriptor.getVisualID(); >+ switch (nodeVisualID) { >+<% >+for (Iterator it = childNodes.iterator(); it.hasNext(); ) { >+ GenNode nextNode = (GenNode) it.next(); >+ TypeModelFacet typeModelFacet = nextNode.getModelFacet(); >+ if (typeModelFacet == null) { >+ continue; >+ } >+ String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName()); >+%> >+ case <%=importManager.getImportedName(nextNode.getEditPartQualifiedClassName())%>.VISUAL_ID: >+ if (domainElement instanceof <%=childNodeInterfaceName%>) { >+ return new Create<%=nextNode.getDomainMetaClass().getName()%><%=nextNode.getVisualID()%>NotationCommand(getHost(), domainElement<%if (!isListLayout) {%>, new Rectangle(0, 0, 0, 0)<%}%>); >+ } >+ return null; >+<% >+} >+%> >+ default: >+ return null; > } > } > > /** > * @generated > */ >- public boolean isPrecommitOnly() { >- return true; >+ protected <%=importManager.getImportedName("java.util.List")%> getSemanticChildNodes() { >+<%@ include file="semanticChildren.jetinc" %> > } >+ > /** >+ * Returns whether a notational element should be created for the given domain element. >+ * The generated code always returns <%=genDiagram.isSynchronized()%>. >+ * User can change implementation of this method to handle a more sophisticated logic. > * @generated > */ >- public <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> transactionAboutToCommit(<%=importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetChangeEvent")%> event) { >- return getRefreshNotationModelCommand(); >+ protected boolean shouldCreateView(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")%> descriptor) { >+ return <%=genDiagram.isSynchronized()%>; > } >+ > /** > * @generated > */ >- public <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> getFilter() { >- return filter; >+ protected <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getHost() { >+ return <%=_getViewCode%>; > } > } > >@@ -186,92 +194,15 @@ > * @generated > */ > protected void refreshNotationModel() { >- <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> command = getRefreshNotationModelCommand(); >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher")%> childRefresher = getNotationModelRefresher(); >+ if (!childRefresher.isInstalled()) { >+ return; >+ } >+ <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> command = childRefresher.buildRefreshNotationModelCommand(); > if (command == null) { > return; > } > <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> domainModelEditDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(<%=_getDiagramCode%>.getElement()); >- getViewer().getEditDomain().getCommandStack().execute(new WrappingCommand(domainModelEditDomain, command)); >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> getRefreshNotationModelCommand() { >- <%=importManager.getImportedName("java.util.List")%> semanticChildren = getSemanticChildren(); >- <%=importManager.getImportedName("java.util.List")%> notationalChildren = <%=_getViewCode%>.getChildren(); >- final <%=importManager.getImportedName("java.util.Map")%> semanticToNotational = new <%=importManager.getImportedName("java.util.HashMap")%>(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = notationalChildren.iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(); >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> nextSemantic = next.getElement(); >- if (nextSemantic != null) { >- semanticToNotational.put(nextSemantic, next); >- } >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView = <%=_getViewCode%>; >- <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> command = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = semanticChildren.iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> next = (<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%>) it.next(); >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> currentView = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) semanticToNotational.remove(next); >- int nodeVisualID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.INSTANCE.getNodeVisualID(parentView, next); >- if (currentView == null) { >- if (shouldCreateView(next)) { >- command.appendIfCanExecute(getCreateNotationalElementCommand(parentView, next, nodeVisualID)); >- } >- } else if (nodeVisualID != <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getVisualID(currentView)) { >- <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")%> notationalCommand = getCreateNotationalElementCommand(parentView, next, nodeVisualID); >- if (notationalCommand != null) { >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReplaceNotationalElementCommand")%>(parentView, notationalCommand, currentView)); >- } >- } >- } >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = semanticToNotational.values().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> obsoleteView = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(); >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalElementCommand")%>(parentView, obsoleteView)); >- } >- return command.getCommandList().isEmpty() ? null : command; >+ getViewer().getEditDomain().getCommandStack().execute(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(domainModelEditDomain, command)); > } > >- /** >- * @generated >- */ >- private <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")%> getCreateNotationalElementCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> domainElement, int nodeVisualID) { >- switch (nodeVisualID) { >-<% >-for (Iterator it = childNodes.iterator(); it.hasNext(); ) { >- GenNode nextNode = (GenNode) it.next(); >- TypeModelFacet typeModelFacet = nextNode.getModelFacet(); >- if (typeModelFacet == null) { >- continue; >- } >- String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName()); >-%> >- case <%=importManager.getImportedName(nextNode.getEditPartQualifiedClassName())%>.VISUAL_ID: >- if (domainElement instanceof <%=childNodeInterfaceName%>) { >- return new Create<%=nextNode.getDomainMetaClass().getName()%><%=nextNode.getVisualID()%>NotationCommand(parentView, domainElement<%if (!isListLayout) {%>, new Rectangle(0, 0, 0, 0)<%}%>); >- } >- return null; >-<% >-} >-%> >- default: >- return null; >- } >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("java.util.List")%> getSemanticChildren() { >-<%@ include file="semanticChildren.jetinc" %> >- } >- >- /** >- * Returns whether a notational element should be created for the given domain element. >- * The generated code always returns <%=genDiagram.isSynchronized()%>. >- * User can change implementation of this method to handle a more sophisticated logic. >- * @generated >- */ >- private boolean shouldCreateView(EObject domainElement) { >- return <%=genDiagram.isSynchronized()%>; >- } >Index: templates/parts/WrappingCommand.javajet >=================================================================== >RCS file: templates/parts/WrappingCommand.javajet >diff -N templates/parts/WrappingCommand.javajet >--- templates/parts/WrappingCommand.javajet 22 May 2006 18:22:10 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,90 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.parts" class="WrappingCommandGenerator" >- imports="org.eclipse.gmf.codegen.gmfgen.* org.eclipse.gmf.common.codegen.*"%> >-<% >-GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-final GenPlugin genPlugin = genDiagram.getEditorGen().getPlugin(); >-%> >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.addImport("org.eclipse.core.commands.ExecutionException"); >-importManager.addImport("org.eclipse.core.commands.operations.IUndoableOperation"); >-importManager.addImport("org.eclipse.core.runtime.NullProgressMonitor"); >-importManager.addImport("org.eclipse.emf.transaction.TransactionalEditingDomain"); >-importManager.addImport("org.eclipse.emf.workspace.EMFCommandOperation"); >-importManager.addImport("org.eclipse.gef.commands.Command"); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * Wraps a EMF command into a GEF command. The undelying EMF command will be executed within a transaction provided by the specified editing domain. >- * @generated >- */ >-public class WrappingCommand extends Command { >- /** >- * @generated >- */ >- private final IUndoableOperation operation; >- >- /** >- * @generated >- */ >- protected WrappingCommand(IUndoableOperation operation) { >- this.operation = operation; >- } >- >- /** >- * @generated >- */ >- public WrappingCommand(TransactionalEditingDomain editingDomain, org.eclipse.emf.common.command.Command emfCommand) { >- this.operation = new EMFCommandOperation(editingDomain, emfCommand); >- } >- >- /** >- * @generated >- */ >- public void execute() { >- try { >- operation.execute(new NullProgressMonitor(), null); >- } catch (ExecutionException e) { >- <%=importManager.getImportedName(genPlugin.getActivatorQualifiedClassName())%>.getInstance().logError("exception occurred while executing operation", e); >- } >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return operation.canExecute(); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- try { >- operation.undo(new NullProgressMonitor(), null); >- } catch (ExecutionException e) { >- <%=importManager.getImportedName(genPlugin.getActivatorQualifiedClassName())%>.getInstance().logError("exception occurred while undoing operation", e); >- } >- } >- >- /** >- * @generated >- */ >- public boolean canUndo() { >- return operation.canUndo(); >- } >- >- /** >- * @generated >- */ >- public void redo() { >- try { >- operation.redo(new NullProgressMonitor(), null); >- } catch (ExecutionException e) { >- <%=importManager.getImportedName(genPlugin.getActivatorQualifiedClassName())%>.getInstance().logError("exception occurred while redoing operation", e); >- } >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/parts/LinkEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/LinkEditPart.javajet,v >retrieving revision 1.7 >diff -u -r1.7 LinkEditPart.javajet >--- templates/parts/LinkEditPart.javajet 2 Aug 2006 10:43:51 -0000 1.7 >+++ templates/parts/LinkEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -15,7 +15,7 @@ > /** > * @generated > */ >-public class <%=genLink.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractConnectionEditPart")%> implements IUpdatableEditPart { >+public class <%=genLink.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractConnectionEditPart")%> implements <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%> { > <%{ > GenCommonBase genCommonBase = genLink;%> > <%@ include file="visualID.jetinc"%> >@@ -45,7 +45,7 @@ > //XXX: install correct edit policies! > <%@ include file="linkComponentEditPolicy.javajetinc"%> > installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.CONNECTION_ENDPOINTS_ROLE, new <%=importManager.getImportedName("org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy")%>()); >- installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.CONNECTION_BENDPOINTS_ROLE, new <%=importManager.getImportedName(genDiagram.getEditPoliciesPackageName() + ".BendpointEditPolicy")%>()); >+ installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.CONNECTION_BENDPOINTS_ROLE, new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.policies.BendpointEditPolicy")%>()); > } > > <% >Index: templates/parts/LinkLabelEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/LinkLabelEditPart.javajet,v >retrieving revision 1.9 >diff -u -r1.9 LinkLabelEditPart.javajet >--- templates/parts/LinkLabelEditPart.javajet 4 Aug 2006 17:05:48 -0000 1.9 >+++ templates/parts/LinkLabelEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -273,7 +273,7 @@ > /** > * @generated > */ >- private IUpdatableEditPart.Refresher labelRefresher = new IUpdatableEditPart.Refresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher labelRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher() { > public void refresh() { > refreshLabel(); > } >@@ -283,7 +283,7 @@ > /** > * @generated > */ >- private IUpdatableEditPart.Refresher fontColorRefresher = new IUpdatableEditPart.Refresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher fontColorRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher() { > public void refresh() { > refreshFontColor(); > } >@@ -292,7 +292,7 @@ > /** > * @generated > */ >- private IUpdatableEditPart.Refresher fontRefresher = new IUpdatableEditPart.Refresher() { >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher fontRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%>.Refresher() { > public void refresh() { > refreshFont(); > } >Index: templates/parts/notificationFilter.jetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/notificationFilter.jetinc,v >retrieving revision 1.1 >diff -u -r1.1 notificationFilter.jetinc >--- templates/parts/notificationFilter.jetinc 2 Aug 2006 10:43:51 -0000 1.1 >+++ templates/parts/notificationFilter.jetinc 30 Aug 2006 15:22:25 -0000 >@@ -11,7 +11,7 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > %> >- filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createFeatureFilter(<%=importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())%>.eINSTANCE.get<%=_feature.getFeatureAccessorName()%>()); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.createFeatureFilter(<%=importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())%>.eINSTANCE.get<%=_feature.getFeatureAccessorName()%>()); > <% > } else { > %> >Index: templates/parts/CompartmentEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/CompartmentEditPart.javajet,v >retrieving revision 1.7 >diff -u -r1.7 CompartmentEditPart.javajet >--- templates/parts/CompartmentEditPart.javajet 4 Aug 2006 17:05:48 -0000 1.7 >+++ templates/parts/CompartmentEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -25,7 +25,7 @@ > /** > * @generated > */ >-public class <%=genCompartment.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")%> implements IUpdatableEditPart { >+public class <%=genCompartment.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")%> implements <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%> { > <%{ > GenCommonBase genCommonBase = genCompartment;%> > <%@ include file="visualID.jetinc"%> >@@ -99,7 +99,7 @@ > bounds.setHeight(bounds.getHeight() + resize.height); > } > }; >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(node.getDiagram().getElement()), emfCommand); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(node.getDiagram().getElement()), emfCommand); > } > protected Command createChangeConstraintCommand(EditPart child, Object constraint) { > assert false; >@@ -120,8 +120,8 @@ > protected Command getCreateCommand(CreateRequest request) { > <%if (null != genDiagram.getPalette()) { > final Palette palette = genDiagram.getPalette();%> >- if (request instanceof <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateRequestEx) { >- <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateRequestEx requestEx = (<%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>.CreateRequestEx) request; >+ if (request instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%> requestEx = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>) request; > int[] visualIds = requestEx.getVisualIds(); > <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); > for(int i = 0; i < visualIds.length; i++) { >@@ -140,7 +140,7 @@ > %> > } > } >- return new WrappingCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(((View) getModel()).getDiagram().getElement()), result); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(((View) getModel()).getDiagram().getElement()), result); > } > <%}/*when there's palette*/%> > return null; >Index: templates/parts/IUpdatableEditPart.javajet >=================================================================== >RCS file: templates/parts/IUpdatableEditPart.javajet >diff -N templates/parts/IUpdatableEditPart.javajet >--- templates/parts/IUpdatableEditPart.javajet 9 Aug 2006 14:34:54 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,69 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.parts" class="UpdatableEditPartGenerator" >- imports="org.eclipse.gmf.common.codegen.* "%> >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-%> >- >-import java.util.ArrayList; >-import java.util.Collection; >-import java.util.Iterator; >- >-import org.eclipse.emf.common.notify.Notification; >-import org.eclipse.emf.ecore.EStructuralFeature; >- >-/** >- * @generated >- */ >-public interface IUpdatableEditPart { >- /** >- * @generated >- */ >- public Refresher getRefresher(EStructuralFeature feature, Notification msg); >- /** >- * @generated >- */ >- public interface Refresher { >- /** >- * @generated >- */ >- public void refresh(); >- } >- >- /** >- * @generated >- */ >- public class CompositeRefresher implements Refresher { >- /** >- * @generated >- */ >- public void addRefresher(Refresher refresher) { >- refreshers.add(refresher); >- } >- >- /** >- * @generated >- */ >- public void removeRefresher(Refresher refresher) { >- refreshers.remove(refresher); >- } >- >- /** >- * @generated >- */ >- public void refresh() { >- for(Iterator it = refreshers.iterator(); it.hasNext(); ) { >- Refresher next = (Refresher) it.next(); >- next.refresh(); >- } >- } >- >- /** >- * @generated >- */ >- private Collection/*<Refresher>*/ refreshers = new ArrayList(); >- } >-} >Index: templates/parts/semanticChildLinks.jetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/semanticChildLinks.jetinc,v >retrieving revision 1.2 >diff -u -r1.2 semanticChildLinks.jetinc >--- templates/parts/semanticChildLinks.jetinc 4 Aug 2006 17:05:48 -0000 1.2 >+++ templates/parts/semanticChildLinks.jetinc 30 Aug 2006 15:22:25 -0000 >@@ -85,7 +85,7 @@ > } > %> > if (source != null && target != null) { >- result.add(new LinkDescriptor(source, target, nextValue, linkVID)); >+ result.add(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")%>(source, target, nextValue, linkVID)); > } > <% > if (generateSwitch) { >@@ -132,7 +132,7 @@ > for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { > GenLink nextLink = (GenLink) genLinksIterator.next(); > %> >- result.add(new LinkDescriptor(modelObject, nextValue, null, <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID)); >+ result.add(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")%>(modelObject, nextValue, null, <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID)); > <% > } > %> >Index: templates/parts/createNodeCommand.javajetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/createNodeCommand.javajetinc,v >retrieving revision 1.4 >diff -u -r1.4 createNodeCommand.javajetinc >--- templates/parts/createNodeCommand.javajetinc 4 Aug 2006 17:05:48 -0000 1.4 >+++ templates/parts/createNodeCommand.javajetinc 30 Aug 2006 15:22:24 -0000 >@@ -1,7 +1,7 @@ > /** > * @generated > */ >- private <%if (isStatic) {%>static <%}%>class Create<%=next.getDomainMetaClass().getName()%><%=next.getVisualID()%>NotationCommand extends <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")%> { >+ private <%if (isStatic) {%>static <%}%>class Create<%=next.getDomainMetaClass().getName()%><%=next.getVisualID()%>NotationCommand extends <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand")%> { > /** > * @generated > */ >@@ -51,7 +51,7 @@ > /** > * @generated > */ >- public Create<%=next.getDomainMetaClass().getName()%><%=next.getVisualID()%>Command(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parent, <%=importManager.getImportedName(genDiagram.getPalette().getFactoryQualifiedClassName())%>.CreateRequestEx request<%if (!isListLayout) {%>, <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> constraint<%}%>) { >+ public Create<%=next.getDomainMetaClass().getName()%><%=next.getVisualID()%>Command(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parent, <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%> request<%if (!isListLayout) {%>, <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> constraint<%}%>) { > <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> domainModelEditDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(parent.getDiagram().getElement()); > <% > if (next.getDomainMetaClass().isMapEntry()) { >Index: templates/parts/linkDescriptor.jetinc >=================================================================== >RCS file: templates/parts/linkDescriptor.jetinc >diff -N templates/parts/linkDescriptor.jetinc >--- templates/parts/linkDescriptor.jetinc 2 Aug 2006 10:43:51 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,71 +0,0 @@ >-<%/*inner class*/%> >-/** >- * @generated >- */ >-private static class LinkDescriptor { >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> mySource; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> myDestination; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> myLinkElement; >- >- /** >- * @generated >- */ >- private int myVisualID; >- >- /** >- * @generated >- */ >- protected LinkDescriptor(<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> source, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> destination, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> linkElement, int linkVID) { >- this(source, destination, linkVID); >- myLinkElement = linkElement; >- } >- >- /** >- * @generated >- */ >- private LinkDescriptor(<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> source, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> destination, int linkVID) { >- mySource = source; >- myDestination = destination; >- myVisualID = linkVID; >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> getSource() { >- return mySource; >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> getDestination() { >- return myDestination; >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> getLinkElement() { >- return myLinkElement; >- } >- >- /** >- * @generated >- */ >- protected int getVisualID() { >- return myVisualID; >- } >-} >Index: templates/parts/directEditPolicy.javajetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/directEditPolicy.javajetinc,v >retrieving revision 1.3 >diff -u -r1.3 directEditPolicy.javajetinc >--- templates/parts/directEditPolicy.javajetinc 22 May 2006 18:22:10 -0000 1.3 >+++ templates/parts/directEditPolicy.javajetinc 30 Aug 2006 15:22:25 -0000 >@@ -29,14 +29,14 @@ > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; > } > <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]); >- return new WrappingCommand(editingDomain, domainModelCommand); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(editingDomain, domainModelCommand); > } > <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> createDomainModelCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain, Object value) { > <%=importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())%> element = <%=resolvedSemanticElement%>; > <%=importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")%> feature = (<%=importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")%>) <%=importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())%>.eINSTANCE.get<%=featureToSet.getFeatureAccessorName()%>(); > Object valueToSet; > try { >- valueToSet = <%=importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())%>.parseValue(feature, value); >+ valueToSet = <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")%>.parseValue(feature, value); > } catch (IllegalArgumentException e) { > return <%=importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")%>.INSTANCE; > } >@@ -66,7 +66,7 @@ > return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE; > } > <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> domainModelCommand = createDomainModelCommand(editingDomain, parseResult); >- return new WrappingCommand(editingDomain, domainModelCommand); >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(editingDomain, domainModelCommand); > } > <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> createDomainModelCommand(<%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain, Object[] values) { > <%=importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())%> element = <%=resolvedSemanticElement%>; >@@ -80,7 +80,7 @@ > %> > <%if (i == 0) {%><%=importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")%> <%}%>feature = (<%=importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")%>) <%=importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())%>.eINSTANCE.get<%=nextFeatureToSet.getFeatureAccessorName()%>(); > try { >- valueToSet = <%=importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())%>.parseValue(feature, values[<%=i%>]); >+ valueToSet = <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")%>.parseValue(feature, values[<%=i%>]); > } catch (IllegalArgumentException e) { > return <%=importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")%>.INSTANCE; > } >Index: templates/parts/ChildNodeEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/ChildNodeEditPart.javajet,v >retrieving revision 1.8 >diff -u -r1.8 ChildNodeEditPart.javajet >--- templates/parts/ChildNodeEditPart.javajet 4 Aug 2006 17:05:48 -0000 1.8 >+++ templates/parts/ChildNodeEditPart.javajet 30 Aug 2006 15:22:24 -0000 >@@ -29,7 +29,7 @@ > /** > * @generated > */ >-public class <%=genChildNode.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")%> implements IUpdatableEditPart { >+public class <%=genChildNode.getEditPartClassName()%> extends <%=importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")%> implements <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")%> { > <%{ > GenCommonBase genCommonBase = genChildNode;%> > <%@ include file="visualID.jetinc"%> >Index: templates/parts/linkNotationModelRefresher.jetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/linkNotationModelRefresher.jetinc,v >retrieving revision 1.2 >diff -u -r1.2 linkNotationModelRefresher.jetinc >--- templates/parts/linkNotationModelRefresher.jetinc 4 Aug 2006 17:05:48 -0000 1.2 >+++ templates/parts/linkNotationModelRefresher.jetinc 30 Aug 2006 15:22:25 -0000 >@@ -27,11 +27,27 @@ > private LinkNotationModelRefresher linkNotationModelRefresher; > > /** >+ * Service to find a notational element that corresponds to the given underlying domain element. >+ * @generated >+ */ >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")%> viewService; >+ >+ /** >+ * @generated >+ */ >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")%> getViewService() { >+ if (viewService == null) { >+ viewService = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService")%>(getViewer()); >+ } >+ return viewService; >+ } >+ >+ /** > * @generated > */ > private LinkNotationModelRefresher getLinkNotationModelRefresher() { > if (linkNotationModelRefresher == null) { >- linkNotationModelRefresher = new LinkNotationModelRefresher(); >+ linkNotationModelRefresher = new LinkNotationModelRefresher(getViewService()); > } > return linkNotationModelRefresher; > } >@@ -39,21 +55,12 @@ > /** > * @generated > */ >- private class LinkNotationModelRefresher extends <%=importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetListenerImpl")%> { >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter; >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain; >- >+ private class LinkNotationModelRefresher extends <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher")%> { > /** > * @generated > */ >- public LinkNotationModelRefresher() { >- createFilter(); >+ public LinkNotationModelRefresher(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")%> viewService) { >+ super(viewService); > } > <% > boolean hasConstraintsInContainedLinks = false; >@@ -101,7 +108,7 @@ > * Creates a notification filter which filters notifications that may possibly affect the notational model > * @generated > */ >- private void createFilter() { >+ protected <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> createFilter() { > <% > { > boolean hasDeclaredFilter = false; >@@ -140,7 +147,7 @@ > } else { > hasDeclaredFilter = true; > %> >- filter = getConstrainedChildLinksFilter(); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = getConstrainedChildLinksFilter(); > <% > } > } >@@ -152,233 +159,32 @@ > } else { > hasDeclaredFilter = true; > %> >- filter = createUncontainedLinksFilter(); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = createUncontainedLinksFilter(); > <% > } > } > if (!hasDeclaredFilter) { > %> >- filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.ANY.negated(); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> filter = <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%>.NOT_TOUCH; > <% > } > } //local declaration of hasDeclaredFilter > %> >- } >- /** >- * @generated >- */ >- public void install(<%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain) { >- if (this.editingDomain != null && !this.editingDomain.equals(editingDomain)) { >- throw new IllegalStateException("Already listening to another editing domain"); >- } >- this.editingDomain = editingDomain; >- this.editingDomain.addResourceSetListener(this); >- } >- /** >- * @generated >- */ >- public boolean isInstalled() { >- return editingDomain != null; >- } >- >- /** >- * @generated >- */ >- public void uninstall() { >- if (isInstalled()) { >- editingDomain.removeResourceSetListener(this); >- editingDomain = null; >- } >- } >- >- /** >- * @generated >- */ >- public boolean isPrecommitOnly() { >- return true; >- } >- /** >- * @generated >- */ >- public <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> transactionAboutToCommit(<%=importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetChangeEvent")%> event) { >- return getRefreshLinkNotationModelCommand(); >- } >- /** >- * @generated >- */ >- public <%=importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")%> getFilter() { > return filter; > } >- } >- >- /** >- * @generated >- */ >- protected void refreshLinkNotationModel() { >- <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> command = getRefreshLinkNotationModelCommand(); >- if (command == null) { >- return; >- } >- <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> domainModelEditDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(<%=_getDiagramCode%>.getElement()); >- getViewer().getEditDomain().getCommandStack().execute(new WrappingCommand(domainModelEditDomain, command)); >- } >- >-<%@include file="linkDescriptor.jetinc"%> >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> getRefreshLinkNotationModelCommand() { >- <%=importManager.getImportedName("java.util.List")%>/*<LinkDescriptor>*/ semanticChildLinks = getSemanticChildLinks(); >- <%=importManager.getImportedName("java.util.List")%>/*<Edge>*/ notationalChildLinks = getNotationalChildLinks(); >- final <%=importManager.getImportedName("java.util.Map")%> semanticToNotationalTypeBasedLinks = new <%=importManager.getImportedName("java.util.HashMap")%>(); >- final <%=importManager.getImportedName("java.util.Map")%>/*<EObject, List<Edge>>*/ semanticToNotationalFeatureBasedLinks = new <%=importManager.getImportedName("java.util.HashMap")%>(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = notationalChildLinks.iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) it.next(); >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> nextSemantic = next.getElement(); >- if (nextSemantic != null) { >- semanticToNotationalTypeBasedLinks.put(nextSemantic, next); >- } else { >- <%=importManager.getImportedName("java.util.List")%> featureBasedLinksForSource = (<%=importManager.getImportedName("java.util.List")%>) semanticToNotationalFeatureBasedLinks.get(next.getSource().getElement()); >- if (featureBasedLinksForSource == null) { >- featureBasedLinksForSource = new <%=importManager.getImportedName("java.util.LinkedList")%>(); >- semanticToNotationalFeatureBasedLinks.put(next.getSource().getElement(), featureBasedLinksForSource); >- } >- featureBasedLinksForSource.add(next); >- } >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView = <%=_getDiagramCode%>; >- <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> command = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = semanticChildLinks.iterator(); it.hasNext(); ) { >- LinkDescriptor next = (LinkDescriptor) it.next(); >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> nextLinkElement = next.getLinkElement(); >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> currentEdge; >- if (nextLinkElement != null) { >- currentEdge = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) semanticToNotationalTypeBasedLinks.remove(nextLinkElement); >- } else { >- <%=importManager.getImportedName("java.util.List")%> featureBasedLinksForSource = (<%=importManager.getImportedName("java.util.List")%>) semanticToNotationalFeatureBasedLinks.get(next.getSource()); >- if (featureBasedLinksForSource == null || featureBasedLinksForSource.isEmpty()) { >- currentEdge = null; >- } else { >- currentEdge = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) featureBasedLinksForSource.remove(0); >- } >- } >- int linkVisualID = next.getVisualID(); >- if (currentEdge == null) { >- if (nextLinkElement == null || shouldCreateEdge(nextLinkElement)) { >- command.appendIfCanExecute(getCreateNotationalEdgeCommand(parentView, next)); >- } >- } else { >- boolean changedSource = currentEdge.getSource().getElement() != next.getSource(); >- boolean changedTarget = currentEdge.getTarget().getElement() != next.getDestination(); >- boolean changedVID = linkVisualID != <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getVisualID(currentEdge); >- if (!changedSource && !changedTarget) { >- if (changedVID) { >- <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")%> notationalCommand = getCreateNotationalEdgeCommand(parentView, next); >- if (notationalCommand != null) { >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReplaceNotationalElementCommand")%>(parentView, notationalCommand, currentEdge)); >- } else { >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")%>(parentView, currentEdge)); >- } >- } >- } else { >- if (changedVID) { >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")%>(parentView, currentEdge)); >- command.appendIfCanExecute(getCreateNotationalEdgeCommand(parentView, next)); >- } else { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> newSourceView = findView(next.getSource()); >- if (changedSource && newSourceView != null) { >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeSourceCommand")%>(currentEdge, newSourceView)); >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> newTargetView = findView(next.getDestination()); >- if (changedTarget && newTargetView != null) { >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeTargetCommand")%>(currentEdge, newTargetView)); >- } >- } >- } >- } >- } >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = semanticToNotationalTypeBasedLinks.values().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> obsoleteView = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(); >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")%>(parentView, obsoleteView)); >- } >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = semanticToNotationalFeatureBasedLinks.values().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("java.util.List")%> obsoleteViews = (<%=importManager.getImportedName("java.util.List")%>) it.next(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> obsoleteViewsIt = obsoleteViews.iterator(); obsoleteViewsIt.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> obsoleteView = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) obsoleteViewsIt.next(); >- command.appendIfCanExecute(new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")%>(parentView, obsoleteView)); >- } >- } >- return command.getCommandList().isEmpty() ? null : command; >- } >- >- /** >- * Finds a notational element that corresponds to the given underlying domain element. >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> findView(<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> modelElement) { >- if (modelElement == null) { >- return null; >- } >- <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> editPart = (<%=importManager.getImportedName("org.eclipse.gef.EditPart")%>) getViewer().getEditPartRegistry().get(modelElement); >- if (editPart != null && editPart.getModel() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) { >- return (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) editPart.getModel(); >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView = findView(modelElement.eContainer()); >- if (parentView != null) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> result = findNode(parentView, modelElement); >- if (result != null) { >- return result; >- } >- } >- return findEdge(modelElement); >- } >- >- /** >- * Finds a notational node that corresponds to the given underlying domain element in a subtree starting from the given parent element. >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> findNode(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> modelElement) { >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = parentView.getChildren().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(); >- if (!next.isSetElement() || next.getElement() == parentView) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> result = findNode(next, modelElement); >- if (result != null) { >- return result; >- } >- } >- if (next.isSetElement() && next.getElement() == modelElement) { >- return next; >- } >- } >- return null; >- } > >- /** >- * Finds a notational edge that corresponds to the given underlying domain element. >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> findEdge(<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> modelElement) { >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = <%=_getDiagramCode%>.getEdges().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) it.next(); >- if (next.isSetElement() && next.getElement() == modelElement) { >- return next; >+ /** >+ * @generated >+ */ >+ protected <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")%> getCreateNotationalElementCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")%> descriptor) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")%> linkDescriptor = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")%>) descriptor; >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> sourceView = getViewService().findView(linkDescriptor.getSource()); >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> targetView = getViewService().findView(linkDescriptor.getDestination()); >+ if (sourceView == null || targetView == null) { >+ return null; > } >- } >- return null; >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")%> getCreateNotationalEdgeCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView, LinkDescriptor linkDescriptor) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> sourceView = findView(linkDescriptor.getSource()); >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> targetView = findView(linkDescriptor.getDestination()); >- if (sourceView == null || targetView == null) { >- return null; >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> createdEdge = <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")%>.eINSTANCE.createEdge(); >- switch (linkDescriptor.getVisualID()) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> createdEdge = <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")%>.eINSTANCE.createEdge(); >+ switch (linkDescriptor.getVisualID()) { > <% > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); >@@ -387,139 +193,158 @@ > continue; > } > %> >- case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: >- if (linkDescriptor.getLinkElement() instanceof <%=importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName())%>) { >- createdEdge.setElement(linkDescriptor.getLinkElement()); >- <%=importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())%>.decorateView(createdEdge); >- } >- break; >+ case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: >+ if (linkDescriptor.getElement() instanceof <%=importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName())%>) { >+ createdEdge.setElement(linkDescriptor.getElement()); >+ <%=importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())%>.decorateView(createdEdge); >+ } >+ break; > <% > } > for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > %> >- case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: >- if (linkDescriptor.getLinkElement() == null) { >- createdEdge.setElement(null); >- <%=importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())%>.decorateView(createdEdge); >- } >- break; >+ case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: >+ if (linkDescriptor.getElement() == null) { >+ createdEdge.setElement(null); >+ <%=importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())%>.decorateView(createdEdge); >+ } >+ break; > <% > } > %> >+ } >+ if (createdEdge.getType() == null) { >+ return null; >+ } >+ return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand")%>(getHost().getDiagram(), createdEdge, sourceView, targetView); > } >- if (createdEdge.getType() == null) { >- return null; >- } >- return new <%=importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")%>(parentView, createdEdge, sourceView, targetView); >- } > >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("java.util.List")%> getSemanticChildLinks() { >+ /** >+ * @generated >+ */ >+ protected <%=importManager.getImportedName("java.util.List")%> getSemanticChildLinks() { > <%@include file="semanticChildLinks.jetinc"%> >- } >+ } > >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("java.util.List")%> getNotationalChildLinks() { >- <%=importManager.getImportedName("java.util.List")%> result = new <%=importManager.getImportedName("java.util.LinkedList")%>(); >- <%=importManager.getImportedName("java.util.List")%> allLinks = <%=_getDiagramCode%>.getEdges(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = allLinks.iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) it.next(); >+ /** >+ * @generated >+ */ >+ protected <%=importManager.getImportedName("java.util.List")%> getNotationalChildLinks() { >+ <%=importManager.getImportedName("java.util.List")%> result = new <%=importManager.getImportedName("java.util.LinkedList")%>(); >+ <%=importManager.getImportedName("java.util.List")%> allLinks = <%=_getDiagramCode%>.getEdges(); >+ for(<%=importManager.getImportedName("java.util.Iterator")%> it = allLinks.iterator(); it.hasNext(); ) { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) it.next(); > <% > if (_includeUncontainedLinks) { > %> >- if (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) { >- result.add(next); >- continue; >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> source = next.getSource(); >- if (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) { >- result.add(next); >- continue; >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> target = next.getTarget(); >- if (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) { >- result.add(next); >- continue; >- } >+ if (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) { >+ result.add(next); >+ continue; >+ } >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> source = next.getSource(); >+ if (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) { >+ result.add(next); >+ continue; >+ } >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> target = next.getTarget(); >+ if (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) { >+ result.add(next); >+ continue; >+ } > <% > } >-%> >-<% > if (myHelper.containsFeatureModelFacetLinks()) { > %> >- if (!next.isSetElement() || next.getElement() == null) { >- if (next.getSource() == <%=_getViewCode%>) { >- int linkVID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getVisualID(next); >- switch (linkVID) { >+ if (!next.isSetElement() || next.getElement() == null) { >+ if (next.getSource() == <%=_getViewCode%>) { >+ int linkVID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getVisualID(next); >+ switch (linkVID) { > <% > for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > %> >- case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: >+ case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: > <% > } > %> >- result.add(next); >- break; >+ result.add(next); >+ break; >+ } > } >- } > <% > if (myHelper.containsTypeModelFacetLinks()) { > %> >- } else { >+ } else { > <% > } else { > %> >- } >+ } > <% > } > } >- >-%> >-<% > if (myHelper.containsTypeModelFacetLinks()) { > if (!myHelper.containsFeatureModelFacetLinks()) { > %> >- if (next.isSetElement() && next.getElement() != null) { >+ if (next.isSetElement() && next.getElement() != null) { > <% > } > %> >- if (next.getElement().eContainer() == <%=_getViewCode%>.getElement()) { >- int linkVID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getVisualID(next); >- switch (linkVID) { >+ if (next.getElement().eContainer() == <%=_getViewCode%>.getElement()) { >+ int linkVID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getVisualID(next); >+ switch (linkVID) { > <% > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > %> >- case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: >+ case <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID: > <% > } > %> >- result.add(next); >- break; >+ result.add(next); >+ break; >+ } > } > } >- } > <% > } > %> >+ } >+ return result; >+ } >+ >+ /** >+ * Returns whether a notational edge should be created for the given domain element. >+ * The generated code always returns <%=genDiagram.isSynchronized()%>. >+ * User can change implementation of this method to handle a more sophisticated logic. >+ * @generated >+ */ >+ protected boolean shouldCreateView(<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")%> descriptor) { >+ return <%=genDiagram.isSynchronized()%>; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getHost() { >+ return <%=_getViewCode%>; > } >- return result; > } > > /** >- * Returns whether a notational edge should be created for the given domain element. >- * The generated code always returns <%=genDiagram.isSynchronized()%>. >- * User can change implementation of this method to handle a more sophisticated logic. > * @generated > */ >- private boolean shouldCreateEdge(EObject domainElement) { >- return <%=genDiagram.isSynchronized()%>; >+ protected void refreshLinkNotationModel() { >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher")%> linkRefresher = getLinkNotationModelRefresher(); >+ if (!linkRefresher.isInstalled()) { >+ return; >+ } >+ <%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> command = linkRefresher.buildRefreshNotationModelCommand(); >+ if (command == null) { >+ return; >+ } >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> domainModelEditDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(<%=_getDiagramCode%>.getElement()); >+ getViewer().getEditDomain().getCommandStack().execute(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(domainModelEditDomain, command)); > } > <% > } >Index: templates/parts/refreshers.javajetinc/domainModelRefresher.javajetinc >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/refreshers.javajetinc/domainModelRefresher.javajetinc,v >retrieving revision 1.1 >diff -u -r1.1 domainModelRefresher.javajetinc >--- templates/parts/refreshers.javajetinc/domainModelRefresher.javajetinc 13 Apr 2006 21:20:16 -0000 1.1 >+++ templates/parts/refreshers.javajetinc/domainModelRefresher.javajetinc 30 Aug 2006 15:22:25 -0000 >@@ -1,23 +1,4 @@ > /** > * @generated > */ >- private DomainModelRefresher domainModelRefresher = new DomainModelRefresher(); >- >- /** >- * @generated >- */ >- private class DomainModelRefresher extends <%=importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")%> { >- /** >- * @generated >- */ >- public void notifyChanged(<%=importManager.getImportedName("org.eclipse.emf.common.notify.Notification")%> msg) { >- super.notifyChanged(msg); >- if (msg.isTouch()) { >- return; >- } >- Refresher refresher = getRefresher((<%=importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>) msg.getFeature(), msg); >- if (refresher != null) { >- refresher.refresh(); >- } >- } >- } >+ private <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")%> domainModelRefresher = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")%>(this); >Index: src/org/eclipse/gmf/internal/codegen/lite/Generator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src/org/eclipse/gmf/internal/codegen/lite/Generator.java,v >retrieving revision 1.12 >diff -u -r1.12 Generator.java >--- src/org/eclipse/gmf/internal/codegen/lite/Generator.java 28 Aug 2006 17:20:15 -0000 1.12 >+++ src/org/eclipse/gmf/internal/codegen/lite/Generator.java 30 Aug 2006 15:22:24 -0000 >@@ -83,15 +83,11 @@ > internalGenerateJavaClass(myEmitters.getActionBarContributorGenerator(), myEditorGen.getEditor().getActionBarContributorQualifiedClassName(), myEditorGen.getEditor()); > internalGenerateJavaClass(myEmitters.getDiagramEditorUtilGenerator(), myDiagram.getDiagramEditorUtilQualifiedClassName(), myDiagram); > internalGenerateJavaClass(myEmitters.getEditorGenerator(), myEditorGen.getEditor().getQualifiedClassName(), myEditorGen.getEditor()); >- internalGenerateJavaClass(myEmitters.getPropertySourceProviderGenerator(), myDiagram.getPropertyProviderQualifiedClassName(), myDiagram); > if (myDiagram.getPalette() != null) { > internalGenerateJavaClass(myEmitters.getPaletteFactoryGenerator(), myDiagram.getPalette().getFactoryQualifiedClassName(), myDiagram); > } >- internalGenerateJavaClass(myEmitters.getUpdatableEditPartGenerator(), myDiagram.getEditPartsPackageName(), "IUpdatableEditPart", myDiagram); // XXX: should be customizable >- internalGenerateJavaClass(myEmitters.getWrappingCommandGenerator(), myDiagram.getEditPartsPackageName(), "WrappingCommand", myDiagram); // XXX: should be customizable or moved to a lite-runtime plugin > internalGenerateJavaClass(myEmitters.getEditPartFactoryGenerator(), myDiagram.getEditPartFactoryQualifiedClassName(), myDiagram); > internalGenerateJavaClass(myEmitters.getDiagramEditPartGenerator(), myDiagram.getEditPartQualifiedClassName(), myDiagram); >- internalGenerateJavaClass(myEmitters.getBendpointEditPolicyGenerator(), myDiagram.getEditPoliciesPackageName(), "BendpointEditPolicy", myDiagram); //XXX: should be moved to a lite-runtime plugin > > for (Iterator it = myDiagram.getAllNodes().iterator(); it.hasNext(); ) { > final GenNode next = (GenNode) it.next(); >@@ -108,7 +104,6 @@ > internalGenerateJavaClass(myEmitters.getLabelViewFactoryGenerator(), next.getNotationViewFactoryQualifiedClassName(), next); > } > } >- internalGenerateJavaClass(myEmitters.getAbstractParserGenerator(),myDiagram.getAbstractParserQualifiedClassName(), myDiagram); > for (Iterator it = myDiagram.getLinks().iterator(); it.hasNext();) { > final GenLink next = (GenLink) it.next(); > internalGenerateJavaClass(myEmitters.getLinkEditPartGenerator(), next.getEditPartQualifiedClassName(), next); >@@ -130,13 +125,6 @@ > if(myDiagram.getEditorGen().getExpressionProviders() != null) { > generateExpressionProviders(); > } >- internalGenerateJavaClass(myEmitters.getCreateNotationalElementCommandGenerator(), myDiagram.getEditCommandsPackageName(), "CreateNotationalElementCommand", myDiagram); >- internalGenerateJavaClass(myEmitters.getCreateNotationalEdgeCommandGenerator(), myDiagram.getEditCommandsPackageName(), "CreateNotationalEdgeCommand", myDiagram); >- internalGenerateJavaClass(myEmitters.getRemoveNotationalElementCommandGenerator(), myDiagram.getEditCommandsPackageName(), "RemoveNotationalElementCommand", myDiagram); >- internalGenerateJavaClass(myEmitters.getRemoveNotationalEdgeCommandGenerator(), myDiagram.getEditCommandsPackageName(), "RemoveNotationalEdgeCommand", myDiagram); >- internalGenerateJavaClass(myEmitters.getReplaceNotationalElementCommandGenerator(), myDiagram.getEditCommandsPackageName(), "ReplaceNotationalElementCommand", myDiagram); >- internalGenerateJavaClass(myEmitters.getReconnectNotationalEdgeSourceCommandGenerator(), myDiagram.getEditCommandsPackageName(), "ReconnectNotationalEdgeSourceCommand", myDiagram); >- internalGenerateJavaClass(myEmitters.getReconnectNotationalEdgeTargetCommandGenerator(), myDiagram.getEditCommandsPackageName(), "ReconnectNotationalEdgeTargetCommand", myDiagram); > } > > private void generateExpressionProviders() throws UnexpectedBehaviourException, InterruptedException { >Index: src/org/eclipse/gmf/internal/codegen/lite/CodegenEmitters.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src/org/eclipse/gmf/internal/codegen/lite/CodegenEmitters.java,v >retrieving revision 1.8 >diff -u -r1.8 CodegenEmitters.java >--- src/org/eclipse/gmf/internal/codegen/lite/CodegenEmitters.java 2 Aug 2006 10:43:51 -0000 1.8 >+++ src/org/eclipse/gmf/internal/codegen/lite/CodegenEmitters.java 30 Aug 2006 15:22:24 -0000 >@@ -24,13 +24,6 @@ > import org.eclipse.gmf.internal.common.codegen.JETEmitterAdapter; > import org.eclipse.gmf.internal.common.codegen.TextEmitter; > >-import org.eclipse.gmf.codegen.templates.lite.commands.CreateNotationalEdgeCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.commands.CreateNotationalElementCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.commands.ReconnectNotationalEdgeSourceCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.commands.ReconnectNotationalEdgeTargetCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.commands.RemoveNotationalEdgeCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.commands.RemoveNotationalElementCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.commands.ReplaceNotationalElementCommandGenerator; > import org.eclipse.gmf.codegen.templates.lite.editor.ActionBarContributorGenerator; > import org.eclipse.gmf.codegen.templates.lite.editor.BuildPropertiesGenerator; > import org.eclipse.gmf.codegen.templates.lite.editor.CreationWizardGenerator; >@@ -54,17 +47,12 @@ > import org.eclipse.gmf.codegen.templates.lite.parts.LinkLabelEditPartGenerator; > import org.eclipse.gmf.codegen.templates.lite.parts.NodeEditPartGenerator; > import org.eclipse.gmf.codegen.templates.lite.parts.NodeLabelEditPartGenerator; >-import org.eclipse.gmf.codegen.templates.lite.parts.UpdatableEditPartGenerator; >-import org.eclipse.gmf.codegen.templates.lite.parts.WrappingCommandGenerator; >-import org.eclipse.gmf.codegen.templates.lite.policies.BendpointEditPolicyGenerator; >-import org.eclipse.gmf.codegen.templates.lite.providers.AbstractParserGenerator; > import org.eclipse.gmf.codegen.templates.lite.providers.CompartmentViewFactoryGenerator; > import org.eclipse.gmf.codegen.templates.lite.providers.DiagramViewFactoryGenerator; > import org.eclipse.gmf.codegen.templates.lite.providers.DomainElementInitializerGenerator; > import org.eclipse.gmf.codegen.templates.lite.providers.LabelViewFactoryGenerator; > import org.eclipse.gmf.codegen.templates.lite.providers.LinkViewFactoryGenerator; > import org.eclipse.gmf.codegen.templates.lite.providers.NodeViewFactoryGenerator; >-import org.eclipse.gmf.codegen.templates.lite.providers.PropertySourceProviderGenerator; > import org.osgi.framework.Bundle; > > /** >@@ -107,13 +95,8 @@ > put(tr, "/editor/PaletteFactory.javajet", PaletteFactoryGenerator.class); > put(tr, "/editor/VisualIDRegistry.javajet", VisualIDRegistryGenerator.class); > put(tr, "/parts/DiagramEditPart.javajet", DiagramEditPartGenerator.class); >- put(tr, "/policies/BendpointEditPolicy.javajet", BendpointEditPolicyGenerator.class); > put(tr, "/parts/EditPartFactory.javajet", EditPartFactoryGenerator.class); >- put(tr, "/parts/IUpdatableEditPart.javajet", UpdatableEditPartGenerator.class); >- put(tr, "/parts/WrappingCommand.javajet", WrappingCommandGenerator.class); >- put(tr, "/providers/AbstractParser.javajet", AbstractParserGenerator.class); > put(tr, "/providers/DomainElementInitializer.javajet", DomainElementInitializerGenerator.class); >- put(tr, "/providers/PropertySourceProvider.javajet", PropertySourceProviderGenerator.class); > put(tr, "/editor/ActionBarContributor.javajet", ActionBarContributorGenerator.class); > put(tr, "/editor/Editor.javajet", EditorGenerator.class); > put(tr, "/parts/LinkEditPart.javajet", LinkEditPartGenerator.class); >@@ -130,13 +113,6 @@ > put(tr, "/expressions/AbstractExpression.javajet", AbstractExpressionGenerator.class); > put(tr, "/expressions/OCLExpressionFactory.javajet", OCLExpressionFactoryGenerator.class); > put(tr, "/expressions/RegexpExpressionFactory.javajet", RegexpExpressionFactoryGenerator.class); >- put(tr, "/commands/CreateNotationalElementCommand.javajet", CreateNotationalElementCommandGenerator.class); >- put(tr, "/commands/CreateNotationalEdgeCommand.javajet", CreateNotationalEdgeCommandGenerator.class); >- put(tr, "/commands/ReconnectNotationalEdgeSourceCommand.javajet", ReconnectNotationalEdgeSourceCommandGenerator.class); >- put(tr, "/commands/ReconnectNotationalEdgeTargetCommand.javajet", ReconnectNotationalEdgeTargetCommandGenerator.class); >- put(tr, "/commands/RemoveNotationalElementCommand.javajet", RemoveNotationalElementCommandGenerator.class); >- put(tr, "/commands/RemoveNotationalEdgeCommand.javajet", RemoveNotationalEdgeCommandGenerator.class); >- put(tr, "/commands/ReplaceNotationalElementCommand.javajet", ReplaceNotationalElementCommandGenerator.class); > return tr; > } > >@@ -160,18 +136,10 @@ > return retrieve(NodeViewFactoryGenerator.class); > } > >- public TextEmitter getAbstractParserGenerator() throws UnexpectedBehaviourException { >- return retrieve(AbstractParserGenerator.class); >- } >- > public TextEmitter getDomainElementInitializerGenerator() throws UnexpectedBehaviourException { > return retrieve(DomainElementInitializerGenerator.class); > } > >- public TextEmitter getPropertySourceProviderGenerator() throws UnexpectedBehaviourException { >- return retrieve(PropertySourceProviderGenerator.class); >- } >- > public TextEmitter getCompartmentEditPartGenerator() throws UnexpectedBehaviourException { > return retrieve(CompartmentEditPartGenerator.class); > } >@@ -180,22 +148,10 @@ > return retrieve(DiagramEditPartGenerator.class); > } > >- public TextEmitter getBendpointEditPolicyGenerator() throws UnexpectedBehaviourException { >- return retrieve(BendpointEditPolicyGenerator.class); >- } >- > public TextEmitter getEditPartFactoryGenerator() throws UnexpectedBehaviourException { > return retrieve(EditPartFactoryGenerator.class); > } > >- public TextEmitter getUpdatableEditPartGenerator() throws UnexpectedBehaviourException { >- return retrieve(UpdatableEditPartGenerator.class); >- } >- >- public TextEmitter getWrappingCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(WrappingCommandGenerator.class); >- } >- > public TextEmitter getLinkEditPartGenerator() throws UnexpectedBehaviourException { > return retrieve(LinkEditPartGenerator.class); > } >@@ -276,34 +232,6 @@ > return retrieve(RegexpExpressionFactoryGenerator.class); > } > >- public TextEmitter getCreateNotationalElementCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(CreateNotationalElementCommandGenerator.class); >- } >- >- public TextEmitter getCreateNotationalEdgeCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(CreateNotationalEdgeCommandGenerator.class); >- } >- >- public TextEmitter getRemoveNotationalElementCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(RemoveNotationalElementCommandGenerator.class); >- } >- >- public TextEmitter getRemoveNotationalEdgeCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(RemoveNotationalEdgeCommandGenerator.class); >- } >- >- public TextEmitter getReplaceNotationalElementCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(ReplaceNotationalElementCommandGenerator.class); >- } >- >- public TextEmitter getReconnectNotationalEdgeSourceCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(ReconnectNotationalEdgeSourceCommandGenerator.class); >- } >- >- public TextEmitter getReconnectNotationalEdgeTargetCommandGenerator() throws UnexpectedBehaviourException { >- return retrieve(ReconnectNotationalEdgeTargetCommandGenerator.class); >- } >- > /** > * @see #retrieve(Class) > */ >Index: templates/commands/CreateNotationalElementCommand.javajet >=================================================================== >RCS file: templates/commands/CreateNotationalElementCommand.javajet >diff -N templates/commands/CreateNotationalElementCommand.javajet >--- templates/commands/CreateNotationalElementCommand.javajet 2 Aug 2006 10:43:51 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,89 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="CreateNotationalElementCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class CreateNotationalElementCommand extends <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%> { >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parent; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> createdView; >- >- /** >- * @generated >- */ >- public CreateNotationalElementCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parent) { >- this.parent = parent; >- } >- >- /** >- * @generated >- */ >- protected final void setCreatedView(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view) { >- this.createdView = view; >- } >- >- /** >- * @generated >- */ >- public <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getCreatedView() { >- return createdView; >- } >- >- /** >- * @generated >- */ >- protected final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getParent() { >- return parent; >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return createdView != null; >- } >- >- /** >- * @generated >- */ >- public boolean canUndo() { >- return true; >- } >- /** >- * @generated >- */ >- public void execute() { >- parent.insertChild(createdView); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- parent.removeChild(createdView); >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/commands/RemoveNotationalEdgeCommand.javajet >=================================================================== >RCS file: templates/commands/RemoveNotationalEdgeCommand.javajet >diff -N templates/commands/RemoveNotationalEdgeCommand.javajet >--- templates/commands/RemoveNotationalEdgeCommand.javajet 2 Aug 2006 10:43:51 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,66 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="RemoveNotationalEdgeCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class RemoveNotationalEdgeCommand extends RemoveNotationalElementCommand { >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> source; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> target; >- >- /** >- * @generated >- */ >- public RemoveNotationalEdgeCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> childView) { >- super(parentView, childView); >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return getParent() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%> && getChildView() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> >- && ((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>) getParent()).getEdges().contains(getChildView()); >- } >- >- /** >- * @generated >- */ >- public void execute() { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edgeToRemove = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>)getChildView(); >- source = edgeToRemove.getSource(); >- target = edgeToRemove.getTarget(); >- edgeToRemove.setSource(null); >- edgeToRemove.setTarget(null); >- ((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>)getParent()).removeEdge(edgeToRemove); >- sweepElement(); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- restoreElement(); >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edge = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>)getChildView(); >- ((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>)getParent()).insertEdge(edge); >- edge.setSource(source); >- edge.setTarget(target); >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/commands/ReconnectNotationalEdgeSourceCommand.javajet >=================================================================== >RCS file: templates/commands/ReconnectNotationalEdgeSourceCommand.javajet >diff -N templates/commands/ReconnectNotationalEdgeSourceCommand.javajet >--- templates/commands/ReconnectNotationalEdgeSourceCommand.javajet 3 Jul 2006 17:42:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,73 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="ReconnectNotationalEdgeSourceCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class ReconnectNotationalEdgeSourceCommand extends <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%> { >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edge; >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> newSource; >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> oldSource; >- /** >- * @generated >- */ >- public ReconnectNotationalEdgeSourceCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edge, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> newSource) { >- this.edge = edge; >- this.newSource = newSource; >- } >- /** >- * @generated >- */ >- public boolean canExecute() { >- return newSource != null; >- } >- >- /** >- * @generated >- */ >- public boolean canUndo() { >- return oldSource != null; >- } >- >- /** >- * @generated >- */ >- public void execute() { >- oldSource = edge.getSource(); >- edge.setSource(newSource); >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- edge.setSource(oldSource); >- oldSource = null; >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/commands/ReconnectNotationalEdgeTargetCommand.javajet >=================================================================== >RCS file: templates/commands/ReconnectNotationalEdgeTargetCommand.javajet >diff -N templates/commands/ReconnectNotationalEdgeTargetCommand.javajet >--- templates/commands/ReconnectNotationalEdgeTargetCommand.javajet 3 Jul 2006 17:42:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,73 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="ReconnectNotationalEdgeTargetCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class ReconnectNotationalEdgeTargetCommand extends <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%> { >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edge; >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> newTarget; >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> oldTarget; >- /** >- * @generated >- */ >- public ReconnectNotationalEdgeTargetCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edge, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> newTarget) { >- this.edge = edge; >- this.newTarget = newTarget; >- } >- /** >- * @generated >- */ >- public boolean canExecute() { >- return newTarget != null; >- } >- >- /** >- * @generated >- */ >- public boolean canUndo() { >- return oldTarget != null; >- } >- >- /** >- * @generated >- */ >- public void execute() { >- oldTarget = edge.getTarget(); >- edge.setTarget(newTarget); >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- edge.setTarget(oldTarget); >- oldTarget = null; >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/commands/RemoveNotationalElementCommand.javajet >=================================================================== >RCS file: templates/commands/RemoveNotationalElementCommand.javajet >diff -N templates/commands/RemoveNotationalElementCommand.javajet >--- templates/commands/RemoveNotationalElementCommand.javajet 4 Aug 2006 17:09:59 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,133 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="RemoveNotationalElementCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class RemoveNotationalElementCommand extends <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%> { >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> childView; >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> domainElement; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> removeEdgeCommands; >- >- /** >- * @generated >- */ >- public RemoveNotationalElementCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> childView) { >- this.parentView = parentView; >- this.childView = childView; >- } >- >- /** >- * @generated >- */ >- protected boolean prepare() { >- if (!parentView.getChildren().contains(childView)) { >- return false; >- } >- removeEdgeCommands = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>(); >- for(<%=importManager.getImportedName("java.util.Iterator")%> it = childView.getSourceEdges().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) it.next(); >- removeEdgeCommands.append(new RemoveNotationalEdgeCommand(childView.getDiagram(), next)); >- } >- for(Iterator it = childView.getTargetEdges().iterator(); it.hasNext(); ) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> next = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) it.next(); >- removeEdgeCommands.append(new RemoveNotationalEdgeCommand(childView.getDiagram(), next)); >- } >- if (removeEdgeCommands.isEmpty()) { >- return true; >- } >- return removeEdgeCommands.canExecute(); >- } >- >- /** >- * @generated >- */ >- public boolean canUndo() { >- return true; >- } >- >- /** >- * @generated >- */ >- public void execute() { >- parentView.removeChild(childView); >- if (!removeEdgeCommands.isEmpty()) { >- removeEdgeCommands.execute(); >- } >- sweepElement(); >- } >- >- /** >- * @generated >- */ >- protected void sweepElement() { >- if (childView.isSetElement()) { >- domainElement = childView.getElement(); >- childView.setElement(null); >- } >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- restoreElement(); >- removeEdgeCommands.undo(); >- parentView.insertChild(childView); >- } >- >- /** >- * @generated >- */ >- protected void restoreElement() { >- if (childView.isSetElement()) { >- childView.setElement(domainElement); >- } >- } >- >- /** >- * @generated >- */ >- protected final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getChildView() { >- return childView; >- } >- >- /** >- * @generated >- */ >- protected final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getParent() { >- return parentView; >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/commands/CreateNotationalEdgeCommand.javajet >=================================================================== >RCS file: templates/commands/CreateNotationalEdgeCommand.javajet >diff -N templates/commands/CreateNotationalEdgeCommand.javajet >--- templates/commands/CreateNotationalEdgeCommand.javajet 2 Aug 2006 10:43:51 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,64 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="CreateNotationalEdgeCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class CreateNotationalEdgeCommand extends CreateNotationalElementCommand { >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> source; >- >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> target; >- >- /** >- * @generated >- */ >- public CreateNotationalEdgeCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parent, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> createdEdge, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> source, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> target) { >- super(parent); >- this.source = source; >- this.target = target; >- setCreatedView(createdEdge); >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return super.canExecute() && getParent() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%> && getCreatedView() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> && this.source != null && this.target != null; >- } >- >- /** >- * @generated >- */ >- public void execute() { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> createdEdge = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) getCreatedView(); >- ((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>)getParent()).insertEdge(createdEdge); >- createdEdge.setSource(source); >- createdEdge.setTarget(target); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> createdEdge = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) getCreatedView(); >- ((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>)getParent()).removeEdge(createdEdge); >- createdEdge.setSource(null); >- createdEdge.setTarget(null); >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/commands/ReplaceNotationalElementCommand.javajet >=================================================================== >RCS file: templates/commands/ReplaceNotationalElementCommand.javajet >diff -N templates/commands/ReplaceNotationalElementCommand.javajet >--- templates/commands/ReplaceNotationalElementCommand.javajet 2 Aug 2006 10:43:51 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,111 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.commands" class="ReplaceNotationalElementCommandGenerator" >- imports="org.eclipse.gmf.common.codegen.*"%> >- >-<% >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class ReplaceNotationalElementCommand extends <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%> { >- /** >- * @generated >- */ >- private final CreateNotationalElementCommand createCommand; >- /** >- * @generated >- */ >- private final RemoveNotationalElementCommand removeCommand; >- /** >- * @generated >- */ >- private final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> obsoleteView; >- >- /** >- * @generated >- */ >- public ReplaceNotationalElementCommand(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> parentView, CreateNotationalElementCommand createCommand, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> obsoleteView) { >- this.createCommand = createCommand; >- this.obsoleteView = obsoleteView; >- this.removeCommand = obsoleteView instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> ? new RemoveNotationalEdgeCommand(parentView, obsoleteView) : new RemoveNotationalElementCommand(parentView, obsoleteView); >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return createCommand != null && createCommand.canExecute() && removeCommand != null && removeCommand.canExecute(); >- } >- >- /** >- * @generated >- */ >- public boolean canUndo() { >- return createCommand != null && createCommand.canUndo() && removeCommand != null && removeCommand.canUndo(); >- } >- >- /** >- * @generated >- */ >- public void execute() { >- createCommand.execute(); >- removeCommand.execute(); >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> createdView = createCommand.getCreatedView(); >-// createdView.getSourceEdges().addAll(obsoleteView.getSourceEdges()); >-// createdView.getTargetEdges().addAll(obsoleteView.getTargetEdges()); >- if (createdView != null && obsoleteView != null && createdView.eClass().equals(obsoleteView.eClass())) { >- if (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getNode().equals(createdView.eClass())) { >- copy(obsoleteView, createdView, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getNode_LayoutConstraint()); >- } else if (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getEdge().equals(createdView.eClass())) { >- copy(obsoleteView, createdView, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getEdge_Bendpoints()); >- } >- } >- } >- >- /** >- * @generated >- */ >- private void copy(<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> source, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> target, <%=importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%> feature) { >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> oldValue = (<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%>) source.eGet(feature); >- if (oldValue == null) { >- return; //nothing to copy >- } >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> newValue = (<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%>) target.eGet(feature); >- if (newValue != null && !newValue.eClass().equals(oldValue.eClass())) { >- return; //incompatible instances. >- } >- target.eSet(feature, oldValue); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> createdView = createCommand.getCreatedView(); >- if (createdView != null && obsoleteView != null && createdView.eClass().equals(obsoleteView.eClass())) { >- if (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getNode().equals(createdView.eClass())) { >- copy(obsoleteView, createdView, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getNode_LayoutConstraint()); >- } else if (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getEdge().equals(createdView.eClass())) { >- copy(obsoleteView, createdView, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")%>.eINSTANCE.getEdge_Bendpoints()); >- } >- } >-// obsoleteView.getSourceEdges().addAll(createdView.getSourceEdges()); >-// obsoleteView.getTargetEdges().addAll(createdView.getTargetEdges()); >- removeCommand.undo(); >- createCommand.undo(); >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >-} >-<%importManager.emitSortedImports();%> >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalElementCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalElementCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalElementCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalElementCommandGenerator.java 4 Aug 2006 17:09:59 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,84 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class RemoveNotationalElementCommandGenerator >-{ >- protected static String nl; >- public static synchronized RemoveNotationalElementCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- RemoveNotationalElementCommandGenerator result = new RemoveNotationalElementCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class RemoveNotationalElementCommand extends "; >- protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_5 = " childView;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_6 = " parentView;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_7 = " domainElement;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_8 = " removeEdgeCommands;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic RemoveNotationalElementCommand("; >- protected final String TEXT_9 = " parentView, "; >- protected final String TEXT_10 = " childView) {" + NL + "\t\tthis.parentView = parentView;" + NL + "\t\tthis.childView = childView;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean prepare() {" + NL + "\t\tif (!parentView.getChildren().contains(childView)) {" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\tremoveEdgeCommands = new "; >- protected final String TEXT_11 = "();" + NL + "\t\tfor("; >- protected final String TEXT_12 = " it = childView.getSourceEdges().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_13 = " next = ("; >- protected final String TEXT_14 = ") it.next();" + NL + "\t\t\tremoveEdgeCommands.append(new RemoveNotationalEdgeCommand(childView.getDiagram(), next));" + NL + "\t\t}" + NL + "\t\tfor(Iterator it = childView.getTargetEdges().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_15 = " next = ("; >- protected final String TEXT_16 = ") it.next();" + NL + "\t\t\tremoveEdgeCommands.append(new RemoveNotationalEdgeCommand(childView.getDiagram(), next));" + NL + "\t\t}" + NL + "\t\tif (removeEdgeCommands.isEmpty()) {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\treturn removeEdgeCommands.canExecute();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canUndo() {" + NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\tparentView.removeChild(childView);" + NL + "\t\tif (!removeEdgeCommands.isEmpty()) {" + NL + "\t\t\tremoveEdgeCommands.execute();" + NL + "\t\t}" + NL + "\t\tsweepElement();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void sweepElement() {" + NL + "\t\tif (childView.isSetElement()) {" + NL + "\t\t\tdomainElement = childView.getElement();" + NL + "\t\t\tchildView.setElement(null);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void redo() {" + NL + "\t\texecute();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\trestoreElement();" + NL + "\t\tremoveEdgeCommands.undo();" + NL + "\t\tparentView.insertChild(childView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void restoreElement() {" + NL + "\t\tif (childView.isSetElement()) {" + NL + "\t\t\tchildView.setElement(domainElement);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected final "; >- protected final String TEXT_17 = " getChildView() {" + NL + "\t\treturn childView;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected final "; >- protected final String TEXT_18 = " getParent() {" + NL + "\t\treturn parentView;" + NL + "\t}" + NL + "}"; >- protected final String TEXT_19 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_13); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_16); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_17); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_18); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_19); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReplaceNotationalElementCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReplaceNotationalElementCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReplaceNotationalElementCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReplaceNotationalElementCommandGenerator.java 2 Aug 2006 10:43:52 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,105 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class ReplaceNotationalElementCommandGenerator >-{ >- protected static String nl; >- public static synchronized ReplaceNotationalElementCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- ReplaceNotationalElementCommandGenerator result = new ReplaceNotationalElementCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ReplaceNotationalElementCommand extends "; >- protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final CreateNotationalElementCommand createCommand;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final RemoveNotationalElementCommand removeCommand;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_5 = " obsoleteView;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ReplaceNotationalElementCommand("; >- protected final String TEXT_6 = " parentView, CreateNotationalElementCommand createCommand, "; >- protected final String TEXT_7 = " obsoleteView) {" + NL + "\t\tthis.createCommand = createCommand;" + NL + "\t\tthis.obsoleteView = obsoleteView;" + NL + "\t\tthis.removeCommand = obsoleteView instanceof "; >- protected final String TEXT_8 = " ? new RemoveNotationalEdgeCommand(parentView, obsoleteView) : new RemoveNotationalElementCommand(parentView, obsoleteView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn createCommand != null && createCommand.canExecute() && removeCommand != null && removeCommand.canExecute();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canUndo() {" + NL + "\t\treturn createCommand != null && createCommand.canUndo() && removeCommand != null && removeCommand.canUndo();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\tcreateCommand.execute();" + NL + "\t\tremoveCommand.execute();" + NL + "\t\t"; >- protected final String TEXT_9 = " createdView = createCommand.getCreatedView();" + NL + "//\t\tcreatedView.getSourceEdges().addAll(obsoleteView.getSourceEdges());" + NL + "//\t\tcreatedView.getTargetEdges().addAll(obsoleteView.getTargetEdges());" + NL + "\t\tif (createdView != null && obsoleteView != null && createdView.eClass().equals(obsoleteView.eClass())) {" + NL + "\t\t\tif ("; >- protected final String TEXT_10 = ".eINSTANCE.getNode().equals(createdView.eClass())) {" + NL + "\t\t\t\tcopy(obsoleteView, createdView, "; >- protected final String TEXT_11 = ".eINSTANCE.getNode_LayoutConstraint());" + NL + "\t\t\t} else if ("; >- protected final String TEXT_12 = ".eINSTANCE.getEdge().equals(createdView.eClass())) {" + NL + "\t\t\t\tcopy(obsoleteView, createdView, "; >- protected final String TEXT_13 = ".eINSTANCE.getEdge_Bendpoints());" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void copy("; >- protected final String TEXT_14 = " source, "; >- protected final String TEXT_15 = " target, "; >- protected final String TEXT_16 = " feature) {" + NL + "\t\t"; >- protected final String TEXT_17 = " oldValue = ("; >- protected final String TEXT_18 = ") source.eGet(feature);" + NL + "\t\tif (oldValue == null) {" + NL + "\t\t\treturn;\t//nothing to copy" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_19 = " newValue = ("; >- protected final String TEXT_20 = ") target.eGet(feature);" + NL + "\t\tif (newValue != null && !newValue.eClass().equals(oldValue.eClass())) {" + NL + "\t\t\treturn;\t//incompatible instances." + NL + "\t\t}" + NL + "\t\ttarget.eSet(feature, oldValue);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\t"; >- protected final String TEXT_21 = " createdView = createCommand.getCreatedView();" + NL + "\t\tif (createdView != null && obsoleteView != null && createdView.eClass().equals(obsoleteView.eClass())) {" + NL + "\t\t\tif ("; >- protected final String TEXT_22 = ".eINSTANCE.getNode().equals(createdView.eClass())) {" + NL + "\t\t\t\tcopy(obsoleteView, createdView, "; >- protected final String TEXT_23 = ".eINSTANCE.getNode_LayoutConstraint());" + NL + "\t\t\t} else if ("; >- protected final String TEXT_24 = ".eINSTANCE.getEdge().equals(createdView.eClass())) {" + NL + "\t\t\t\tcopy(obsoleteView, createdView, "; >- protected final String TEXT_25 = ".eINSTANCE.getEdge_Bendpoints());" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "//\t\tobsoleteView.getSourceEdges().addAll(createdView.getSourceEdges());" + NL + "//\t\tobsoleteView.getTargetEdges().addAll(createdView.getTargetEdges());" + NL + "\t\tremoveCommand.undo();" + NL + "\t\tcreateCommand.undo();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void redo() {" + NL + "\t\texecute();" + NL + "\t}" + NL + "}"; >- protected final String TEXT_26 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_13); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_16); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_17); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_18); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_19); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_20); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_21); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_22); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_23); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_24); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_25); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_26); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalEdgeCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalEdgeCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalEdgeCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalEdgeCommandGenerator.java 2 Aug 2006 10:43:52 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,81 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class CreateNotationalEdgeCommandGenerator >-{ >- protected static String nl; >- public static synchronized CreateNotationalEdgeCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- CreateNotationalEdgeCommandGenerator result = new CreateNotationalEdgeCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class CreateNotationalEdgeCommand extends CreateNotationalElementCommand {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_4 = " source;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_5 = " target;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic CreateNotationalEdgeCommand("; >- protected final String TEXT_6 = " parent, "; >- protected final String TEXT_7 = " createdEdge, "; >- protected final String TEXT_8 = " source, "; >- protected final String TEXT_9 = " target) {" + NL + "\t\tsuper(parent);" + NL + "\t\tthis.source = source;" + NL + "\t\tthis.target = target;" + NL + "\t\tsetCreatedView(createdEdge);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn super.canExecute() && getParent() instanceof "; >- protected final String TEXT_10 = " && getCreatedView() instanceof "; >- protected final String TEXT_11 = " && this.source != null && this.target != null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\t"; >- protected final String TEXT_12 = " createdEdge = ("; >- protected final String TEXT_13 = ") getCreatedView();" + NL + "\t\t(("; >- protected final String TEXT_14 = ")getParent()).insertEdge(createdEdge);" + NL + "\t\tcreatedEdge.setSource(source);" + NL + "\t\tcreatedEdge.setTarget(target);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\t"; >- protected final String TEXT_15 = " createdEdge = ("; >- protected final String TEXT_16 = ") getCreatedView();" + NL + "\t\t(("; >- protected final String TEXT_17 = ")getParent()).removeEdge(createdEdge);" + NL + "\t\tcreatedEdge.setSource(null);" + NL + "\t\tcreatedEdge.setTarget(null);" + NL + "\t}" + NL + "}"; >- protected final String TEXT_18 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_13); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_16); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_17); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_18); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeSourceCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeSourceCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeSourceCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeSourceCommandGenerator.java 3 Jul 2006 17:42:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,57 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class ReconnectNotationalEdgeSourceCommandGenerator >-{ >- protected static String nl; >- public static synchronized ReconnectNotationalEdgeSourceCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- ReconnectNotationalEdgeSourceCommandGenerator result = new ReconnectNotationalEdgeSourceCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ReconnectNotationalEdgeSourceCommand extends "; >- protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_5 = " edge;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_6 = " newSource;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_7 = " oldSource;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ReconnectNotationalEdgeSourceCommand("; >- protected final String TEXT_8 = " edge, "; >- protected final String TEXT_9 = " newSource) {" + NL + "\t\tthis.edge = edge;" + NL + "\t\tthis.newSource = newSource;" + NL + "\t}" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn newSource != null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canUndo() {" + NL + "\t\treturn oldSource != null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\toldSource = edge.getSource();" + NL + "\t\tedge.setSource(newSource);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void redo() {" + NL + "\t\texecute();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\tedge.setSource(oldSource);" + NL + "\t\toldSource = null;" + NL + "\t}" + NL + "}"; >- protected final String TEXT_10 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_9); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_10); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeTargetCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeTargetCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeTargetCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/ReconnectNotationalEdgeTargetCommandGenerator.java 3 Jul 2006 17:42:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,57 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class ReconnectNotationalEdgeTargetCommandGenerator >-{ >- protected static String nl; >- public static synchronized ReconnectNotationalEdgeTargetCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- ReconnectNotationalEdgeTargetCommandGenerator result = new ReconnectNotationalEdgeTargetCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ReconnectNotationalEdgeTargetCommand extends "; >- protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_5 = " edge;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_6 = " newTarget;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_7 = " oldTarget;" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ReconnectNotationalEdgeTargetCommand("; >- protected final String TEXT_8 = " edge, "; >- protected final String TEXT_9 = " newTarget) {" + NL + "\t\tthis.edge = edge;" + NL + "\t\tthis.newTarget = newTarget;" + NL + "\t}" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn newTarget != null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canUndo() {" + NL + "\t\treturn oldTarget != null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\toldTarget = edge.getTarget();" + NL + "\t\tedge.setTarget(newTarget);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void redo() {" + NL + "\t\texecute();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\tedge.setTarget(oldTarget);" + NL + "\t\toldTarget = null;" + NL + "\t}" + NL + "}"; >- protected final String TEXT_10 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_9); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_10); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalElementCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalElementCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalElementCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/CreateNotationalElementCommandGenerator.java 2 Aug 2006 10:43:52 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,60 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class CreateNotationalElementCommandGenerator >-{ >- protected static String nl; >- public static synchronized CreateNotationalElementCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- CreateNotationalElementCommandGenerator result = new CreateNotationalElementCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class CreateNotationalElementCommand extends "; >- protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final "; >- protected final String TEXT_5 = " parent;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_6 = " createdView;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic CreateNotationalElementCommand("; >- protected final String TEXT_7 = " parent) {" + NL + "\t\tthis.parent = parent;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected final void setCreatedView("; >- protected final String TEXT_8 = " view) {" + NL + "\t\tthis.createdView = view;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_9 = " getCreatedView() {" + NL + "\t\treturn createdView;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected final "; >- protected final String TEXT_10 = " getParent() {" + NL + "\t\treturn parent;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn createdView != null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canUndo() {" + NL + "\t\treturn true;" + NL + "\t}" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\tparent.insertChild(createdView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\tparent.removeChild(createdView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void redo() {" + NL + "\t\texecute();" + NL + "\t}" + NL + "}"; >- protected final String TEXT_11 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_10); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_11); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalEdgeCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalEdgeCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalEdgeCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/commands/RemoveNotationalEdgeCommandGenerator.java 2 Aug 2006 10:43:52 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,78 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.commands; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class RemoveNotationalEdgeCommandGenerator >-{ >- protected static String nl; >- public static synchronized RemoveNotationalEdgeCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- RemoveNotationalEdgeCommandGenerator result = new RemoveNotationalEdgeCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL; >- protected final String TEXT_3 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class RemoveNotationalEdgeCommand extends RemoveNotationalElementCommand {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_4 = " source;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_5 = " target;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic RemoveNotationalEdgeCommand("; >- protected final String TEXT_6 = " parentView, "; >- protected final String TEXT_7 = " childView) {" + NL + "\t\tsuper(parentView, childView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn getParent() instanceof "; >- protected final String TEXT_8 = " && getChildView() instanceof "; >- protected final String TEXT_9 = NL + "\t\t\t&& (("; >- protected final String TEXT_10 = ") getParent()).getEdges().contains(getChildView());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\t"; >- protected final String TEXT_11 = " edgeToRemove = ("; >- protected final String TEXT_12 = ")getChildView();" + NL + "\t\tsource = edgeToRemove.getSource();" + NL + "\t\ttarget = edgeToRemove.getTarget();" + NL + "\t\tedgeToRemove.setSource(null);" + NL + "\t\tedgeToRemove.setTarget(null);" + NL + "\t\t(("; >- protected final String TEXT_13 = ")getParent()).removeEdge(edgeToRemove);" + NL + "\t\tsweepElement();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\trestoreElement();" + NL + "\t\t"; >- protected final String TEXT_14 = " edge = ("; >- protected final String TEXT_15 = ")getChildView();" + NL + "\t\t(("; >- protected final String TEXT_16 = ")getParent()).insertEdge(edge);" + NL + "\t\tedge.setSource(source);" + NL + "\t\tedge.setTarget(target);" + NL + "\t}" + NL + "}"; >- protected final String TEXT_17 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- stringBuffer.append(TEXT_1); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_2); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_13); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_16); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_17); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/editor/PaletteFactoryGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/editor/PaletteFactoryGenerator.java,v >retrieving revision 1.4 >diff -u -r1.4 PaletteFactoryGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/editor/PaletteFactoryGenerator.java 25 May 2006 14:22:15 -0000 1.4 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/editor/PaletteFactoryGenerator.java 30 Aug 2006 15:22:20 -0000 >@@ -50,36 +50,40 @@ > protected final String TEXT_31 = "\t\t" + NL + "\t\t};" + NL + "\t\treturn new "; > protected final String TEXT_32 = "(\""; > protected final String TEXT_33 = "\", " + NL + "\t\t\t\""; >- protected final String TEXT_34 = "\", new ModelCreationFactory("; >- protected final String TEXT_35 = ".class), smallImage, largeImage) {" + NL + "\t\t\tpublic Tool createTool() {" + NL + "\t\t\t\tTool result = new CreationTool() {" + NL + "\t\t\t\t\tprotected Request createTargetRequest() {" + NL + "\t\t\t\t\t\tCreateRequestEx request = new CreateRequestEx(visualIds);" + NL + "\t\t\t\t\t\trequest.setFactory(getFactory());" + NL + "\t\t\t\t\t\treturn request;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected void performCreation(int button) {" + NL + "\t\t\t\t\t\tsuper.performCreation(button);" + NL + "\t\t\t\t\t\tfinal "; >- protected final String TEXT_36 = " createdEditPart = ("; >- protected final String TEXT_37 = ")getCurrentViewer().getEditPartRegistry().get(getCreateRequest().getNewObject());" + NL + "\t\t\t\t\t\tif (createdEditPart != null) {" + NL + "\t\t\t\t\t\t\tgetCurrentViewer().getControl().getDisplay().asyncExec(new Runnable() {" + NL + "\t\t\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\t\t\tif (createdEditPart.isActive()) {" + NL + "\t\t\t\t\t\t\t\t\t\tcreatedEditPart.performRequest(new "; >- protected final String TEXT_38 = "("; >- protected final String TEXT_39 = ".REQ_DIRECT_EDIT));" + NL + "\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t});" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tresult.setProperties(getToolProperties());" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}"; >- protected final String TEXT_40 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ToolEntry "; >- protected final String TEXT_41 = "() {" + NL + "\t\t"; >- protected final String TEXT_42 = NL + "\t\tImageDescriptor smallImage = ImageDescriptor.createFromFile("; >- protected final String TEXT_43 = ".class, \""; >- protected final String TEXT_44 = "\");" + NL + "\t\t"; >- protected final String TEXT_45 = NL + "\t\tImageDescriptor smallImage = getImage("; >- protected final String TEXT_46 = ");" + NL + "\t\t"; >- protected final String TEXT_47 = NL + "\t\t"; >- protected final String TEXT_48 = NL + "\t\tImageDescriptor largeImage = ImageDescriptor.createFromFile("; >- protected final String TEXT_49 = ".class, \""; >- protected final String TEXT_50 = "\");" + NL + "\t\t"; >- protected final String TEXT_51 = NL + "\t\tImageDescriptor largeImage = smallImage;" + NL + "\t\t"; >- protected final String TEXT_52 = NL + "\t\tfinal int[] visualIds = new int[] {"; >- protected final String TEXT_53 = NL + "\t\t\t"; >- protected final String TEXT_54 = ".VISUAL_ID"; >- protected final String TEXT_55 = ","; >- protected final String TEXT_56 = "\t\t" + NL + "\t\t};" + NL + "\t\treturn new ConnectionCreationToolEntry(\""; >- protected final String TEXT_57 = "\", \""; >- protected final String TEXT_58 = "\", " + NL + "\t\t\tnew ModelCreationFactory("; >- protected final String TEXT_59 = ".class), smallImage, largeImage) {" + NL + "\t\t\tpublic Tool createTool() {" + NL + "\t\t\t\tTool result = new ConnectionCreationTool() {" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tsetUnloadWhenFinished(true);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected Request createTargetRequest() {" + NL + "\t\t\t\t\t\tCreateConnectionRequestEx request = new CreateConnectionRequestEx(visualIds);" + NL + "\t\t\t\t\t\trequest.setFactory(getFactory());" + NL + "\t\t\t\t\t\treturn request;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tresult.setProperties(getToolProperties());" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}"; >- protected final String TEXT_60 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PaletteContainer createContainer(String title) {" + NL + "\t\treturn new PaletteDrawer(title);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ImageDescriptor getImage(Object o) {" + NL + "\t\tIItemLabelProvider labelProvider = (IItemLabelProvider) domainAdapterFactory.adapt(o, IItemLabelProvider.class);" + NL + "\t\tif (labelProvider != null) {" + NL + "\t\t\treturn ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(o));" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class CreateRequestEx extends "; >- protected final String TEXT_61 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final int[] visualIds;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic CreateRequestEx(int[] visualIds) {" + NL + "\t\t\tthis.visualIds = visualIds;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int[] getVisualIds() {" + NL + "\t\t\treturn visualIds;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void setCreatedObject(Object createdObject) {" + NL + "\t\t\t((ModelCreationFactory)getFactory()).setCreatedObject(createdObject);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class CreateConnectionRequestEx extends "; >- protected final String TEXT_62 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final int[] visualIds;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic CreateConnectionRequestEx(int[] visualIds) {" + NL + "\t\t\tthis.visualIds = visualIds;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int[] getVisualIds() {" + NL + "\t\t\treturn visualIds;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void setCreatedObject(Object createdObject) {" + NL + "\t\t\t((ModelCreationFactory)getFactory()).setCreatedObject(createdObject);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class ModelCreationFactory implements CreationFactory {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Object createdObject;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Class createdObjectType;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic ModelCreationFactory(Class objectType) {" + NL + "\t\t\tcreatedObjectType = objectType;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Object getNewObject() {" + NL + "\t\t\treturn createdObject;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Object getObjectType() {" + NL + "\t\t\treturn createdObjectType;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void setCreatedObject(Object createdObject) {" + NL + "\t\t\tthis.createdObject = createdObject;" + NL + "\t\t}" + NL + "\t}" + NL + "}"; >- protected final String TEXT_63 = NL; >+ protected final String TEXT_34 = "\", new "; >+ protected final String TEXT_35 = "("; >+ protected final String TEXT_36 = ".class), smallImage, largeImage) {" + NL + "\t\t\tpublic Tool createTool() {" + NL + "\t\t\t\tTool result = new CreationTool() {" + NL + "\t\t\t\t\tprotected Request createTargetRequest() {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_37 = " request = new "; >+ protected final String TEXT_38 = "(visualIds);" + NL + "\t\t\t\t\t\trequest.setFactory(getFactory());" + NL + "\t\t\t\t\t\treturn request;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected void performCreation(int button) {" + NL + "\t\t\t\t\t\tsuper.performCreation(button);" + NL + "\t\t\t\t\t\tfinal "; >+ protected final String TEXT_39 = " createdEditPart = ("; >+ protected final String TEXT_40 = ")getCurrentViewer().getEditPartRegistry().get(getCreateRequest().getNewObject());" + NL + "\t\t\t\t\t\tif (createdEditPart != null) {" + NL + "\t\t\t\t\t\t\tgetCurrentViewer().getControl().getDisplay().asyncExec(new Runnable() {" + NL + "\t\t\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\t\t\tif (createdEditPart.isActive()) {" + NL + "\t\t\t\t\t\t\t\t\t\tcreatedEditPart.performRequest(new "; >+ protected final String TEXT_41 = "("; >+ protected final String TEXT_42 = ".REQ_DIRECT_EDIT));" + NL + "\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t});" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tresult.setProperties(getToolProperties());" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}"; >+ protected final String TEXT_43 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ToolEntry "; >+ protected final String TEXT_44 = "() {" + NL + "\t\t"; >+ protected final String TEXT_45 = NL + "\t\tImageDescriptor smallImage = ImageDescriptor.createFromFile("; >+ protected final String TEXT_46 = ".class, \""; >+ protected final String TEXT_47 = "\");" + NL + "\t\t"; >+ protected final String TEXT_48 = NL + "\t\tImageDescriptor smallImage = getImage("; >+ protected final String TEXT_49 = ");" + NL + "\t\t"; >+ protected final String TEXT_50 = NL + "\t\t"; >+ protected final String TEXT_51 = NL + "\t\tImageDescriptor largeImage = ImageDescriptor.createFromFile("; >+ protected final String TEXT_52 = ".class, \""; >+ protected final String TEXT_53 = "\");" + NL + "\t\t"; >+ protected final String TEXT_54 = NL + "\t\tImageDescriptor largeImage = smallImage;" + NL + "\t\t"; >+ protected final String TEXT_55 = NL + "\t\tfinal int[] visualIds = new int[] {"; >+ protected final String TEXT_56 = NL + "\t\t\t"; >+ protected final String TEXT_57 = ".VISUAL_ID"; >+ protected final String TEXT_58 = ","; >+ protected final String TEXT_59 = "\t\t" + NL + "\t\t};" + NL + "\t\treturn new ConnectionCreationToolEntry(\""; >+ protected final String TEXT_60 = "\", \""; >+ protected final String TEXT_61 = "\", " + NL + "\t\t\tnew "; >+ protected final String TEXT_62 = "("; >+ protected final String TEXT_63 = ".class), smallImage, largeImage) {" + NL + "\t\t\tpublic Tool createTool() {" + NL + "\t\t\t\tTool result = new ConnectionCreationTool() {" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tsetUnloadWhenFinished(true);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected Request createTargetRequest() {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_64 = " request = new "; >+ protected final String TEXT_65 = "(visualIds);" + NL + "\t\t\t\t\t\trequest.setFactory(getFactory());" + NL + "\t\t\t\t\t\treturn request;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tresult.setProperties(getToolProperties());" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}"; >+ protected final String TEXT_66 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PaletteContainer createContainer(String title) {" + NL + "\t\treturn new PaletteDrawer(title);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ImageDescriptor getImage(Object o) {" + NL + "\t\tIItemLabelProvider labelProvider = (IItemLabelProvider) domainAdapterFactory.adapt(o, IItemLabelProvider.class);" + NL + "\t\tif (labelProvider != null) {" + NL + "\t\t\treturn ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(o));" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "}"; >+ protected final String TEXT_67 = NL; > > public String generate(Object argument) > { >@@ -220,16 +224,22 @@ > stringBuffer.append(TEXT_33); > stringBuffer.append(nodeCreationTool.getDescription()); > stringBuffer.append(TEXT_34); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.ModelCreationFactory")); > stringBuffer.append(TEXT_35); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_37); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_38); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_39); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_40); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(TEXT_41); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); >+ stringBuffer.append(TEXT_42); > > } > >@@ -247,61 +257,63 @@ > domainElementInstanceCreationCode = "null"; > } > >- stringBuffer.append(TEXT_40); >+ stringBuffer.append(TEXT_43); > stringBuffer.append(linkCreationTool.getCreateMethodName()); >- stringBuffer.append(TEXT_41); >+ stringBuffer.append(TEXT_44); > if (linkCreationTool.getSmallIconPath() != null) { >- stringBuffer.append(TEXT_42); >+ stringBuffer.append(TEXT_45); > stringBuffer.append(palette.getFactoryClassName()); >- stringBuffer.append(TEXT_43); >+ stringBuffer.append(TEXT_46); > stringBuffer.append(linkCreationTool.getSmallIconPath()); >- stringBuffer.append(TEXT_44); >+ stringBuffer.append(TEXT_47); > } else { >- stringBuffer.append(TEXT_45); >+ stringBuffer.append(TEXT_48); > stringBuffer.append(domainElementInstanceCreationCode); >- stringBuffer.append(TEXT_46); >+ stringBuffer.append(TEXT_49); > } >- stringBuffer.append(TEXT_47); >+ stringBuffer.append(TEXT_50); > if (linkCreationTool.getLargeIconPath() != null) { >- stringBuffer.append(TEXT_48); >+ stringBuffer.append(TEXT_51); > stringBuffer.append(palette.getFactoryClassName()); >- stringBuffer.append(TEXT_49); >+ stringBuffer.append(TEXT_52); > stringBuffer.append(linkCreationTool.getLargeIconPath()); >- stringBuffer.append(TEXT_50); >+ stringBuffer.append(TEXT_53); > } else { >- stringBuffer.append(TEXT_51); >+ stringBuffer.append(TEXT_54); > } >- stringBuffer.append(TEXT_52); >+ stringBuffer.append(TEXT_55); > > for (Iterator genLinksIterator = genLinks.iterator(); genLinksIterator.hasNext();) { > GenLink nextLink = (GenLink) genLinksIterator.next(); > >- stringBuffer.append(TEXT_53); >+ stringBuffer.append(TEXT_56); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_54); >+ stringBuffer.append(TEXT_57); > if (genLinksIterator.hasNext()) { >- stringBuffer.append(TEXT_55); >+ stringBuffer.append(TEXT_58); > } > > } > >- stringBuffer.append(TEXT_56); >+ stringBuffer.append(TEXT_59); > stringBuffer.append(linkCreationTool.getTitle()); >- stringBuffer.append(TEXT_57); >+ stringBuffer.append(TEXT_60); > stringBuffer.append(linkCreationTool.getDescription()); >- stringBuffer.append(TEXT_58); >+ stringBuffer.append(TEXT_61); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.ModelCreationFactory")); >+ stringBuffer.append(TEXT_62); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_59); >+ stringBuffer.append(TEXT_63); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_64); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_65); > > } > >- stringBuffer.append(TEXT_60); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateRequest")); >- stringBuffer.append(TEXT_61); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")); >- stringBuffer.append(TEXT_62); >+ stringBuffer.append(TEXT_66); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_67); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/editor/ManifestGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/editor/ManifestGenerator.java,v >retrieving revision 1.3 >diff -u -r1.3 ManifestGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/editor/ManifestGenerator.java 22 May 2006 18:22:10 -0000 1.3 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/editor/ManifestGenerator.java 30 Aug 2006 15:22:20 -0000 >@@ -23,7 +23,7 @@ > protected final String TEXT_5 = NL + "Require-Bundle: org.eclipse.core.runtime,"; > protected final String TEXT_6 = "org.eclipse.core.resources," + NL + " org.eclipse.ui.ide,"; > protected final String TEXT_7 = NL + " org.eclipse.jface," + NL + " org.eclipse.ui.views," + NL + " org.eclipse.ui.workbench," + NL + " org.eclipse.emf.ecore," + NL + " org.eclipse.emf.edit.ui," + NL + " org.eclipse.emf.workspace,"; >- protected final String TEXT_8 = NL + " org.eclipse.gef;visibility:=reexport," + NL + " org.eclipse.gmf.runtime.notation," + NL + " org.eclipse.gmf.runtime.notation.edit"; >+ protected final String TEXT_8 = NL + " org.eclipse.gef;visibility:=reexport," + NL + " org.eclipse.gmf.runtime.lite," + NL + " org.eclipse.gmf.runtime.notation," + NL + " org.eclipse.gmf.runtime.notation.edit"; > protected final String TEXT_9 = ","; > protected final String TEXT_10 = NL + " "; > protected final String TEXT_11 = ";visibility:=reexport"; >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/editor/EditorGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/editor/EditorGenerator.java,v >retrieving revision 1.7 >diff -u -r1.7 EditorGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/editor/EditorGenerator.java 4 Aug 2006 17:05:48 -0000 1.7 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/editor/EditorGenerator.java 30 Aug 2006 15:22:20 -0000 >@@ -19,124 +19,207 @@ > protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; > protected final String TEXT_1 = ""; > protected final String TEXT_2 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; >- protected final String TEXT_3 = " extends GraphicalEditorWithFlyoutPalette {"; >- protected final String TEXT_4 = NL + "\t/**" + NL + "\t * This class listens to changes to the file system in the workspace, and" + NL + "\t * makes the following changes: " + NL + "\t * <ul><li>If an open, saved file gets deleted, the editor is closed.</li>" + NL + "\t * <li>If an open file gets renamed or moved, the editor's" + NL + "\t * input is changed accordingly.</li></ul>" + NL + "\t *" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class ResourceTracker implements "; >- protected final String TEXT_5 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void resourceChanged("; >- protected final String TEXT_6 = " event) {" + NL + "\t\t\t"; >- protected final String TEXT_7 = " delta = event.getDelta();" + NL + "\t\t\tif (delta != null) {" + NL + "\t\t\t\t"; >- protected final String TEXT_8 = " fileDelta = delta.findMember((("; >- protected final String TEXT_9 = ") getEditorInput()).getFile().getFullPath());" + NL + "\t\t\t\tif (fileDelta != null) {" + NL + "\t\t\t\t\tprocessFileDelta(fileDelta);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void processFileDelta("; >- protected final String TEXT_10 = " delta) {" + NL + "\t\t\tassert (delta != null && delta.getResource().equals((("; >- protected final String TEXT_11 = ") getEditorInput()).getFile()));" + NL + "\t\t\tif (delta.getKind() == "; >- protected final String TEXT_12 = ".REMOVED) {" + NL + "\t\t\t\tif (("; >- protected final String TEXT_13 = ".MOVED_TO & delta.getFlags()) == 0) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_14 = NL + "\t\t\t\t\tif (!isDirty()) {" + NL + "\t\t\t\t\t\tcloseEditor();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\t// else if it was moved or renamed" + NL + "\t\t\t\t\tfinal "; >- protected final String TEXT_15 = " newFile = "; >- protected final String TEXT_16 = ".getWorkspace().getRoot().getFile(delta.getMovedToPath());" + NL + "\t\t\t\t\t"; >- protected final String TEXT_17 = " display = getSite().getShell().getDisplay();" + NL + "\t\t\t\t\tdisplay.asyncExec(new Runnable() {" + NL + "\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\tsetInput(new "; >- protected final String TEXT_18 = "(newFile));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t});" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ResourceTracker resourceTracker;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ResourceTracker getResourceTracker() {" + NL + "\t\tif (resourceTracker == null) {" + NL + "\t\t\tresourceTracker = new ResourceTracker();" + NL + "\t\t}" + NL + "\t\treturn resourceTracker;" + NL + "\t}" + NL; >- protected final String TEXT_19 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class UpdatableActionGroup {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void addAction(UpdateAction action) {" + NL + "\t\t\tassert action != null;" + NL + "\t\t\tmyActions.add(action);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void removeAction(UpdateAction action) {" + NL + "\t\t\tmyActions.remove(action);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void update() {" + NL + "\t\t\tfor (Iterator it = myActions.iterator(); it.hasNext();) {" + NL + "\t\t\t\tUpdateAction next = (UpdateAction) it.next();" + NL + "\t\t\t\tnext.update();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ArrayList myActions = new ArrayList();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Copied from <code>org.eclipse.gef.ui.properties.UndoablePropertySheetEntry</code> to provide EMF compatibility." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final class UndoablePropertySheetEntry extends "; >- protected final String TEXT_20 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate static class SetValueCommand extends "; >- protected final String TEXT_21 = " {" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected Object propertyValue;" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected Object propertyName;" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected Object undoValue;" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected boolean resetOnUndo;" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected "; >- protected final String TEXT_22 = " target;" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic SetValueCommand() {" + NL + "\t\t\t\tsuper(\"\"); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic SetValueCommand(String propLabel) {" + NL + "\t\t\t\tsuper("; >- protected final String TEXT_23 = ".format(\"Set {0} property\", new Object[]{propLabel}).trim());" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void execute() {" + NL + "\t\t\t\t/*" + NL + "\t\t\t\t * Fix for Bug# 54250" + NL + "\t\t\t\t * IPropertySource.isPropertySet(String) returns false both when there is no default " + NL + "\t\t\t\t * value, and when there is a default value and the property is set to that value." + NL + "\t\t\t\t * To correctly determine if a reset should be done during undo, we compare the" + NL + "\t\t\t\t * return value of isPropertySet(String) before and after setPropertyValue(...) is" + NL + "\t\t\t\t * invoked. If they are different (it must have been false before and true after --" + NL + "\t\t\t\t * it cannot be the other way around), then that means we need to reset." + NL + "\t\t\t\t */" + NL + "\t\t\t\tboolean wasPropertySet = getTarget().isPropertySet(propertyName);" + NL + "\t\t\t\tundoValue = getTarget().getPropertyValue(propertyName);" + NL + "\t\t\t\tif (undoValue instanceof "; >- protected final String TEXT_24 = ") {" + NL + "\t\t\t\t\tundoValue = (("; >- protected final String TEXT_25 = ")undoValue).getEditableValue();" + NL + "\t\t\t\t} else if (undoValue instanceof "; >- protected final String TEXT_26 = ") {" + NL + "\t\t\t\t\tundoValue = (("; >- protected final String TEXT_27 = ")undoValue).getEditableValue(propertyName);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tif (propertyValue instanceof "; >- protected final String TEXT_28 = ")" + NL + "\t\t\t\t\tpropertyValue = (("; >- protected final String TEXT_29 = ")propertyValue).getEditableValue();" + NL + "\t\t\t\tgetTarget().setPropertyValue(propertyName, propertyValue);" + NL + "\t\t\t\tif (getTarget() instanceof "; >- protected final String TEXT_30 = ")" + NL + "\t\t\t\t\tresetOnUndo = !wasPropertySet" + NL + "\t\t\t\t\t\t\t&& (("; >- protected final String TEXT_31 = ")getTarget()).isPropertyResettable(propertyName);" + NL + "\t\t\t\telse" + NL + "\t\t\t\t\tresetOnUndo = !wasPropertySet && getTarget().isPropertySet(propertyName);" + NL + "\t\t\t\tif (resetOnUndo)" + NL + "\t\t\t\t\tundoValue = null;" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic "; >- protected final String TEXT_32 = " getTarget() {" + NL + "\t\t\t\treturn target;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void setTarget("; >- protected final String TEXT_33 = " aTarget) {" + NL + "\t\t\t\ttarget = aTarget;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void redo() {" + NL + "\t\t\t\texecute();" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void setPropertyId(Object pName) {" + NL + "\t\t\t\tpropertyName = pName;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void setPropertyValue(Object val) {" + NL + "\t\t\t\tpropertyValue = val;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void undo() {" + NL + "\t\t\t\tif (resetOnUndo)" + NL + "\t\t\t\t\tgetTarget().resetPropertyValue(propertyName);" + NL + "\t\t\t\telse" + NL + "\t\t\t\t\tgetTarget().setPropertyValue(propertyName, undoValue);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate static class ResetValueCommand extends "; >- protected final String TEXT_34 = " {" + NL + "\t\t\t/** " + NL + "\t\t\t * the property that has to be reset " + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected Object propertyName;" + NL + "\t\t\t/** " + NL + "\t\t\t * the current non-default value of the property " + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected Object undoValue;" + NL + "\t\t\t/**" + NL + "\t\t\t * the property source whose property has to be reset " + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tprotected "; >- protected final String TEXT_35 = " target;" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Default Constructor: Sets the label for the Command" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic ResetValueCommand() {" + NL + "\t\t\t\tsuper(\"Restore Default Value\");" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Returns <code>true</code> IFF:<br>" + NL + "\t\t\t * 1) the target and property have been specified<br>" + NL + "\t\t\t * 2) the property has a default value<br>" + NL + "\t\t\t * 3) the value set for that property is not the default" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\tboolean answer = false;" + NL + "\t\t\t\tif (target != null && propertyName != null) {" + NL + "\t\t\t\t\tanswer = target.isPropertySet(propertyName);" + NL + "\t\t\t\t\tif (target instanceof "; >- protected final String TEXT_36 = ")" + NL + "\t\t\t\t\t\tanswer = answer " + NL + "\t\t\t\t\t\t\t\t&& ((("; >- protected final String TEXT_37 = ")target).isPropertyResettable(propertyName));" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn answer;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Caches the undo value and invokes redo()" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void execute() {" + NL + "\t\t\t\tundoValue = target.getPropertyValue(propertyName);" + NL + "\t\t\t\tif (undoValue instanceof "; >- protected final String TEXT_38 = ") {" + NL + "\t\t\t\t\tundoValue = (("; >- protected final String TEXT_39 = ")undoValue).getEditableValue();" + NL + "\t\t\t\t} else if (undoValue instanceof "; >- protected final String TEXT_40 = ") {" + NL + "\t\t\t\t\tundoValue = (("; >- protected final String TEXT_41 = ")undoValue).getEditableValue(propertyName);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tredo();" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Sets the IPropertySource." + NL + "\t\t\t * @param propSource the IPropertySource whose property has to be reset" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void setTarget("; >- protected final String TEXT_42 = " propSource) {" + NL + "\t\t\t\ttarget = propSource;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Resets the specified property on the specified IPropertySource" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void redo() {" + NL + "\t\t\t\ttarget.resetPropertyValue(propertyName);" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Sets the property that is to be reset." + NL + "\t\t\t * @param pName the property to be reset" + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void setPropertyId(Object pName) {" + NL + "\t\t\t\tpropertyName = pName;" + NL + "\t\t\t}" + NL + "\t\t" + NL + "\t\t\t/**" + NL + "\t\t\t * Restores the non-default value that was reset. " + NL + "\t\t\t * @generated" + NL + "\t\t\t */" + NL + "\t\t\tpublic void undo() {" + NL + "\t\t\t\ttarget.setPropertyValue(propertyName, undoValue);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_43 = " commandStackListener;" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_44 = " stack;" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate UndoablePropertySheetEntry() { }" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * Constructs the root entry using the given command stack." + NL + "\t\t * @param stack the command stack" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic UndoablePropertySheetEntry("; >- protected final String TEXT_45 = " stack) {" + NL + "\t\t\tsetCommandStack(stack);" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >- protected final String TEXT_46 = " createChildEntry() {" + NL + "\t\t\treturn new UndoablePropertySheetEntry();" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void dispose() {" + NL + "\t\t\tif (stack != null)" + NL + "\t\t\t\tstack.removeCommandStackListener(commandStackListener);" + NL + "\t\t\tsuper.dispose();" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\t"; >- protected final String TEXT_47 = " getCommandStack() {" + NL + "\t\t\t//only the root has, and is listening to the command stack" + NL + "\t\t\tif (getParent() != null)" + NL + "\t\t\t\treturn ((UndoablePropertySheetEntry)getParent()).getCommandStack();" + NL + "\t\t\treturn stack;" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void resetPropertyValue() {" + NL + "\t\t\t"; >- protected final String TEXT_48 = " cc = new "; >- protected final String TEXT_49 = "();" + NL + "\t\t\tResetValueCommand restoreCmd;" + NL + "\t" + NL + "\t\t\tif (getParent() == null)" + NL + "\t\t\t\t// root does not have a default value" + NL + "\t\t\t\treturn;" + NL + "\t" + NL + "\t\t\t//\tUse our parent's values to reset our values." + NL + "\t\t\tboolean change = false;" + NL + "\t\t\tObject[] objects = getParent().getValues();" + NL + "\t\t\tfor (int i = 0; i < objects.length; i++) {" + NL + "\t\t\t\t"; >- protected final String TEXT_50 = " source = getPropertySource(objects[i]);" + NL + "\t\t\t\tif (source.isPropertySet(getDescriptor().getId())) {" + NL + "\t\t\t\t\t//source.resetPropertyValue(getDescriptor()getId());" + NL + "\t\t\t\t\trestoreCmd = new ResetValueCommand();" + NL + "\t\t\t\t\trestoreCmd.setTarget(source);" + NL + "\t\t\t\t\trestoreCmd.setPropertyId(getDescriptor().getId());" + NL + "\t\t\t\t\tcc.add(restoreCmd);\t\t\t" + NL + "\t\t\t\t\tchange = true;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tif (change) {" + NL + "\t\t\t\tgetCommandStack().execute(cc);" + NL + "\t\t\t\trefreshFromRoot();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tvoid setCommandStack("; >- protected final String TEXT_51 = " stack) {" + NL + "\t\t\tthis.stack = stack;" + NL + "\t\t\tcommandStackListener = new "; >- protected final String TEXT_52 = "() {" + NL + "\t\t\t\tpublic void commandStackChanged("; >- protected final String TEXT_53 = " e) {" + NL + "\t\t\t\t\trefreshFromRoot();" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tstack.addCommandStackListener(commandStackListener);" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected void valueChanged("; >- protected final String TEXT_54 = " child) {" + NL + "\t\t\tvalueChanged((UndoablePropertySheetEntry)child," + NL + "\t\t\t\t\tnew "; >- protected final String TEXT_55 = "());" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tvoid valueChanged(UndoablePropertySheetEntry child, "; >- protected final String TEXT_56 = " command) {" + NL + "\t\t\t"; >- protected final String TEXT_57 = " cc = new "; >- protected final String TEXT_58 = "();" + NL + "\t\t\tcommand.add(cc);" + NL + "\t" + NL + "\t\t\tSetValueCommand setCommand;" + NL + "\t\t\tfor (int i = 0; i < getValues().length; i++) {" + NL + "\t\t\t\tsetCommand = new SetValueCommand(child.getDisplayName());" + NL + "\t\t\t\tsetCommand.setTarget(getPropertySource(getValues()[i]));" + NL + "\t\t\t\tsetCommand.setPropertyId(child.getDescriptor().getId());" + NL + "\t\t\t\tsetCommand.setPropertyValue(child.getValues()[i]);" + NL + "\t\t\t\tcc.add(setCommand);" + NL + "\t\t\t}" + NL + "\t" + NL + "\t\t\t// inform our parent" + NL + "\t\t\tif (getParent() != null)" + NL + "\t\t\t\t((UndoablePropertySheetEntry)getParent()).valueChanged(this, command);" + NL + "\t\t\telse {" + NL + "\t\t\t\t//I am the root entry" + NL + "\t\t\t\tstack.execute(command);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate TransactionalEditingDomain editingDomain;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_59 = " diagramRoot;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_60 = " diagram;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean isDirty = false;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PaletteRoot paletteRoot;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PropertySheetPage undoablePropertySheetPage;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate UpdatableActionGroup stackActions = new UpdatableActionGroup();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CommandStackListener commandStackListener = new CommandStackListener() {" + NL + "" + NL + "\t\tpublic void commandStackChanged(EventObject event) {" + NL + "\t\t\tstackActions.update();" + NL + "\t\t\tsetDirty(((CommandStack) event.getSource()).isDirty());" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate UpdatableActionGroup editPartActions = new UpdatableActionGroup();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ISelectionListener selectionListener = new ISelectionListener() {" + NL + "" + NL + "\t\tpublic void selectionChanged(IWorkbenchPart part, ISelection selection) {" + NL + "\t\t\teditPartActions.update();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate UpdatableActionGroup editorActions = new UpdatableActionGroup();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ComposedAdapterFactory domainAdapterFactory;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void firePropertyChange(int propertyId) {" + NL + "\t\tsuper.firePropertyChange(propertyId);" + NL + "\t\teditorActions.update();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Adds an action to this editor's <code>ActionRegistry</code>. (This is" + NL + "\t * a helper method.)" + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @param action" + NL + "\t * the action to add." + NL + "\t */" + NL + "\tprotected void addAction(IAction action) {" + NL + "\t\tgetActionRegistry().registerAction(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Adds an editor action to this editor." + NL + "\t * " + NL + "\t * <p>" + NL + "\t * Editor actions are actions that depend and work on the editor." + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @param action" + NL + "\t * the editor action" + NL + "\t */" + NL + "\tprotected void addEditorAction(WorkbenchPartAction action) {" + NL + "\t\tgetActionRegistry().registerAction(action);" + NL + "\t\teditorActions.addAction(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Adds an <code>EditPart</code> action to this editor." + NL + "\t * " + NL + "\t * <p>" + NL + "\t * <code>EditPart</code> actions are actions that depend and work on the" + NL + "\t * selected <code>EditPart</code>s." + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @param action" + NL + "\t * the <code>EditPart</code> action" + NL + "\t */" + NL + "\tprotected void addEditPartAction(SelectionAction action) {" + NL + "\t\tgetActionRegistry().registerAction(action);" + NL + "\t\teditPartActions.addAction(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Adds an <code>CommandStack</code> action to this editor." + NL + "\t * " + NL + "\t * <p>" + NL + "\t * <code>CommandStack</code> actions are actions that depend and work on" + NL + "\t * the <code>CommandStack</code>." + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @param action" + NL + "\t * the <code>CommandStack</code> action" + NL + "\t */" + NL + "\tprotected void addStackAction(StackAction action) {" + NL + "\t\tgetActionRegistry().registerAction(action);" + NL + "\t\tstackActions.addAction(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createActions() {" + NL + "\t\taddStackAction(new UndoAction(this));" + NL + "\t\taddStackAction(new RedoAction(this));" + NL + "" + NL + "\t\taddEditPartAction(new DeleteAction((IWorkbenchPart) this));" + NL + "\t\taddEditPartAction(new DirectEditAction((IWorkbenchPart) this));" + NL + "" + NL + "\t\taddEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.LEFT));" + NL + "\t\taddEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.RIGHT));" + NL + "\t\taddEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.TOP));" + NL + "\t\taddEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.BOTTOM));" + NL + "\t\taddEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.CENTER));" + NL + "\t\taddEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.MIDDLE));" + NL + "" + NL + "\t\taddEditorAction(new SaveAction(this));" + NL + "\t\taddEditorAction(new PrintAction(this));" + NL + "" + NL + "\t\tIAction zoomIn = new ZoomInAction(getZoomManager());" + NL + "\t\tIAction zoomOut = new ZoomOutAction(getZoomManager());" + NL + "\t\taddAction(zoomIn);" + NL + "\t\taddAction(zoomOut);" + NL + "\t\tgetSite().getKeyBindingService().registerAction(zoomIn);" + NL + "\t\tgetSite().getKeyBindingService().registerAction(zoomOut);" + NL + "\t}" + NL; >- protected final String TEXT_61 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tvoid closeEditor() {" + NL + "\t\tgetSite().getShell().getDisplay().syncExec(new Runnable() {" + NL + "\t\t\tpublic void run() {" + NL + "\t\t\t\tgetSite().getPage().closeEditor("; >- protected final String TEXT_62 = ".this, false);" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t}"; >- protected final String TEXT_63 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void dispose() {" + NL + "\t\t// remove CommandStackListener" + NL + "\t\tgetCommandStack().removeCommandStackListener(getStackActionsListener());" + NL + "" + NL + "\t\t// remove selection listener" + NL + "\t\tgetSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(getSelectionListener());" + NL + "" + NL + "\t\t// dispose the ActionRegistry (will dispose all actions)" + NL + "\t\tgetActionRegistry().dispose();" + NL + "" + NL + "\t\t// important: always call super implementation of dispose" + NL + "\t\tsuper.dispose();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void doSave(IProgressMonitor monitor) {" + NL + "\t\ttry {" + NL + "\t\t\tsave(monitor);" + NL + "\t\t\tgetCommandStack().markSaveLocation();" + NL + "\t\t} catch (CoreException e) {" + NL + "\t\t\tErrorDialog.openError(getSite().getShell(), \"Error During Save\", \"The current "; >- protected final String TEXT_64 = " model could not be saved.\", e.getStatus());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void save(IProgressMonitor progressMonitor) throws CoreException {" + NL + "\t\tif (progressMonitor == null) {" + NL + "\t\t\tprogressMonitor = new NullProgressMonitor();" + NL + "\t\t}" + NL + "\t\tprogressMonitor.beginTask(\"Saving\", getEditingDomain().getResourceSet().getResources().size());" + NL + "\t\ttry {" + NL + "\t\t\tfor(Iterator it = getEditingDomain().getResourceSet().getResources().iterator(); it.hasNext(); ) {" + NL + "\t\t\t\tResource next = (Resource)it.next();" + NL + "\t\t\t\tnext.save(Collections.EMPTY_MAP);" + NL + "\t\t\t\tprogressMonitor.worked(1);" + NL + "\t\t\t}" + NL + "\t\t} catch (IOException e) {" + NL + "\t\t\tIStatus status = new Status(IStatus.ERROR, "; >- protected final String TEXT_65 = ".ID, 0, \"Error writing file.\", e);" + NL + "\t\t\tthrow new CoreException(status);" + NL + "\t\t} finally {" + NL + "\t\t\tprogressMonitor.done();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isSaveAsAllowed() {" + NL + "\t\t// TODO: should be allowed." + NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void doSaveAs() {" + NL + "\t\t// TODO: Implement." + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class type) {" + NL + "\t\tif (type == IPropertySheetPage.class) {" + NL + "\t\t\treturn getPropertySheetPage();" + NL + "\t\t} else if (type == IContentOutlinePage.class) {" + NL + "\t\t\treturn getOutlinePage();" + NL + "\t\t} else if (type == ZoomManager.class) {" + NL + "\t\t\treturn getZoomManager();" + NL + "\t\t}" + NL + "\t\treturn super.getAdapter(type);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ZoomManager getZoomManager() {" + NL + "\t\treturn getZoomManager(getGraphicalViewer());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ZoomManager getZoomManager(GraphicalViewer viewer) {" + NL + "\t\t// get zoom manager from root edit part" + NL + "\t\tRootEditPart rootEditPart = viewer.getRootEditPart();" + NL + "\t\tZoomManager zoomManager = null;" + NL + "\t\tif (rootEditPart instanceof ScalableFreeformRootEditPart) {" + NL + "\t\t\tzoomManager = ((ScalableFreeformRootEditPart) rootEditPart).getZoomManager();" + NL + "\t\t} else if (rootEditPart instanceof ScalableRootEditPart) {" + NL + "\t\t\tzoomManager = ((ScalableRootEditPart) rootEditPart).getZoomManager();" + NL + "\t\t}" + NL + "\t\treturn zoomManager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CommandStackListener getStackActionsListener() {" + NL + "\t\treturn commandStackListener;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IContentOutlinePage getOutlinePage() {" + NL + "\t\t//TODO: outline page missing" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected PaletteRoot getPaletteRoot() {" + NL + "\t\tif (paletteRoot == null) {" + NL + "\t\t\tpaletteRoot = new PaletteRoot();"; >- protected final String TEXT_66 = NL + "\t\t\tnew "; >- protected final String TEXT_67 = "(getDomainAdapterFactory()).contributeToPalette(paletteRoot);"; >- protected final String TEXT_68 = NL + "\t\t}" + NL + "\t\treturn paletteRoot;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected PropertySheetPage getPropertySheetPage() {" + NL + "\t\tif (undoablePropertySheetPage == null) {" + NL + "\t\t\tundoablePropertySheetPage = new PropertySheetPage();" + NL + "\t\t\tUndoablePropertySheetEntry rootEntry = new UndoablePropertySheetEntry(getCommandStack());" + NL + "\t\t\trootEntry.setPropertySourceProvider(new "; >- protected final String TEXT_69 = "(getDomainAdapterFactory()));" + NL + "\t\t\tundoablePropertySheetPage.setRootEntry(rootEntry);" + NL + "\t\t}" + NL + "" + NL + "\t\treturn undoablePropertySheetPage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ISelectionListener getSelectionListener() {" + NL + "\t\treturn selectionListener;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_70 = " getDiagramRoot() {" + NL + "\t\treturn diagramRoot;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Diagram getDiagram() {" + NL + "\t\treturn diagram;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void init(IEditorSite site, IEditorInput input) throws PartInitException {" + NL + "\t\tURI file = getURIFromInput(input);" + NL + "\t\tif (file == null) {" + NL + "\t\t\tthrow new PartInitException(\"The specified input is not valid.\");" + NL + "\t\t}" + NL + "\t\tsetSite(site);" + NL + "\t\tsetInput(input);" + NL + "\t\tsetEditDomain(new DefaultEditDomain(this));" + NL + "" + NL + "\t\t// validate" + NL + "\t\tif (getDiagramRoot() == null) {" + NL + "\t\t\tthrow new PartInitException(\"The specified input is not valid.\");" + NL + "\t\t}" + NL + "" + NL + "\t\t// add CommandStackListener" + NL + "\t\tgetCommandStack().addCommandStackListener(getStackActionsListener());" + NL + "" + NL + "\t\t// add selection change listener" + NL + "\t\tgetSite().getWorkbenchWindow().getSelectionService().addSelectionListener(getSelectionListener());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setInput(IEditorInput input) {"; >- protected final String TEXT_71 = NL + "\t\tif (getEditorInput() instanceof "; >- protected final String TEXT_72 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_73 = " resource = (("; >- protected final String TEXT_74 = ") getEditorInput()).getFile();" + NL + "\t\t\tresource.getWorkspace().removeResourceChangeListener(getResourceTracker());" + NL + "\t\t}"; >- protected final String TEXT_75 = NL + "\t\tURI file = getURIFromInput(input);" + NL + "\t\tload(file);" + NL + "\t\tsetPartName(file.lastSegment());" + NL + "\t\tsuper.setInput(input);"; >- protected final String TEXT_76 = NL + "\t\tif (getEditorInput() instanceof "; >- protected final String TEXT_77 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_78 = " resource = (("; >- protected final String TEXT_79 = ") getEditorInput()).getFile();" + NL + "\t\t\tresource.getWorkspace().addResourceChangeListener(getResourceTracker());" + NL + "\t\t}"; >- protected final String TEXT_80 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate URI getURIFromInput(IEditorInput input) {"; >- protected final String TEXT_81 = NL + "\t\tif (input instanceof "; >- protected final String TEXT_82 = ") {" + NL + "\t\t\treturn (("; >- protected final String TEXT_83 = ") input).getURI();" + NL + "\t\t}" + NL + "\t\tif (input instanceof "; >- protected final String TEXT_84 = ") {" + NL + "\t\t\treturn URI.createFileURI(((IPathEditorInput)input).getPath().toOSString());" + NL + "\t\t}"; >- protected final String TEXT_85 = NL + "\t\tif (input instanceof "; >- protected final String TEXT_86 = ") {" + NL + "\t\t\treturn URI.createPlatformResourceURI(((IFileEditorInput)input).getFile().getFullPath().toString());" + NL + "\t\t}"; >- protected final String TEXT_87 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isDirty() {" + NL + "\t\treturn isDirty;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void setDirty(boolean dirty) {" + NL + "\t\tif (isDirty != dirty) {" + NL + "\t\t\tisDirty = dirty;" + NL + "\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TransactionalEditingDomain getEditingDomain() {" + NL + "\t\tif (editingDomain == null) {" + NL + "\t\t\teditingDomain = "; >- protected final String TEXT_88 = ".INSTANCE.createEditingDomain();" + NL + "\t\t\t//editingDomain.setAdapterFactory(getDomainAdapterFactory());" + NL + "\t\t\teditingDomain.getResourceSet().eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(editingDomain));" + NL + "\t\t}" + NL + "\t\treturn editingDomain;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate AdapterFactory getDomainAdapterFactory() {" + NL + "\t\tif (domainAdapterFactory == null) {" + NL + "\t\t\tList factories = new ArrayList();" + NL + "\t\t\tfactories.add(new ResourceItemProviderAdapterFactory());"; >- protected final String TEXT_89 = NL + "\t\t\tfactories.add(new "; >- protected final String TEXT_90 = "());"; >- protected final String TEXT_91 = NL + "\t\t\tfactories.add(new ReflectiveItemProviderAdapterFactory());" + NL + "\t\t\tfactories.add(new NotationItemProviderAdapterFactory());" + NL + "\t\t\tdomainAdapterFactory = new ComposedAdapterFactory(factories);" + NL + "\t\t}" + NL + "\t\treturn domainAdapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void load(URI diagramFile) {" + NL + "\t\tdiagramRoot = null;" + NL + "\t\tdiagram = null;" + NL + "\t\tif (diagramFile == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tTransactionalEditingDomain editingDomain = getEditingDomain();" + NL + "\t\tResourceSet resourceSet = editingDomain.getResourceSet();" + NL + "\t\tResource diagramResource = resourceSet.getResource(diagramFile, true);" + NL + "\t\tif (diagramResource == null) {" + NL + "\t\t\tdiagramResource = resourceSet.createResource(diagramFile);" + NL + "\t\t}" + NL + "\t\tdiagram = (Diagram) findInResource(diagramResource, Diagram.class);" + NL + "\t\tif (diagram == null) {" + NL + "\t\t\tdiagram = NotationFactory.eINSTANCE.createDiagram();" + NL + "\t\t\tdiagramResource.getContents().add(0, diagram);" + NL + "\t\t\t//Auxiliary creation should not be undoable." + NL + "\t\t\ttry {" + NL + "\t\t\t\tdiagramResource.save(Collections.EMPTY_MAP);" + NL + "\t\t\t} catch (IOException e) {" + NL + "\t\t\t\tdiagram = null;" + NL + "\t\t\t\tdiagramRoot = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tdiagramRoot = ("; >- protected final String TEXT_92 = ") diagram.getElement();" + NL + "\t\tif (diagramRoot == null) {"; >- protected final String TEXT_93 = NL + "\t\t\tURI modelFile = "; >- protected final String TEXT_94 = ".getModelFileURI(diagramFile);" + NL + "\t\t\tResource modelResource = resourceSet.getResource(modelFile, true);" + NL + "\t\t\tif (modelResource == null) {" + NL + "\t\t\t\tmodelResource = resourceSet.createResource(modelFile);" + NL + "\t\t\t}"; >- protected final String TEXT_95 = NL + "\t\t\tdiagramRoot = ("; >- protected final String TEXT_96 = ") findInResource("; >- protected final String TEXT_97 = ", "; >- protected final String TEXT_98 = ".class);" + NL + "\t\t\tif (diagramRoot == null) {" + NL + "\t\t\t\tdiagramRoot = "; >- protected final String TEXT_99 = ".eINSTANCE.create"; >- protected final String TEXT_100 = "();" + NL + "\t\t\t\t"; >- protected final String TEXT_101 = ".getContents().add(0, diagramRoot);" + NL + "\t\t\t\t//We don't want this auxiliary creation to be undoable." + NL + "\t\t\t\ttry {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_102 = ".save(Collections.EMPTY_MAP);" + NL + "\t\t\t\t} catch (IOException e) {" + NL + "\t\t\t\t\tdiagram = null;" + NL + "\t\t\t\t\tdiagramRoot = null;" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tif (!diagram.isSetElement()) {" + NL + "\t\t\t\tdiagram.setElement("; >- protected final String TEXT_103 = "("; >- protected final String TEXT_104 = ") "; >- protected final String TEXT_105 = "diagramRoot);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}"; >- protected final String TEXT_106 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate Object findInResource(Resource resource, Class expectedClass) {" + NL + "\t\tfor(Iterator it = resource.getContents().iterator(); it.hasNext(); ) {" + NL + "\t\t\tObject next = it.next();" + NL + "\t\t\tif (expectedClass.isInstance(next)) {" + NL + "\t\t\t\treturn next;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setFocus() {" + NL + "\t\tgetGraphicalViewer().getControl().setFocus();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic final void createPartControl(Composite parent) {" + NL + "\t\tsuper.createPartControl(parent);" + NL + "\t\t// initialize actions" + NL + "\t\tcreateActions();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createGraphicalViewer(Composite parent) {" + NL + "\t\tsuper.createGraphicalViewer(parent);" + NL + "\t\t// initialize the viewer with input" + NL + "\t\tScalableFreeformRootEditPart root = new ScalableFreeformRootEditPart();" + NL + "\t\tgetGraphicalViewer().setRootEditPart(root);" + NL + "\t\tgetGraphicalViewer().setEditPartFactory(new "; >- protected final String TEXT_107 = "());" + NL + "" + NL + "\t\t"; >- protected final String TEXT_108 = " printableLayers = ("; >- protected final String TEXT_109 = ") root.getLayer("; >- protected final String TEXT_110 = ".PRINTABLE_LAYERS);" + NL + "\t\t"; >- protected final String TEXT_111 = " extLabelsLayer = new "; >- protected final String TEXT_112 = "();" + NL + "\t\textLabelsLayer.setLayoutManager(new "; >- protected final String TEXT_113 = "());" + NL + "\t\tprintableLayers.addLayerAfter(extLabelsLayer, "; >- protected final String TEXT_114 = ".EXTERNAL_NODE_LABELS_LAYER, "; >- protected final String TEXT_115 = ".PRIMARY_LAYER);" + NL + "\t\tgetGraphicalViewer().setContents(getDiagram());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void configureGraphicalViewer() {" + NL + "\t\tsuper.configureGraphicalViewer();" + NL + "\t\tGraphicalViewer viewer = getGraphicalViewer();" + NL + "\t\t// configure the context menu" + NL + "\t\tContextMenuProvider provider = new "; >- protected final String TEXT_116 = "ContextMenuProvider(viewer);" + NL + "\t\tviewer.setContextMenu(provider);" + NL + "\t\tgetSite().registerContextMenu("; >- protected final String TEXT_117 = ".ID + \".editor.contextmenu\", provider, getSite().getSelectionProvider()); //$NON-NLS-1$" + NL + "" + NL + "\t\tKeyHandler keyHandler = new GraphicalViewerKeyHandler(viewer);" + NL + "\t\tkeyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0), getActionRegistry().getAction(ActionFactory.DELETE.getId()));" + NL + "\t\tkeyHandler.put(KeyStroke.getPressed(SWT.F2, 0), getActionRegistry().getAction(GEFActionConstants.DIRECT_EDIT));" + NL + "\t\tviewer.setKeyHandler(keyHandler);" + NL + "" + NL + "\t\tviewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.CTRL), MouseWheelZoomHandler.SINGLETON);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class "; >- protected final String TEXT_118 = "ContextMenuProvider extends ContextMenuProvider {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_119 = "ContextMenuProvider(EditPartViewer viewer) {" + NL + "\t\t\tsuper(viewer);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t public void buildContextMenu(IMenuManager menuManager) {" + NL + "\t GEFActionConstants.addStandardActionGroups(menuManager);" + NL + "\t\t\tappendActionToMenu(menuManager, ActionFactory.UNDO.getId(), GEFActionConstants.GROUP_UNDO);" + NL + "\t\t\tappendActionToMenu(menuManager, ActionFactory.REDO.getId(), GEFActionConstants.GROUP_UNDO);" + NL + "\t" + NL + "\t\t\tappendActionToMenu(menuManager, ActionFactory.COPY.getId(), GEFActionConstants.GROUP_EDIT);" + NL + "\t\t\tappendActionToMenu(menuManager, ActionFactory.PASTE.getId(), GEFActionConstants.GROUP_EDIT);" + NL + "\t\t\tappendActionToMenu(menuManager, ActionFactory.DELETE.getId(), GEFActionConstants.GROUP_EDIT);" + NL + "\t\t\tappendActionToMenu(menuManager, GEFActionConstants.DIRECT_EDIT, GEFActionConstants.GROUP_EDIT);" + NL + "" + NL + "\t\t\tappendActionToMenu(menuManager, ActionFactory.SAVE.getId(), GEFActionConstants.GROUP_SAVE);" + NL + "" + NL + "\t\t\tappendAlignmentSubmenu(menuManager);" + NL + "\t }" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void appendAlignmentSubmenu(IMenuManager menuManager) {" + NL + "\t\t\t// Alignment Actions" + NL + "\t\t\tMenuManager submenu = new MenuManager(\"Align\");" + NL + "\t\t\tsubmenu.add(new Separator(GEFActionConstants.MB_ADDITIONS));" + NL + "\t" + NL + "\t\t\tappendActionToMenu(submenu, GEFActionConstants.ALIGN_LEFT, GEFActionConstants.MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, GEFActionConstants.ALIGN_CENTER, GEFActionConstants.MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, GEFActionConstants.ALIGN_RIGHT, GEFActionConstants.MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, GEFActionConstants.ALIGN_TOP, GEFActionConstants.MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, GEFActionConstants.ALIGN_MIDDLE, GEFActionConstants.MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, GEFActionConstants.ALIGN_BOTTOM, GEFActionConstants.MB_ADDITIONS);" + NL + "\t" + NL + "\t\t\tif (!submenu.isEmpty()) {" + NL + "\t\t\t\tmenuManager.appendToGroup(GEFActionConstants.GROUP_REST, submenu);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void appendActionToMenu(IMenuManager menu, String actionId, String menuGroup) {" + NL + "\t\t\tIAction action = getActionRegistry().getAction(actionId);" + NL + "\t\t\tif (action != null && action.isEnabled()) {" + NL + "\t\t\t\tmenu.appendToGroup(menuGroup, action);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "}"; >- protected final String TEXT_120 = NL; >+ protected final String TEXT_3 = " extends "; >+ protected final String TEXT_4 = " {"; >+ protected final String TEXT_5 = NL + "\t/**" + NL + "\t * This class listens to changes to the file system in the workspace, and" + NL + "\t * makes the following changes: " + NL + "\t * <ul><li>If an open, saved file gets deleted, the editor is closed.</li>" + NL + "\t * <li>If an open file gets renamed or moved, the editor's" + NL + "\t * input is changed accordingly.</li></ul>" + NL + "\t *" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class ResourceTracker implements "; >+ protected final String TEXT_6 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void resourceChanged("; >+ protected final String TEXT_7 = " event) {" + NL + "\t\t\t"; >+ protected final String TEXT_8 = " delta = event.getDelta();" + NL + "\t\t\tif (delta != null) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_9 = " fileDelta = delta.findMember((("; >+ protected final String TEXT_10 = ") getEditorInput()).getFile().getFullPath());" + NL + "\t\t\t\tif (fileDelta != null) {" + NL + "\t\t\t\t\tprocessFileDelta(fileDelta);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void processFileDelta("; >+ protected final String TEXT_11 = " delta) {" + NL + "\t\t\tassert (delta != null && delta.getResource().equals((("; >+ protected final String TEXT_12 = ") getEditorInput()).getFile()));" + NL + "\t\t\tif (delta.getKind() == "; >+ protected final String TEXT_13 = ".REMOVED) {" + NL + "\t\t\t\tif (("; >+ protected final String TEXT_14 = ".MOVED_TO & delta.getFlags()) == 0) {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_15 = NL + "\t\t\t\t\tif (!isDirty()) {" + NL + "\t\t\t\t\t\tcloseEditor();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\t// else if it was moved or renamed" + NL + "\t\t\t\t\tfinal "; >+ protected final String TEXT_16 = " newFile = "; >+ protected final String TEXT_17 = ".getWorkspace().getRoot().getFile(delta.getMovedToPath());" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_18 = " display = getSite().getShell().getDisplay();" + NL + "\t\t\t\t\tdisplay.asyncExec(new Runnable() {" + NL + "\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\tsetInput(new "; >+ protected final String TEXT_19 = "(newFile));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t});" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ResourceTracker resourceTracker;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ResourceTracker getResourceTracker() {" + NL + "\t\tif (resourceTracker == null) {" + NL + "\t\t\tresourceTracker = new ResourceTracker();" + NL + "\t\t}" + NL + "\t\treturn resourceTracker;" + NL + "\t}" + NL; >+ protected final String TEXT_20 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_21 = " diagramRoot;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_22 = " diagram;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_23 = " domainAdapterFactory;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createActions() {" + NL + "\t\taddStackAction(new "; >+ protected final String TEXT_24 = "(this));" + NL + "\t\taddStackAction(new "; >+ protected final String TEXT_25 = "(this));" + NL + "" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_26 = "(("; >+ protected final String TEXT_27 = ") this));" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_28 = "(("; >+ protected final String TEXT_29 = ") this));" + NL + "" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_30 = "(("; >+ protected final String TEXT_31 = ") this, "; >+ protected final String TEXT_32 = ".LEFT));" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_33 = "(("; >+ protected final String TEXT_34 = ") this, "; >+ protected final String TEXT_35 = ".RIGHT));" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_36 = "(("; >+ protected final String TEXT_37 = ") this, "; >+ protected final String TEXT_38 = ".TOP));" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_39 = "(("; >+ protected final String TEXT_40 = ") this, "; >+ protected final String TEXT_41 = ".BOTTOM));" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_42 = "(("; >+ protected final String TEXT_43 = ") this, "; >+ protected final String TEXT_44 = ".CENTER));" + NL + "\t\taddEditPartAction(new "; >+ protected final String TEXT_45 = "(("; >+ protected final String TEXT_46 = ") this, "; >+ protected final String TEXT_47 = ".MIDDLE));" + NL + "" + NL + "\t\taddEditorAction(new "; >+ protected final String TEXT_48 = "(this));" + NL + "\t\taddEditorAction(new "; >+ protected final String TEXT_49 = "(this));" + NL + "" + NL + "\t\t"; >+ protected final String TEXT_50 = " zoomIn = new "; >+ protected final String TEXT_51 = "(getZoomManager());" + NL + "\t\t"; >+ protected final String TEXT_52 = " zoomOut = new "; >+ protected final String TEXT_53 = "(getZoomManager());" + NL + "\t\taddAction(zoomIn);" + NL + "\t\taddAction(zoomOut);" + NL + "\t\tgetSite().getKeyBindingService().registerAction(zoomIn);" + NL + "\t\tgetSite().getKeyBindingService().registerAction(zoomOut);" + NL + "\t}" + NL; >+ protected final String TEXT_54 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tvoid closeEditor() {" + NL + "\t\tgetSite().getShell().getDisplay().syncExec(new Runnable() {" + NL + "\t\t\tpublic void run() {" + NL + "\t\t\t\tgetSite().getPage().closeEditor("; >+ protected final String TEXT_55 = ".this, false);" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t}"; >+ protected final String TEXT_56 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void dispose() {" + NL + "\t\t// important: always call super implementation of dispose" + NL + "\t\tsuper.dispose();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void doSave("; >+ protected final String TEXT_57 = " monitor) {" + NL + "\t\ttry {" + NL + "\t\t\tsave(monitor);" + NL + "\t\t\tgetCommandStack().markSaveLocation();" + NL + "\t\t} catch ("; >+ protected final String TEXT_58 = " e) {" + NL + "\t\t\t"; >+ protected final String TEXT_59 = ".openError(getSite().getShell(), \"Error During Save\", \"The current "; >+ protected final String TEXT_60 = " model could not be saved.\", e.getStatus());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void configurePalette("; >+ protected final String TEXT_61 = " paletteRoot) {"; >+ protected final String TEXT_62 = NL + "\t\tnew "; >+ protected final String TEXT_63 = "(getDomainAdapterFactory()).contributeToPalette(paletteRoot);"; >+ protected final String TEXT_64 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_65 = " getDiagramRoot() {" + NL + "\t\treturn diagramRoot;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_66 = " getDiagram() {" + NL + "\t\treturn diagram;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void init("; >+ protected final String TEXT_67 = " site, "; >+ protected final String TEXT_68 = " input) throws "; >+ protected final String TEXT_69 = " {" + NL + "\t\t"; >+ protected final String TEXT_70 = " file = getURIFromInput(input);" + NL + "\t\tif (file == null) {" + NL + "\t\t\tthrow new "; >+ protected final String TEXT_71 = "(\"The specified input is not valid.\");" + NL + "\t\t}" + NL + "\t\tsuper.init(site, input);" + NL + "\t\t// validate" + NL + "\t\tif (getDiagramRoot() == null) {" + NL + "\t\t\tthrow new "; >+ protected final String TEXT_72 = "(\"The specified input is not valid.\");" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setInput("; >+ protected final String TEXT_73 = " input) {"; >+ protected final String TEXT_74 = NL + "\t\tif (getEditorInput() instanceof "; >+ protected final String TEXT_75 = ") {" + NL + "\t\t\t"; >+ protected final String TEXT_76 = " resource = (("; >+ protected final String TEXT_77 = ") getEditorInput()).getFile();" + NL + "\t\t\tresource.getWorkspace().removeResourceChangeListener(getResourceTracker());" + NL + "\t\t}"; >+ protected final String TEXT_78 = NL + "\t\t"; >+ protected final String TEXT_79 = " file = getURIFromInput(input);" + NL + "\t\tload(file);" + NL + "\t\tsetPartName(file.lastSegment());" + NL + "\t\tsuper.setInput(input);"; >+ protected final String TEXT_80 = NL + "\t\tif (getEditorInput() instanceof "; >+ protected final String TEXT_81 = ") {" + NL + "\t\t\t"; >+ protected final String TEXT_82 = " resource = (("; >+ protected final String TEXT_83 = ") getEditorInput()).getFile();" + NL + "\t\t\tresource.getWorkspace().addResourceChangeListener(getResourceTracker());" + NL + "\t\t}"; >+ protected final String TEXT_84 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_85 = " getURIFromInput("; >+ protected final String TEXT_86 = " input) {"; >+ protected final String TEXT_87 = NL + "\t\tif (input instanceof "; >+ protected final String TEXT_88 = ") {" + NL + "\t\t\treturn (("; >+ protected final String TEXT_89 = ") input).getURI();" + NL + "\t\t}" + NL + "\t\tif (input instanceof "; >+ protected final String TEXT_90 = ") {" + NL + "\t\t\treturn "; >+ protected final String TEXT_91 = ".createFileURI(((IPathEditorInput)input).getPath().toOSString());" + NL + "\t\t}"; >+ protected final String TEXT_92 = NL + "\t\tif (input instanceof "; >+ protected final String TEXT_93 = ") {" + NL + "\t\t\treturn "; >+ protected final String TEXT_94 = ".createPlatformResourceURI(((IFileEditorInput)input).getFile().getFullPath().toString());" + NL + "\t\t}"; >+ protected final String TEXT_95 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_96 = " getDomainAdapterFactory() {" + NL + "\t\tif (domainAdapterFactory == null) {" + NL + "\t\t\t"; >+ protected final String TEXT_97 = " factories = new "; >+ protected final String TEXT_98 = "();" + NL + "\t\t\tfactories.add(new "; >+ protected final String TEXT_99 = "());"; >+ protected final String TEXT_100 = NL + "\t\t\tfactories.add(new "; >+ protected final String TEXT_101 = "());"; >+ protected final String TEXT_102 = NL + "\t\t\tfactories.add(new "; >+ protected final String TEXT_103 = "());" + NL + "\t\t\tfactories.add(new "; >+ protected final String TEXT_104 = "());" + NL + "\t\t\tdomainAdapterFactory = new "; >+ protected final String TEXT_105 = "(factories);" + NL + "\t\t}" + NL + "\t\treturn domainAdapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void load("; >+ protected final String TEXT_106 = " diagramFile) {" + NL + "\t\tdiagramRoot = null;" + NL + "\t\tdiagram = null;" + NL + "\t\tif (diagramFile == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_107 = " editingDomain = getEditingDomain();" + NL + "\t\t"; >+ protected final String TEXT_108 = " resourceSet = editingDomain.getResourceSet();" + NL + "\t\t"; >+ protected final String TEXT_109 = " diagramResource = resourceSet.getResource(diagramFile, true);" + NL + "\t\tif (diagramResource == null) {" + NL + "\t\t\tdiagramResource = resourceSet.createResource(diagramFile);" + NL + "\t\t}" + NL + "\t\tdiagram = ("; >+ protected final String TEXT_110 = ") findInResource(diagramResource, "; >+ protected final String TEXT_111 = ".class);" + NL + "\t\tif (diagram == null) {" + NL + "\t\t\tdiagram = "; >+ protected final String TEXT_112 = ".eINSTANCE.createDiagram();" + NL + "\t\t\tdiagramResource.getContents().add(0, diagram);" + NL + "\t\t\t//Auxiliary creation should not be undoable." + NL + "\t\t\ttry {" + NL + "\t\t\t\tdiagramResource.save("; >+ protected final String TEXT_113 = ".EMPTY_MAP);" + NL + "\t\t\t} catch ("; >+ protected final String TEXT_114 = " e) {" + NL + "\t\t\t\tdiagram = null;" + NL + "\t\t\t\tdiagramRoot = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tdiagramRoot = ("; >+ protected final String TEXT_115 = ") diagram.getElement();" + NL + "\t\tif (diagramRoot == null) {"; >+ protected final String TEXT_116 = NL + "\t\t\t"; >+ protected final String TEXT_117 = " modelFile = "; >+ protected final String TEXT_118 = ".getModelFileURI(diagramFile);" + NL + "\t\t\t"; >+ protected final String TEXT_119 = " modelResource = resourceSet.getResource(modelFile, true);" + NL + "\t\t\tif (modelResource == null) {" + NL + "\t\t\t\tmodelResource = resourceSet.createResource(modelFile);" + NL + "\t\t\t}"; >+ protected final String TEXT_120 = NL + "\t\t\tdiagramRoot = ("; >+ protected final String TEXT_121 = ") findInResource("; >+ protected final String TEXT_122 = ", "; >+ protected final String TEXT_123 = ".class);" + NL + "\t\t\tif (diagramRoot == null) {" + NL + "\t\t\t\tdiagramRoot = "; >+ protected final String TEXT_124 = ".eINSTANCE.create"; >+ protected final String TEXT_125 = "();" + NL + "\t\t\t\t"; >+ protected final String TEXT_126 = ".getContents().add(0, diagramRoot);" + NL + "\t\t\t\t//We don't want this auxiliary creation to be undoable." + NL + "\t\t\t\ttry {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_127 = ".save("; >+ protected final String TEXT_128 = ".EMPTY_MAP);" + NL + "\t\t\t\t} catch ("; >+ protected final String TEXT_129 = " e) {" + NL + "\t\t\t\t\tdiagram = null;" + NL + "\t\t\t\t\tdiagramRoot = null;" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tif (!diagram.isSetElement()) {" + NL + "\t\t\t\tdiagram.setElement("; >+ protected final String TEXT_130 = "("; >+ protected final String TEXT_131 = ") "; >+ protected final String TEXT_132 = "diagramRoot);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}"; >+ protected final String TEXT_133 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate Object findInResource("; >+ protected final String TEXT_134 = " resource, Class expectedClass) {" + NL + "\t\tfor("; >+ protected final String TEXT_135 = " it = resource.getContents().iterator(); it.hasNext(); ) {" + NL + "\t\t\tObject next = it.next();" + NL + "\t\t\tif (expectedClass.isInstance(next)) {" + NL + "\t\t\t\treturn next;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createGraphicalViewer("; >+ protected final String TEXT_136 = " parent) {" + NL + "\t\tsuper.createGraphicalViewer(parent);" + NL + "\t\t// initialize the viewer with input" + NL + "\t\t"; >+ protected final String TEXT_137 = " root = new "; >+ protected final String TEXT_138 = "();" + NL + "\t\tgetGraphicalViewer().setRootEditPart(root);" + NL + "\t\tgetGraphicalViewer().setEditPartFactory(new "; >+ protected final String TEXT_139 = "());" + NL + "" + NL + "\t\t"; >+ protected final String TEXT_140 = " printableLayers = ("; >+ protected final String TEXT_141 = ") root.getLayer("; >+ protected final String TEXT_142 = ".PRINTABLE_LAYERS);" + NL + "\t\t"; >+ protected final String TEXT_143 = " extLabelsLayer = new "; >+ protected final String TEXT_144 = "();" + NL + "\t\textLabelsLayer.setLayoutManager(new "; >+ protected final String TEXT_145 = "());" + NL + "\t\tprintableLayers.addLayerAfter(extLabelsLayer, "; >+ protected final String TEXT_146 = ".EXTERNAL_NODE_LABELS_LAYER, "; >+ protected final String TEXT_147 = ".PRIMARY_LAYER);" + NL + "\t\tgetGraphicalViewer().setContents(getDiagram());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void configureGraphicalViewer() {" + NL + "\t\tsuper.configureGraphicalViewer();" + NL + "\t\t"; >+ protected final String TEXT_148 = " viewer = getGraphicalViewer();" + NL + "\t\t// configure the context menu" + NL + "\t\t"; >+ protected final String TEXT_149 = " provider = new "; >+ protected final String TEXT_150 = "ContextMenuProvider(viewer);" + NL + "\t\tviewer.setContextMenu(provider);" + NL + "\t\tgetSite().registerContextMenu("; >+ protected final String TEXT_151 = ".ID + \".editor.contextmenu\", provider, getSite().getSelectionProvider()); //$NON-NLS-1$" + NL + "" + NL + "\t\t"; >+ protected final String TEXT_152 = " keyHandler = new "; >+ protected final String TEXT_153 = "(viewer);" + NL + "\t\tkeyHandler.put("; >+ protected final String TEXT_154 = ".getPressed("; >+ protected final String TEXT_155 = ".DEL, 127, 0), getActionRegistry().getAction("; >+ protected final String TEXT_156 = ".DELETE.getId()));" + NL + "\t\tkeyHandler.put("; >+ protected final String TEXT_157 = ".getPressed("; >+ protected final String TEXT_158 = ".F2, 0), getActionRegistry().getAction("; >+ protected final String TEXT_159 = ".DIRECT_EDIT));" + NL + "\t\tviewer.setKeyHandler(keyHandler);" + NL + "" + NL + "\t\tviewer.setProperty("; >+ protected final String TEXT_160 = ".KeyGenerator.getKey("; >+ protected final String TEXT_161 = ".CTRL), "; >+ protected final String TEXT_162 = ".SINGLETON);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class "; >+ protected final String TEXT_163 = "ContextMenuProvider extends "; >+ protected final String TEXT_164 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >+ protected final String TEXT_165 = "ContextMenuProvider("; >+ protected final String TEXT_166 = " viewer) {" + NL + "\t\t\tsuper(viewer);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t public void buildContextMenu("; >+ protected final String TEXT_167 = " menuManager) {" + NL + "\t "; >+ protected final String TEXT_168 = ".addStandardActionGroups(menuManager);" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_169 = ".UNDO.getId(), "; >+ protected final String TEXT_170 = ".GROUP_UNDO);" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_171 = ".REDO.getId(), "; >+ protected final String TEXT_172 = ".GROUP_UNDO);" + NL + "\t" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_173 = ".COPY.getId(), "; >+ protected final String TEXT_174 = ".GROUP_EDIT);" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_175 = ".PASTE.getId(), "; >+ protected final String TEXT_176 = ".GROUP_EDIT);" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_177 = ".DELETE.getId(), "; >+ protected final String TEXT_178 = ".GROUP_EDIT);" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_179 = ".DIRECT_EDIT, "; >+ protected final String TEXT_180 = ".GROUP_EDIT);" + NL + "" + NL + "\t\t\tappendActionToMenu(menuManager, "; >+ protected final String TEXT_181 = ".SAVE.getId(), "; >+ protected final String TEXT_182 = ".GROUP_SAVE);" + NL + "" + NL + "\t\t\tappendAlignmentSubmenu(menuManager);" + NL + "\t }" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void appendAlignmentSubmenu("; >+ protected final String TEXT_183 = " menuManager) {" + NL + "\t\t\t// Alignment Actions" + NL + "\t\t\t"; >+ protected final String TEXT_184 = " submenu = new "; >+ protected final String TEXT_185 = "(\"Align\");" + NL + "\t\t\tsubmenu.add(new "; >+ protected final String TEXT_186 = "("; >+ protected final String TEXT_187 = ".MB_ADDITIONS));" + NL + "\t" + NL + "\t\t\tappendActionToMenu(submenu, "; >+ protected final String TEXT_188 = ".ALIGN_LEFT, "; >+ protected final String TEXT_189 = ".MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, "; >+ protected final String TEXT_190 = ".ALIGN_CENTER, "; >+ protected final String TEXT_191 = ".MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, "; >+ protected final String TEXT_192 = ".ALIGN_RIGHT, "; >+ protected final String TEXT_193 = ".MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, "; >+ protected final String TEXT_194 = ".ALIGN_TOP, "; >+ protected final String TEXT_195 = ".MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, "; >+ protected final String TEXT_196 = ".ALIGN_MIDDLE, "; >+ protected final String TEXT_197 = ".MB_ADDITIONS);" + NL + "\t\t\tappendActionToMenu(submenu, "; >+ protected final String TEXT_198 = ".ALIGN_BOTTOM, "; >+ protected final String TEXT_199 = ".MB_ADDITIONS);" + NL + "\t" + NL + "\t\t\tif (!submenu.isEmpty()) {" + NL + "\t\t\t\tmenuManager.appendToGroup("; >+ protected final String TEXT_200 = ".GROUP_REST, submenu);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void appendActionToMenu("; >+ protected final String TEXT_201 = " menu, String actionId, String menuGroup) {" + NL + "\t\t\t"; >+ protected final String TEXT_202 = " action = getActionRegistry().getAction(actionId);" + NL + "\t\t\tif (action != null && action.isEnabled()) {" + NL + "\t\t\t\tmenu.appendToGroup(menuGroup, action);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "}"; >+ protected final String TEXT_203 = NL; > > public String generate(Object argument) > { >@@ -151,299 +234,265 @@ > importManager.markImportLocation(stringBuffer); > stringBuffer.append(TEXT_1); > >-importManager.registerInnerClass("UndoablePropertySheetEntry"); >-importManager.registerInnerClass("SetValueCommand"); >-importManager.registerInnerClass("ResetValueCommand"); >-importManager.registerInnerClass("UpdatableActionGroup"); > importManager.registerInnerClass(genEditor.getClassName() + "ContextMenuProvider"); > if (!isRichClientPlatform) { > importManager.registerInnerClass("ResourceTracker"); > } > >-importManager.addImport("java.io.IOException"); >-importManager.addImport("java.util.ArrayList"); >-importManager.addImport("java.util.Collections"); >-importManager.addImport("java.util.EventObject"); >-importManager.addImport("java.util.HashMap"); >-importManager.addImport("java.util.Iterator"); >-importManager.addImport("java.util.List"); >- >-importManager.addImport("org.eclipse.core.runtime.CoreException"); >-importManager.addImport("org.eclipse.core.runtime.IProgressMonitor"); >-importManager.addImport("org.eclipse.core.runtime.IStatus"); >-importManager.addImport("org.eclipse.core.runtime.NullProgressMonitor"); >-importManager.addImport("org.eclipse.core.runtime.Status"); >-importManager.addImport("org.eclipse.draw2d.PositionConstants"); >-importManager.addImport("org.eclipse.emf.common.util.URI"); >-importManager.addImport("org.eclipse.emf.ecore.resource.Resource"); >-importManager.addImport("org.eclipse.emf.ecore.resource.ResourceSet"); >-importManager.addImport("org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain"); >-importManager.addImport("org.eclipse.emf.transaction.TransactionalEditingDomain"); >-importManager.addImport("org.eclipse.emf.edit.provider.ComposedAdapterFactory"); >-importManager.addImport("org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory"); >-importManager.addImport("org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory"); >-importManager.addImport("org.eclipse.gef.ContextMenuProvider"); >-importManager.addImport("org.eclipse.gef.EditPartViewer"); >-importManager.addImport("org.eclipse.gef.GraphicalViewer"); >-importManager.addImport("org.eclipse.gef.KeyHandler"); >-importManager.addImport("org.eclipse.gef.KeyStroke"); >-importManager.addImport("org.eclipse.gef.RootEditPart"); >-importManager.addImport("org.eclipse.gef.MouseWheelHandler"); >-importManager.addImport("org.eclipse.gef.MouseWheelZoomHandler"); >-importManager.addImport("org.eclipse.gef.commands.CommandStack"); >-importManager.addImport("org.eclipse.gef.commands.CommandStackListener"); >-importManager.addImport("org.eclipse.gef.editparts.ScalableFreeformRootEditPart"); >-importManager.addImport("org.eclipse.gef.editparts.ScalableRootEditPart"); >-importManager.addImport("org.eclipse.gef.editparts.ZoomManager"); >-importManager.addImport("org.eclipse.gef.palette.PaletteRoot"); >-importManager.addImport("org.eclipse.gef.ui.actions.AlignmentAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.DeleteAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.DirectEditAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.GEFActionConstants"); >-importManager.addImport("org.eclipse.gef.ui.actions.PrintAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.RedoAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.SaveAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.SelectionAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.StackAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.UndoAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.UpdateAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.WorkbenchPartAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.ZoomInAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.ZoomOutAction"); >-importManager.addImport("org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler"); >-importManager.addImport("org.eclipse.gmf.runtime.notation.Diagram"); >-importManager.addImport("org.eclipse.gmf.runtime.notation.NotationFactory"); >-importManager.addImport("org.eclipse.gmf.runtime.notation.provider.NotationItemProviderAdapterFactory"); >-importManager.addImport("org.eclipse.jface.action.IAction"); >-importManager.addImport("org.eclipse.jface.action.IMenuManager"); >-importManager.addImport("org.eclipse.jface.action.MenuManager"); >-importManager.addImport("org.eclipse.jface.action.Separator"); >-importManager.addImport("org.eclipse.jface.dialogs.ErrorDialog"); >-importManager.addImport("org.eclipse.jface.viewers.ISelection"); >-importManager.addImport("org.eclipse.swt.SWT"); >-importManager.addImport("org.eclipse.swt.widgets.Composite"); >-importManager.addImport("org.eclipse.ui.IEditorPart"); >-importManager.addImport("org.eclipse.ui.IEditorInput"); >-importManager.addImport("org.eclipse.ui.IEditorSite"); >-importManager.addImport("org.eclipse.ui.ISelectionListener"); >-importManager.addImport("org.eclipse.ui.IWorkbenchPart"); >-importManager.addImport("org.eclipse.ui.PartInitException"); >-importManager.addImport("org.eclipse.ui.actions.ActionFactory"); >-importManager.addImport("org.eclipse.ui.views.contentoutline.IContentOutlinePage"); >-importManager.addImport("org.eclipse.ui.views.properties.IPropertySheetPage"); >-importManager.addImport("org.eclipse.ui.views.properties.PropertySheetPage"); >-importManager.addImport("org.eclipse.emf.common.notify.AdapterFactory"); >-importManager.addImport("org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette"); >-importManager.addImport("org.eclipse.gef.DefaultEditDomain"); >- > stringBuffer.append(TEXT_2); > stringBuffer.append(genEditor.getClassName()); > stringBuffer.append(TEXT_3); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.parts.DiagramEditor")); >+ stringBuffer.append(TEXT_4); > > if (!isRichClientPlatform) { > >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceChangeListener")); > stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceChangeEvent")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceChangeListener")); > stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceDelta")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceChangeEvent")); > stringBuffer.append(TEXT_7); > stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceDelta")); > stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_9); > stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceDelta")); >- stringBuffer.append(TEXT_10); >+ stringBuffer.append(TEXT_9); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_11); >+ stringBuffer.append(TEXT_10); > stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceDelta")); >+ stringBuffer.append(TEXT_11); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); > stringBuffer.append(TEXT_12); > stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceDelta")); > stringBuffer.append(TEXT_13); >- /*XXX: make sure unsaved deleted file is handled correctly*/ >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IResourceDelta")); > stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); >+ /*XXX: make sure unsaved deleted file is handled correctly*/ > stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.ResourcesPlugin")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); > stringBuffer.append(TEXT_16); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Display")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.ResourcesPlugin")); > stringBuffer.append(TEXT_17); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.part.FileEditorInput")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Display")); > stringBuffer.append(TEXT_18); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.part.FileEditorInput")); >+ stringBuffer.append(TEXT_19); > > } > >- stringBuffer.append(TEXT_19); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.PropertySheetEntry")); > stringBuffer.append(TEXT_20); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); > stringBuffer.append(TEXT_21); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); > stringBuffer.append(TEXT_22); >- stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.ComposedAdapterFactory")); > stringBuffer.append(TEXT_23); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.UndoAction")); > stringBuffer.append(TEXT_24); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.RedoAction")); > stringBuffer.append(TEXT_25); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.DeleteAction")); > stringBuffer.append(TEXT_26); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_27); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.DirectEditAction")); > stringBuffer.append(TEXT_28); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_29); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")); > stringBuffer.append(TEXT_30); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_31); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); > stringBuffer.append(TEXT_32); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")); > stringBuffer.append(TEXT_33); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_34); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); > stringBuffer.append(TEXT_35); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")); > stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_37); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); > stringBuffer.append(TEXT_38); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")); > stringBuffer.append(TEXT_39); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_40); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); > stringBuffer.append(TEXT_41); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")); > stringBuffer.append(TEXT_42); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CommandStackListener")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_43); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CommandStack")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); > stringBuffer.append(TEXT_44); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CommandStack")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")); > stringBuffer.append(TEXT_45); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.PropertySheetEntry")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")); > stringBuffer.append(TEXT_46); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CommandStack")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); > stringBuffer.append(TEXT_47); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.SaveAction")); > stringBuffer.append(TEXT_48); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.PrintAction")); > stringBuffer.append(TEXT_49); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.IAction")); > stringBuffer.append(TEXT_50); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CommandStack")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.ZoomInAction")); > stringBuffer.append(TEXT_51); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CommandStackListener")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.IAction")); > stringBuffer.append(TEXT_52); >- stringBuffer.append(importManager.getImportedName("java.util.EventObject")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.ZoomOutAction")); > stringBuffer.append(TEXT_53); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.PropertySheetEntry")); >- stringBuffer.append(TEXT_54); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.ForwardUndoCompoundCommand")); >- stringBuffer.append(TEXT_55); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")); >- stringBuffer.append(TEXT_56); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")); >- stringBuffer.append(TEXT_57); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")); >- stringBuffer.append(TEXT_58); >- stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_59); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >- stringBuffer.append(TEXT_60); > > if (!isRichClientPlatform) { > >- stringBuffer.append(TEXT_61); >+ stringBuffer.append(TEXT_54); > stringBuffer.append(genEditor.getClassName()); >- stringBuffer.append(TEXT_62); >+ stringBuffer.append(TEXT_55); > > } > >- stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_56); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IProgressMonitor")); >+ stringBuffer.append(TEXT_57); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.CoreException")); >+ stringBuffer.append(TEXT_58); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.dialogs.ErrorDialog")); >+ stringBuffer.append(TEXT_59); > stringBuffer.append(genDiagram.getEditorGen().getDomainGenModel().getModelName()); >- stringBuffer.append(TEXT_64); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_65); >+ stringBuffer.append(TEXT_60); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.palette.PaletteRoot")); >+ stringBuffer.append(TEXT_61); > > { > final Palette palette = genDiagram.getPalette(); > if (palette != null) { > >- stringBuffer.append(TEXT_66); >+ stringBuffer.append(TEXT_62); > stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_67); >+ stringBuffer.append(TEXT_63); > > } > } > >+ stringBuffer.append(TEXT_64); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); >+ stringBuffer.append(TEXT_65); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >+ stringBuffer.append(TEXT_66); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IEditorSite")); >+ stringBuffer.append(TEXT_67); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IEditorInput")); > stringBuffer.append(TEXT_68); >- stringBuffer.append(importManager.getImportedName(genDiagram.getPropertyProviderQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.PartInitException")); > stringBuffer.append(TEXT_69); >- stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); > stringBuffer.append(TEXT_70); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.PartInitException")); >+ stringBuffer.append(TEXT_71); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.PartInitException")); >+ stringBuffer.append(TEXT_72); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IEditorInput")); >+ stringBuffer.append(TEXT_73); > > if (!isRichClientPlatform) { > >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_74); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_72); >+ stringBuffer.append(TEXT_75); > stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_76); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_74); >+ stringBuffer.append(TEXT_77); > > } > >- stringBuffer.append(TEXT_75); >+ stringBuffer.append(TEXT_78); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); >+ stringBuffer.append(TEXT_79); > > if (!isRichClientPlatform) { > >- stringBuffer.append(TEXT_76); >+ stringBuffer.append(TEXT_80); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_77); >+ stringBuffer.append(TEXT_81); > stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); >- stringBuffer.append(TEXT_78); >+ stringBuffer.append(TEXT_82); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_79); >+ stringBuffer.append(TEXT_83); > > } > >- stringBuffer.append(TEXT_80); >+ stringBuffer.append(TEXT_84); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); >+ stringBuffer.append(TEXT_85); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IEditorInput")); >+ stringBuffer.append(TEXT_86); > if (isRichClientPlatform) { >- stringBuffer.append(TEXT_81); >+ stringBuffer.append(TEXT_87); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.ui.URIEditorInput")); >- stringBuffer.append(TEXT_82); >+ stringBuffer.append(TEXT_88); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.ui.URIEditorInput")); >- stringBuffer.append(TEXT_83); >+ stringBuffer.append(TEXT_89); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IPathEditorInput")); >- stringBuffer.append(TEXT_84); >+ stringBuffer.append(TEXT_90); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); >+ stringBuffer.append(TEXT_91); > } else { >- stringBuffer.append(TEXT_85); >+ stringBuffer.append(TEXT_92); > stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IFileEditorInput")); >- stringBuffer.append(TEXT_86); >+ stringBuffer.append(TEXT_93); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); >+ stringBuffer.append(TEXT_94); > } >- stringBuffer.append(TEXT_87); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.workspace.WorkspaceEditingDomainFactory")); >- stringBuffer.append(TEXT_88); >+ stringBuffer.append(TEXT_95); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.AdapterFactory")); >+ stringBuffer.append(TEXT_96); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(TEXT_97); >+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList")); >+ stringBuffer.append(TEXT_98); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory")); >+ stringBuffer.append(TEXT_99); > > final EList genPackages = genDiagram.getEditorGen().getAllDomainGenPackages(true); > for (int i = 0; i < genPackages.size(); i++) { > GenPackage genPackage = (GenPackage) genPackages.get(i); > >- stringBuffer.append(TEXT_89); >+ stringBuffer.append(TEXT_100); > stringBuffer.append(importManager.getImportedName(genPackage.getQualifiedItemProviderAdapterFactoryClassName())); >- stringBuffer.append(TEXT_90); >+ stringBuffer.append(TEXT_101); > } >- stringBuffer.append(TEXT_91); >+ stringBuffer.append(TEXT_102); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory")); >+ stringBuffer.append(TEXT_103); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.provider.NotationItemProviderAdapterFactory")); >+ stringBuffer.append(TEXT_104); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.ComposedAdapterFactory")); >+ stringBuffer.append(TEXT_105); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); >+ stringBuffer.append(TEXT_106); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_107); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.ResourceSet")); >+ stringBuffer.append(TEXT_108); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")); >+ stringBuffer.append(TEXT_109); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >+ stringBuffer.append(TEXT_110); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >+ stringBuffer.append(TEXT_111); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >+ stringBuffer.append(TEXT_112); >+ stringBuffer.append(importManager.getImportedName("java.util.Collections")); >+ stringBuffer.append(TEXT_113); >+ stringBuffer.append(importManager.getImportedName("java.io.IOException")); >+ stringBuffer.append(TEXT_114); > stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_92); >+ stringBuffer.append(TEXT_115); > > { > >@@ -452,68 +501,188 @@ > String resourceToUse; > if (!sameFile) { > >- stringBuffer.append(TEXT_93); >+ stringBuffer.append(TEXT_116); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); >+ stringBuffer.append(TEXT_117); > stringBuffer.append(genDiagram.getDiagramEditorUtilClassName()); >- stringBuffer.append(TEXT_94); >+ stringBuffer.append(TEXT_118); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")); >+ stringBuffer.append(TEXT_119); > > resourceToUse = "modelResource"; > } else { > resourceToUse = "diagramResource"; > } > >- stringBuffer.append(TEXT_95); >+ stringBuffer.append(TEXT_120); > stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_96); >+ stringBuffer.append(TEXT_121); > stringBuffer.append(resourceToUse); >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_122); > stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_98); >+ stringBuffer.append(TEXT_123); > stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getGenPackage().getQualifiedFactoryClassName())); >- stringBuffer.append(TEXT_99); >+ stringBuffer.append(TEXT_124); > stringBuffer.append(genDiagram.getDomainDiagramElement().getClassifierAccessorName()); >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_125); > stringBuffer.append(resourceToUse); >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_126); > stringBuffer.append(resourceToUse); >- stringBuffer.append(TEXT_102); >+ stringBuffer.append(TEXT_127); >+ stringBuffer.append(importManager.getImportedName("java.util.Collections")); >+ stringBuffer.append(TEXT_128); >+ stringBuffer.append(importManager.getImportedName("java.io.IOException")); >+ stringBuffer.append(TEXT_129); > if (genDiagram.getDomainDiagramElement().isExternalInterface()) { >- stringBuffer.append(TEXT_103); >+ stringBuffer.append(TEXT_130); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_104); >+ stringBuffer.append(TEXT_131); > } >- stringBuffer.append(TEXT_105); >+ stringBuffer.append(TEXT_132); > > } > >- stringBuffer.append(TEXT_106); >+ stringBuffer.append(TEXT_133); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")); >+ stringBuffer.append(TEXT_134); >+ stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >+ stringBuffer.append(TEXT_135); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); >+ stringBuffer.append(TEXT_136); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); >+ stringBuffer.append(TEXT_137); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); >+ stringBuffer.append(TEXT_138); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_107); >+ stringBuffer.append(TEXT_139); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LayeredPane")); >- stringBuffer.append(TEXT_108); >+ stringBuffer.append(TEXT_140); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LayeredPane")); >- stringBuffer.append(TEXT_109); >+ stringBuffer.append(TEXT_141); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.LayerConstants")); >- stringBuffer.append(TEXT_110); >+ stringBuffer.append(TEXT_142); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayer")); >- stringBuffer.append(TEXT_111); >+ stringBuffer.append(TEXT_143); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayer")); >- stringBuffer.append(TEXT_112); >+ stringBuffer.append(TEXT_144); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.DelegatingLayout")); >- stringBuffer.append(TEXT_113); >+ stringBuffer.append(TEXT_145); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_114); >+ stringBuffer.append(TEXT_146); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.LayerConstants")); >- stringBuffer.append(TEXT_115); >+ stringBuffer.append(TEXT_147); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalViewer")); >+ stringBuffer.append(TEXT_148); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ContextMenuProvider")); >+ stringBuffer.append(TEXT_149); > stringBuffer.append(genEditor.getClassName()); >- stringBuffer.append(TEXT_116); >+ stringBuffer.append(TEXT_150); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_117); >+ stringBuffer.append(TEXT_151); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.KeyHandler")); >+ stringBuffer.append(TEXT_152); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler")); >+ stringBuffer.append(TEXT_153); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.KeyStroke")); >+ stringBuffer.append(TEXT_154); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(TEXT_155); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_156); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.KeyStroke")); >+ stringBuffer.append(TEXT_157); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(TEXT_158); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_159); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.MouseWheelHandler")); >+ stringBuffer.append(TEXT_160); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(TEXT_161); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.MouseWheelZoomHandler")); >+ stringBuffer.append(TEXT_162); > stringBuffer.append(genEditor.getClassName()); >- stringBuffer.append(TEXT_118); >+ stringBuffer.append(TEXT_163); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ContextMenuProvider")); >+ stringBuffer.append(TEXT_164); > stringBuffer.append(genEditor.getClassName()); >- stringBuffer.append(TEXT_119); >+ stringBuffer.append(TEXT_165); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPartViewer")); >+ stringBuffer.append(TEXT_166); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.IMenuManager")); >+ stringBuffer.append(TEXT_167); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_168); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_169); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_170); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_171); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_172); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_173); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_174); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_175); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_176); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_177); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_178); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_179); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_180); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")); >+ stringBuffer.append(TEXT_181); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_182); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.IMenuManager")); >+ stringBuffer.append(TEXT_183); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.MenuManager")); >+ stringBuffer.append(TEXT_184); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.MenuManager")); >+ stringBuffer.append(TEXT_185); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.Separator")); >+ stringBuffer.append(TEXT_186); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_187); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_188); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_189); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_190); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_191); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_192); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_193); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_194); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_195); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_196); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_197); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_198); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_199); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")); >+ stringBuffer.append(TEXT_200); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.IMenuManager")); >+ stringBuffer.append(TEXT_201); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.action.IAction")); >+ stringBuffer.append(TEXT_202); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_120); >+ stringBuffer.append(TEXT_203); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/providers/PropertySourceProviderGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/providers/PropertySourceProviderGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/providers/PropertySourceProviderGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/providers/PropertySourceProviderGenerator.java 4 Jul 2006 15:44:10 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,124 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.providers; >- >-import org.eclipse.gmf.codegen.gmfgen.*; >-import org.eclipse.gmf.common.codegen.*; >- >-public class PropertySourceProviderGenerator >-{ >- protected static String nl; >- public static synchronized PropertySourceProviderGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- PropertySourceProviderGenerator result = new PropertySourceProviderGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL + "/*" + NL + " * "; >- protected final String TEXT_3 = NL + " */"; >- protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; >- protected final String TEXT_5 = " implements "; >- protected final String TEXT_6 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_7 = " adapterFactoryContentProvider;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_8 = "("; >- protected final String TEXT_9 = " domainAdapterFactory) {" + NL + "\t\tadapterFactoryContentProvider = new "; >- protected final String TEXT_10 = "(domainAdapterFactory);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_11 = " getPropertySource(Object object) {" + NL + "\t\tif (object instanceof "; >- protected final String TEXT_12 = ") {" + NL + "\t\t\treturn ("; >- protected final String TEXT_13 = ") object;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_14 = " view = getNotationElement(object);" + NL + "\t\tif (view == null) {" + NL + "\t\t\treturn adapterFactoryContentProvider.getPropertySource(object);" + NL + "\t\t}" + NL + "\t\t//XXX: compose with view properties" + NL + "\t\t"; >- protected final String TEXT_15 = " domainElement = view.getElement();" + NL + "\t\tif (domainElement == null && view instanceof "; >- protected final String TEXT_16 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_17 = " edge = ("; >- protected final String TEXT_18 = ") view;" + NL + "\t\t\tdomainElement = edge.getTarget().getElement();" + NL + "\t\t}" + NL + "\t\treturn adapterFactoryContentProvider.getPropertySource(domainElement);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_19 = " getNotationElement(Object object) {" + NL + "\t\t"; >- protected final String TEXT_20 = " view = null;" + NL + "\t\tif (object instanceof "; >- protected final String TEXT_21 = ") {" + NL + "\t\t\tview = ("; >- protected final String TEXT_22 = ") object;" + NL + "\t\t} else if (object instanceof "; >- protected final String TEXT_23 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_24 = " editPart = ("; >- protected final String TEXT_25 = ") object;" + NL + "\t\t\tif (editPart.getModel() instanceof "; >- protected final String TEXT_26 = ") {" + NL + "\t\t\t\tview = ("; >- protected final String TEXT_27 = ") editPart.getModel();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tif (view != null && \""; >- protected final String TEXT_28 = "\".equals("; >- protected final String TEXT_29 = ".getModelID(view))) {" + NL + "\t\t\treturn view;" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "}"; >- protected final String TEXT_30 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- >-GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >-final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_1); >- >-String copyrightText = genDiagram.getEditorGen().getCopyrightText(); >-if (copyrightText != null && copyrightText.trim().length() > 0) { >- >- stringBuffer.append(TEXT_2); >- stringBuffer.append(copyrightText.replaceAll("\n", "\n * ")); >- stringBuffer.append(TEXT_3); >- } >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_4); >- stringBuffer.append(genDiagram.getPropertyProviderClassName()); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySourceProvider")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(genDiagram.getPropertyProviderClassName()); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.AdapterFactory")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >- stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >- stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")); >- stringBuffer.append(TEXT_13); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_16); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_17); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_18); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_19); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_20); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_21); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_22); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_23); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_24); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_25); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_26); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_27); >- stringBuffer.append(genDiagram.getEditorGen().getModelID()); >- stringBuffer.append(TEXT_28); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_29); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_30); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/providers/AbstractParserGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/providers/AbstractParserGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/providers/AbstractParserGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/providers/AbstractParserGenerator.java 13 Apr 2006 21:20:15 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,67 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.providers; >- >-import org.eclipse.gmf.codegen.gmfgen.*; >-import org.eclipse.gmf.common.codegen.*; >- >-public class AbstractParserGenerator >-{ >- protected static String nl; >- public static synchronized AbstractParserGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- AbstractParserGenerator result = new AbstractParserGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL + "/*" + NL + " * "; >- protected final String TEXT_3 = NL + " */"; >- protected final String TEXT_4 = NL; >- protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public abstract class "; >- protected final String TEXT_6 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static Object parseValue("; >- protected final String TEXT_7 = " feature, Object value) throws IllegalArgumentException {" + NL + "\t\tif (value == null) {" + NL + "\t\t\tthrow new IllegalArgumentException();" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_8 = " type = feature.getEAttributeType();" + NL + "\t\tClass iClass = type.getInstanceClass();" + NL + "\t\tif (Boolean.TYPE.equals(iClass) || Boolean.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Boolean) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tvalue = Boolean.valueOf((String) value);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Boolean is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Character.TYPE.equals(iClass) || Character.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Character) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tthrow new IllegalArgumentException();\t//XXX: ?" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\tvalue = new Character(s.charAt(0));" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Character is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Byte.TYPE.equals(iClass) || Byte.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Byte) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof Number) {" + NL + "\t\t\t\tvalue = new Byte(((Number) value).byteValue());" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tvalue = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tvalue = Byte.valueOf(s);" + NL + "\t\t\t\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t\t\t\tthrow new IllegalArgumentException(\"String value does not convert to Byte value\");" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Byte is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Short.TYPE.equals(iClass) || Short.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Short) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof Number) {" + NL + "\t\t\t\tvalue = new Short(((Number) value).shortValue());" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tvalue = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tvalue = Short.valueOf(s);" + NL + "\t\t\t\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t\t\t\tthrow new IllegalArgumentException(\"String value does not convert to Short value\");" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Short is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Integer.TYPE.equals(iClass) || Integer.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Integer) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof Number) {" + NL + "\t\t\t\tvalue = new Integer(((Number) value).intValue());" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tvalue = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tvalue = Integer.valueOf(s);" + NL + "\t\t\t\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t\t\t\tthrow new IllegalArgumentException(\"String value does not convert to Integer value\");" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Integer is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Long.TYPE.equals(iClass) || Long.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Long) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof Number) {" + NL + "\t\t\t\tvalue = new Long(((Number) value).longValue());" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tvalue = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tvalue = Long.valueOf(s);" + NL + "\t\t\t\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t\t\t\tthrow new IllegalArgumentException(\"String value does not convert to Long value\");" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Long is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Float.TYPE.equals(iClass) || Float.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Float) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof Number) {" + NL + "\t\t\t\tvalue = new Float(((Number) value).floatValue());" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tvalue = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tvalue = Float.valueOf(s);" + NL + "\t\t\t\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t\t\t\tthrow new IllegalArgumentException(\"String value does not convert to Float value\");" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Float is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (Double.TYPE.equals(iClass) || Double.class.equals(iClass)) {" + NL + "\t\t\tif (value instanceof Double) {" + NL + "\t\t\t\t// ok" + NL + "\t\t\t} else if (value instanceof Number) {" + NL + "\t\t\t\tvalue = new Double(((Number) value).doubleValue());" + NL + "\t\t\t} else if (value instanceof String) {" + NL + "\t\t\t\tString s = (String) value;" + NL + "\t\t\t\tif (s.length() == 0) {" + NL + "\t\t\t\t\tvalue = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tvalue = Double.valueOf(s);" + NL + "\t\t\t\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t\t\t\tthrow new IllegalArgumentException(\"String value does not convert to Double value\");" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type Double is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else if (String.class.equals(iClass)) {" + NL + "\t\t\tvalue = String.valueOf(value);" + NL + "\t\t} else if (type instanceof "; >- protected final String TEXT_9 = ") {" + NL + "\t\t\tif (value instanceof String) {" + NL + "\t\t\t\t"; >- protected final String TEXT_10 = " literal = (("; >- protected final String TEXT_11 = ") type).getEEnumLiteralByLiteral((String) value);" + NL + "\t\t\t\tif (literal == null) {" + NL + "\t\t\t\t\tthrow new IllegalArgumentException(\"Unknown literal: \" + value);" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\tvalue = literal.getInstance();" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"Value of type String is expected\");" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tthrow new IllegalArgumentException(\"Unsupported type\");" + NL + "\t\t}" + NL + "\t\treturn value;" + NL + "\t}" + NL + "}"; >- protected final String TEXT_12 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >- ImportAssistant importManager = (ImportAssistant) ((Object[])argument)[1]; >- stringBuffer.append(TEXT_1); >- >-String copyrightText = genDiagram.getEditorGen().getCopyrightText(); >-if (copyrightText != null && copyrightText.trim().length() > 0) { >- >- stringBuffer.append(TEXT_2); >- stringBuffer.append(copyrightText.replaceAll("\n", "\n * ")); >- stringBuffer.append(TEXT_3); >- } >- stringBuffer.append(TEXT_4); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_5); >- stringBuffer.append(genDiagram.getAbstractParserClassName()); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EDataType")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EEnum")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EEnumLiteral")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EEnum")); >- stringBuffer.append(TEXT_11); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_12); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java,v >retrieving revision 1.19 >diff -u -r1.19 NodeEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java 9 Aug 2006 14:34:54 -0000 1.19 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java 30 Aug 2006 15:22:23 -0000 >@@ -43,1142 +43,1085 @@ > protected final String TEXT_22 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; > protected final String TEXT_23 = " extends "; > protected final String TEXT_24 = " implements "; >- protected final String TEXT_25 = ", IUpdatableEditPart {"; >- protected final String TEXT_26 = NL; >- protected final String TEXT_27 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >- protected final String TEXT_28 = ";"; >- protected final String TEXT_29 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_30 = " contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_31 = " primaryShape;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_32 = "("; >- protected final String TEXT_33 = " model) {" + NL + "\t\tassert model instanceof "; >- protected final String TEXT_34 = ";" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL; >- protected final String TEXT_35 = NL; >- protected final String TEXT_36 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >- protected final String TEXT_37 = " view = ("; >- protected final String TEXT_38 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >- protected final String TEXT_39 = " view = ("; >- protected final String TEXT_40 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {"; >- protected final String TEXT_41 = NL; >- protected final String TEXT_42 = "\t\tinstallEditPolicy("; >- protected final String TEXT_43 = ".COMPONENT_ROLE, new "; >- protected final String TEXT_44 = "() {" + NL + "\t\t\tprotected "; >- protected final String TEXT_45 = " createDeleteCommand("; >- protected final String TEXT_46 = " deleteRequest) {" + NL + "\t\t\t\t"; >- protected final String TEXT_47 = " editingDomain = "; >- protected final String TEXT_48 = ".getEditingDomain(getDiagramNode().getDiagram().getElement());" + NL + "\t\t\t\t"; >- protected final String TEXT_49 = " cc = new "; >- protected final String TEXT_50 = "();" + NL + "\t\t\t\tcc.append(getDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append("; >- protected final String TEXT_51 = ".create(editingDomain, getDiagramNode()));" + NL + "\t\t\t\treturn new WrappingCommand(editingDomain, cc);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tprivate org.eclipse.emf.common.command.Command getDomainModelRemoveCommand("; >- protected final String TEXT_52 = " editingDomain) {"; >- protected final String TEXT_53 = NL + "\t\t\t\t"; >- protected final String TEXT_54 = " result = new "; >- protected final String TEXT_55 = "();"; >- protected final String TEXT_56 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_57 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_58 = ".eINSTANCE.get"; >- protected final String TEXT_59 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >- protected final String TEXT_60 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_61 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_62 = ".eINSTANCE.get"; >- protected final String TEXT_63 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_64 = ".UNSET_VALUE));"; >- protected final String TEXT_65 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_66 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_67 = ".eINSTANCE.get"; >- protected final String TEXT_68 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >- protected final String TEXT_69 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_70 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_71 = ".eINSTANCE.get"; >- protected final String TEXT_72 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_73 = ".UNSET_VALUE));"; >- protected final String TEXT_74 = NL + "\t\t\t\treturn result;"; >- protected final String TEXT_75 = NL + "\t\t\t\treturn "; >- protected final String TEXT_76 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_77 = ".eINSTANCE.get"; >- protected final String TEXT_78 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement());"; >- protected final String TEXT_79 = NL + "\t\t\t\treturn "; >- protected final String TEXT_80 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_81 = ".eINSTANCE.get"; >- protected final String TEXT_82 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_83 = ".UNSET_VALUE);"; >- protected final String TEXT_84 = NL + "\t\t\t}" + NL + "\t\t});"; >- protected final String TEXT_85 = NL + "\t\tinstallEditPolicy("; >- protected final String TEXT_86 = ".LAYOUT_ROLE, new "; >- protected final String TEXT_87 = "() {" + NL + "\t\t\tprotected "; >- protected final String TEXT_88 = " getCreateCommand("; >- protected final String TEXT_89 = " request) {" + NL + "\t\t\t\treturn "; >- protected final String TEXT_90 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor("; >- protected final String TEXT_91 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor("; >- protected final String TEXT_92 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected "; >- protected final String TEXT_93 = " createChangeConstraintCommand("; >- protected final String TEXT_94 = " child, Object constraint) {" + NL + "\t\t\t\treturn "; >- protected final String TEXT_95 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected "; >- protected final String TEXT_96 = " createChildEditPolicy("; >- protected final String TEXT_97 = " child) {" + NL + "\t\t\t\treturn new "; >- protected final String TEXT_98 = "() {" + NL + "\t\t\t\t\tpublic "; >- protected final String TEXT_99 = " getTargetEditPart("; >- protected final String TEXT_100 = " request) {" + NL + "\t\t\t\t\t\tif ("; >- protected final String TEXT_101 = ".REQ_SELECTION.equals(request.getType())) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_102 = ".this;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getTargetEditPart(request);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallEditPolicy("; >- protected final String TEXT_103 = ".GRAPHICAL_NODE_ROLE, new "; >- protected final String TEXT_104 = "() {" + NL + "\t\t\tprotected "; >- protected final String TEXT_105 = " getReconnectTargetCommand("; >- protected final String TEXT_106 = " request) {"; >- protected final String TEXT_107 = " " + NL + "\t\t\t\treturn "; >- protected final String TEXT_108 = ".INSTANCE;"; >- protected final String TEXT_109 = NL + "\t\t\t\t"; >- protected final String TEXT_110 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof "; >- protected final String TEXT_111 = " == false) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_112 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >- protected final String TEXT_113 = " edge = ("; >- protected final String TEXT_114 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = "; >- protected final String TEXT_115 = ".getModelID(edge);" + NL + "\t\t\t\tif (!"; >- protected final String TEXT_116 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_117 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >- protected final String TEXT_118 = " result = null;" + NL + "\t\t\t\tint visualID = "; >- protected final String TEXT_119 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {"; >- protected final String TEXT_120 = NL + "\t\t\t\tcase "; >- protected final String TEXT_121 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect"; >- protected final String TEXT_122 = "TargetCommand(request);" + NL + "\t\t\t\t\tbreak;"; >- protected final String TEXT_123 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_124 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_125 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);"; >- protected final String TEXT_126 = NL + "\t\t\t}" + NL + "\t\t\tprotected "; >- protected final String TEXT_127 = " getReconnectSourceCommand("; >- protected final String TEXT_128 = " request) {"; >- protected final String TEXT_129 = " " + NL + "\t\t\t\treturn "; >- protected final String TEXT_130 = ".INSTANCE;"; >- protected final String TEXT_131 = NL + "\t\t\t\t"; >- protected final String TEXT_132 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof "; >- protected final String TEXT_133 = " == false) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_134 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >- protected final String TEXT_135 = " edge = ("; >- protected final String TEXT_136 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = "; >- protected final String TEXT_137 = ".getModelID(edge);" + NL + "\t\t\t\tif (!"; >- protected final String TEXT_138 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_139 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >- protected final String TEXT_140 = " result = null;" + NL + "\t\t\t\tint visualID = "; >- protected final String TEXT_141 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {"; >- protected final String TEXT_142 = NL + "\t\t\t\tcase "; >- protected final String TEXT_143 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect"; >- protected final String TEXT_144 = "SourceCommand(request);" + NL + "\t\t\t\t\tbreak;"; >- protected final String TEXT_145 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_146 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_147 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);"; >- protected final String TEXT_148 = NL + "\t\t\t}" + NL + "\t\t\tprotected "; >- protected final String TEXT_149 = " getConnectionCreateCommand("; >- protected final String TEXT_150 = " request) {"; >- protected final String TEXT_151 = NL + "\t\t\t\tif (request instanceof "; >- protected final String TEXT_152 = ".CreateConnectionRequestEx) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_153 = ".CreateConnectionRequestEx requestEx = ("; >- protected final String TEXT_154 = ".CreateConnectionRequestEx) request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >- protected final String TEXT_155 = " result = new "; >- protected final String TEXT_156 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >- protected final String TEXT_157 = NL + "\t\t\t\t\t\tcase "; >- protected final String TEXT_158 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >- protected final String TEXT_159 = "StartCommand(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;"; >- protected final String TEXT_160 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1 || !result.canExecute()) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\t//returning an unexecutable command does not change cursor to \"No\"." + NL + "\t\t\t\t\t\treturn null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_161 = " wrappedResult = new WrappingCommand("; >- protected final String TEXT_162 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t\trequest.setStartCommand(wrappedResult);" + NL + "\t\t\t\t\treturn wrappedResult;" + NL + "\t\t\t\t}"; >- protected final String TEXT_163 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected "; >- protected final String TEXT_164 = " getConnectionCompleteCommand("; >- protected final String TEXT_165 = " request) {"; >- protected final String TEXT_166 = NL + "\t\t\t\tif (request.getStartCommand() == null || !request.getStartCommand().canExecute()) {" + NL + "\t\t\t\t\treturn "; >- protected final String TEXT_167 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tif (request instanceof "; >- protected final String TEXT_168 = ".CreateConnectionRequestEx) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_169 = ".CreateConnectionRequestEx requestEx = ("; >- protected final String TEXT_170 = ".CreateConnectionRequestEx) request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >- protected final String TEXT_171 = " result = new "; >- protected final String TEXT_172 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >- protected final String TEXT_173 = NL + "\t\t\t\t\t\tcase "; >- protected final String TEXT_174 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >- protected final String TEXT_175 = "Command(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;"; >- protected final String TEXT_176 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\treturn "; >- protected final String TEXT_177 = ".INSTANCE;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_178 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t}"; >- protected final String TEXT_179 = NL + "\t\t\t\treturn "; >- protected final String TEXT_180 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});"; >- protected final String TEXT_181 = NL + "\t\tinstallLinkNotationModelRefresher();"; >- protected final String TEXT_182 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_183 = " createFigure() {" + NL + "\t\t"; >- protected final String TEXT_184 = " invisibleRectangle = new "; >- protected final String TEXT_185 = "();" + NL + "\t\tinvisibleRectangle.setLayoutManager(new "; >- protected final String TEXT_186 = "());" + NL + "\t\t"; >- protected final String TEXT_187 = " shape = createNodeShape();" + NL + "\t\tinvisibleRectangle.add(shape);" + NL + "\t\tcontentPane = setupContentPane(shape);" + NL + "\t\t" + NL + "\t\t"; >- protected final String TEXT_188 = " decorationShape = createDecorationPane();" + NL + "\t\tif (decorationShape != null) {" + NL + "\t\t\tinvisibleRectangle.add(decorationShape);" + NL + "\t\t}" + NL + "" + NL + "\t\treturn invisibleRectangle;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_189 = " createNodeShape() {"; >- protected final String TEXT_190 = NL + "\t\tprimaryShape = new "; >- protected final String TEXT_191 = "()"; >- protected final String TEXT_192 = " {" + NL + "\t\t\tprotected boolean useLocalCoordinates() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}"; >- protected final String TEXT_193 = ";"; >- protected final String TEXT_194 = NL + "\t\tprimaryShape = "; >- protected final String TEXT_195 = ";"; >- protected final String TEXT_196 = NL + "\t\t"; >- protected final String TEXT_197 = " figure = new "; >- protected final String TEXT_198 = "();"; >- protected final String TEXT_199 = NL + " \t\tfigure.setUseLocalCoordinates(true);"; >- protected final String TEXT_200 = NL + " \t\tprimaryShape = figure;"; >- protected final String TEXT_201 = NL + "\t\treturn primaryShape;" + NL + "\t}"; >- protected final String TEXT_202 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_203 = " getPrimaryShape() {" + NL + "\t\treturn ("; >- protected final String TEXT_204 = ") primaryShape;" + NL + "\t}"; >- protected final String TEXT_205 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_206 = " createDecorationPane() {" + NL + "\t\t"; >- protected final String TEXT_207 = " view = ("; >- protected final String TEXT_208 = ") getModel();" + NL + "\t\t"; >- protected final String TEXT_209 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t"; >- protected final String TEXT_210 = " decorationPane = new "; >- protected final String TEXT_211 = "();" + NL + "\t\tdecorationPane.setLayoutManager(new "; >- protected final String TEXT_212 = "());" + NL + "" + NL + "\t\t"; >- protected final String TEXT_213 = " imageFigure = new "; >- protected final String TEXT_214 = "("; >- protected final String TEXT_215 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"), "; >- protected final String TEXT_216 = ".EAST);" + NL + "\t\tdecorationPane.add(imageFigure, "; >- protected final String TEXT_217 = ".BOTTOM);" + NL + " \t\treturn decorationPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_218 = " setupContentPane("; >- protected final String TEXT_219 = " nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {"; >- protected final String TEXT_220 = NL + "\t\t\t"; >- protected final String TEXT_221 = " layout = new "; >- protected final String TEXT_222 = "();" + NL + "\t\t\tlayout.setSpacing(5);" + NL + "\t\t\tnodeShape.setLayoutManager(layout);"; >- protected final String TEXT_223 = NL + "\t\tnodeShape.setLayoutManager(new "; >- protected final String TEXT_224 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint("; >- protected final String TEXT_225 = " figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new "; >- protected final String TEXT_226 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});"; >- protected final String TEXT_227 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_228 = " getContentPane() {" + NL + "\t\tif (contentPane == null) {" + NL + "\t\t\treturn super.getContentPane();" + NL + "\t\t}" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_229 = " getDiagramNode() {" + NL + "\t\treturn ("; >- protected final String TEXT_230 = ") getModel();" + NL + "\t}" + NL; >- protected final String TEXT_231 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild("; >- protected final String TEXT_232 = " childEditPart) {"; >- protected final String TEXT_233 = NL + "\t\tif (childEditPart instanceof "; >- protected final String TEXT_234 = ") {" + NL + "\t\t\t(("; >- protected final String TEXT_235 = ") childEditPart)."; >- protected final String TEXT_236 = "(getPrimaryShape()."; >- protected final String TEXT_237 = "());" + NL + "\t\t\treturn true;" + NL + "\t\t}"; >- protected final String TEXT_238 = NL + "\t\tif (childEditPart instanceof "; >- protected final String TEXT_239 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_240 = " pane = getPrimaryShape()."; >- protected final String TEXT_241 = "();" + NL + "\t\t\tsetupContentPane(pane); // FIXME each comparment should handle his content pane in his own way " + NL + "\t\t\tpane.add((("; >- protected final String TEXT_242 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t"; >- protected final String TEXT_243 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean removeFixedChild(EditPart childEditPart) {"; >- protected final String TEXT_244 = "\t\t" + NL + "\t\tif (childEditPart instanceof "; >+ protected final String TEXT_25 = ", "; >+ protected final String TEXT_26 = " {"; >+ protected final String TEXT_27 = NL; >+ protected final String TEXT_28 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >+ protected final String TEXT_29 = ";"; >+ protected final String TEXT_30 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_31 = " contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_32 = " primaryShape;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_33 = "("; >+ protected final String TEXT_34 = " model) {" + NL + "\t\tassert model instanceof "; >+ protected final String TEXT_35 = ";" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL; >+ protected final String TEXT_36 = NL; >+ protected final String TEXT_37 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >+ protected final String TEXT_38 = " view = ("; >+ protected final String TEXT_39 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >+ protected final String TEXT_40 = " view = ("; >+ protected final String TEXT_41 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {"; >+ protected final String TEXT_42 = NL; >+ protected final String TEXT_43 = "\t\tinstallEditPolicy("; >+ protected final String TEXT_44 = ".COMPONENT_ROLE, new "; >+ protected final String TEXT_45 = "() {" + NL + "\t\t\tprotected "; >+ protected final String TEXT_46 = " createDeleteCommand("; >+ protected final String TEXT_47 = " deleteRequest) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_48 = " editingDomain = "; >+ protected final String TEXT_49 = ".getEditingDomain(getDiagramNode().getDiagram().getElement());" + NL + "\t\t\t\t"; >+ protected final String TEXT_50 = " cc = new "; >+ protected final String TEXT_51 = "();" + NL + "\t\t\t\tcc.append(getDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append("; >+ protected final String TEXT_52 = ".create(editingDomain, getDiagramNode()));" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_53 = "(editingDomain, cc);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tprivate org.eclipse.emf.common.command.Command getDomainModelRemoveCommand("; >+ protected final String TEXT_54 = " editingDomain) {"; >+ protected final String TEXT_55 = NL + "\t\t\t\t"; >+ protected final String TEXT_56 = " result = new "; >+ protected final String TEXT_57 = "();"; >+ protected final String TEXT_58 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_59 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_60 = ".eINSTANCE.get"; >+ protected final String TEXT_61 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >+ protected final String TEXT_62 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_63 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_64 = ".eINSTANCE.get"; >+ protected final String TEXT_65 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_66 = ".UNSET_VALUE));"; >+ protected final String TEXT_67 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_68 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_69 = ".eINSTANCE.get"; >+ protected final String TEXT_70 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >+ protected final String TEXT_71 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_72 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_73 = ".eINSTANCE.get"; >+ protected final String TEXT_74 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_75 = ".UNSET_VALUE));"; >+ protected final String TEXT_76 = NL + "\t\t\t\treturn result;"; >+ protected final String TEXT_77 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_78 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_79 = ".eINSTANCE.get"; >+ protected final String TEXT_80 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement());"; >+ protected final String TEXT_81 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_82 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_83 = ".eINSTANCE.get"; >+ protected final String TEXT_84 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_85 = ".UNSET_VALUE);"; >+ protected final String TEXT_86 = NL + "\t\t\t}" + NL + "\t\t});"; >+ protected final String TEXT_87 = NL + "\t\tinstallEditPolicy("; >+ protected final String TEXT_88 = ".LAYOUT_ROLE, new "; >+ protected final String TEXT_89 = "() {" + NL + "\t\t\tprotected "; >+ protected final String TEXT_90 = " getCreateCommand("; >+ protected final String TEXT_91 = " request) {" + NL + "\t\t\t\treturn "; >+ protected final String TEXT_92 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor("; >+ protected final String TEXT_93 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor("; >+ protected final String TEXT_94 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected "; >+ protected final String TEXT_95 = " createChangeConstraintCommand("; >+ protected final String TEXT_96 = " child, Object constraint) {" + NL + "\t\t\t\treturn "; >+ protected final String TEXT_97 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected "; >+ protected final String TEXT_98 = " createChildEditPolicy("; >+ protected final String TEXT_99 = " child) {" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_100 = "() {" + NL + "\t\t\t\t\tpublic "; >+ protected final String TEXT_101 = " getTargetEditPart("; >+ protected final String TEXT_102 = " request) {" + NL + "\t\t\t\t\t\tif ("; >+ protected final String TEXT_103 = ".REQ_SELECTION.equals(request.getType())) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_104 = ".this;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getTargetEditPart(request);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallEditPolicy("; >+ protected final String TEXT_105 = ".GRAPHICAL_NODE_ROLE, new "; >+ protected final String TEXT_106 = "() {" + NL + "\t\t\tprotected "; >+ protected final String TEXT_107 = " getReconnectTargetCommand("; >+ protected final String TEXT_108 = " request) {"; >+ protected final String TEXT_109 = " " + NL + "\t\t\t\treturn "; >+ protected final String TEXT_110 = ".INSTANCE;"; >+ protected final String TEXT_111 = NL + "\t\t\t\t"; >+ protected final String TEXT_112 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof "; >+ protected final String TEXT_113 = " == false) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_114 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_115 = " edge = ("; >+ protected final String TEXT_116 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = "; >+ protected final String TEXT_117 = ".getModelID(edge);" + NL + "\t\t\t\tif (!"; >+ protected final String TEXT_118 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_119 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_120 = " result = null;" + NL + "\t\t\t\tint visualID = "; >+ protected final String TEXT_121 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {"; >+ protected final String TEXT_122 = NL + "\t\t\t\tcase "; >+ protected final String TEXT_123 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect"; >+ protected final String TEXT_124 = "TargetCommand(request);" + NL + "\t\t\t\t\tbreak;"; >+ protected final String TEXT_125 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_126 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_127 = "("; >+ protected final String TEXT_128 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);"; >+ protected final String TEXT_129 = NL + "\t\t\t}" + NL + "\t\t\tprotected "; >+ protected final String TEXT_130 = " getReconnectSourceCommand("; >+ protected final String TEXT_131 = " request) {"; >+ protected final String TEXT_132 = " " + NL + "\t\t\t\treturn "; >+ protected final String TEXT_133 = ".INSTANCE;"; >+ protected final String TEXT_134 = NL + "\t\t\t\t"; >+ protected final String TEXT_135 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof "; >+ protected final String TEXT_136 = " == false) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_137 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_138 = " edge = ("; >+ protected final String TEXT_139 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = "; >+ protected final String TEXT_140 = ".getModelID(edge);" + NL + "\t\t\t\tif (!"; >+ protected final String TEXT_141 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_142 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_143 = " result = null;" + NL + "\t\t\t\tint visualID = "; >+ protected final String TEXT_144 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {"; >+ protected final String TEXT_145 = NL + "\t\t\t\tcase "; >+ protected final String TEXT_146 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect"; >+ protected final String TEXT_147 = "SourceCommand(request);" + NL + "\t\t\t\t\tbreak;"; >+ protected final String TEXT_148 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_149 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_150 = "("; >+ protected final String TEXT_151 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);"; >+ protected final String TEXT_152 = NL + "\t\t\t}" + NL + "\t\t\tprotected "; >+ protected final String TEXT_153 = " getConnectionCreateCommand("; >+ protected final String TEXT_154 = " request) {"; >+ protected final String TEXT_155 = NL + "\t\t\t\tif (request instanceof "; >+ protected final String TEXT_156 = ") {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_157 = " requestEx = ("; >+ protected final String TEXT_158 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_159 = " result = new "; >+ protected final String TEXT_160 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >+ protected final String TEXT_161 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_162 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >+ protected final String TEXT_163 = "StartCommand(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;"; >+ protected final String TEXT_164 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1 || !result.canExecute()) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\t//returning an unexecutable command does not change cursor to \"No\"." + NL + "\t\t\t\t\t\treturn null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_165 = " wrappedResult = new "; >+ protected final String TEXT_166 = "("; >+ protected final String TEXT_167 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t\trequest.setStartCommand(wrappedResult);" + NL + "\t\t\t\t\treturn wrappedResult;" + NL + "\t\t\t\t}"; >+ protected final String TEXT_168 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected "; >+ protected final String TEXT_169 = " getConnectionCompleteCommand("; >+ protected final String TEXT_170 = " request) {"; >+ protected final String TEXT_171 = NL + "\t\t\t\tif (request.getStartCommand() == null || !request.getStartCommand().canExecute()) {" + NL + "\t\t\t\t\treturn "; >+ protected final String TEXT_172 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tif (request instanceof "; >+ protected final String TEXT_173 = ") {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_174 = " requestEx = ("; >+ protected final String TEXT_175 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_176 = " result = new "; >+ protected final String TEXT_177 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >+ protected final String TEXT_178 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_179 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >+ protected final String TEXT_180 = "Command(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;"; >+ protected final String TEXT_181 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\treturn "; >+ protected final String TEXT_182 = ".INSTANCE;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new "; >+ protected final String TEXT_183 = "("; >+ protected final String TEXT_184 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t}"; >+ protected final String TEXT_185 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_186 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});"; >+ protected final String TEXT_187 = NL + "\t\tinstallLinkNotationModelRefresher();"; >+ protected final String TEXT_188 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_189 = " createFigure() {" + NL + "\t\t"; >+ protected final String TEXT_190 = " invisibleRectangle = new "; >+ protected final String TEXT_191 = "();" + NL + "\t\tinvisibleRectangle.setLayoutManager(new "; >+ protected final String TEXT_192 = "());" + NL + "\t\t"; >+ protected final String TEXT_193 = " shape = createNodeShape();" + NL + "\t\tinvisibleRectangle.add(shape);" + NL + "\t\tcontentPane = setupContentPane(shape);" + NL + "\t\t" + NL + "\t\t"; >+ protected final String TEXT_194 = " decorationShape = createDecorationPane();" + NL + "\t\tif (decorationShape != null) {" + NL + "\t\t\tinvisibleRectangle.add(decorationShape);" + NL + "\t\t}" + NL + "" + NL + "\t\treturn invisibleRectangle;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_195 = " createNodeShape() {"; >+ protected final String TEXT_196 = NL + "\t\tprimaryShape = new "; >+ protected final String TEXT_197 = "()"; >+ protected final String TEXT_198 = " {" + NL + "\t\t\tprotected boolean useLocalCoordinates() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}"; >+ protected final String TEXT_199 = ";"; >+ protected final String TEXT_200 = NL + "\t\tprimaryShape = "; >+ protected final String TEXT_201 = ";"; >+ protected final String TEXT_202 = NL + "\t\t"; >+ protected final String TEXT_203 = " figure = new "; >+ protected final String TEXT_204 = "();"; >+ protected final String TEXT_205 = NL + " \t\tfigure.setUseLocalCoordinates(true);"; >+ protected final String TEXT_206 = NL + " \t\tprimaryShape = figure;"; >+ protected final String TEXT_207 = NL + "\t\treturn primaryShape;" + NL + "\t}"; >+ protected final String TEXT_208 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_209 = " getPrimaryShape() {" + NL + "\t\treturn ("; >+ protected final String TEXT_210 = ") primaryShape;" + NL + "\t}"; >+ protected final String TEXT_211 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_212 = " createDecorationPane() {" + NL + "\t\t"; >+ protected final String TEXT_213 = " view = ("; >+ protected final String TEXT_214 = ") getModel();" + NL + "\t\t"; >+ protected final String TEXT_215 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t"; >+ protected final String TEXT_216 = " decorationPane = new "; >+ protected final String TEXT_217 = "();" + NL + "\t\tdecorationPane.setLayoutManager(new "; >+ protected final String TEXT_218 = "());" + NL + "" + NL + "\t\t"; >+ protected final String TEXT_219 = " imageFigure = new "; >+ protected final String TEXT_220 = "("; >+ protected final String TEXT_221 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"), "; >+ protected final String TEXT_222 = ".EAST);" + NL + "\t\tdecorationPane.add(imageFigure, "; >+ protected final String TEXT_223 = ".BOTTOM);" + NL + " \t\treturn decorationPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_224 = " setupContentPane("; >+ protected final String TEXT_225 = " nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {"; >+ protected final String TEXT_226 = NL + "\t\t\t"; >+ protected final String TEXT_227 = " layout = new "; >+ protected final String TEXT_228 = "();" + NL + "\t\t\tlayout.setSpacing(5);" + NL + "\t\t\tnodeShape.setLayoutManager(layout);"; >+ protected final String TEXT_229 = NL + "\t\tnodeShape.setLayoutManager(new "; >+ protected final String TEXT_230 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint("; >+ protected final String TEXT_231 = " figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new "; >+ protected final String TEXT_232 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});"; >+ protected final String TEXT_233 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_234 = " getContentPane() {" + NL + "\t\tif (contentPane == null) {" + NL + "\t\t\treturn super.getContentPane();" + NL + "\t\t}" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_235 = " getDiagramNode() {" + NL + "\t\treturn ("; >+ protected final String TEXT_236 = ") getModel();" + NL + "\t}" + NL; >+ protected final String TEXT_237 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild("; >+ protected final String TEXT_238 = " childEditPart) {"; >+ protected final String TEXT_239 = NL + "\t\tif (childEditPart instanceof "; >+ protected final String TEXT_240 = ") {" + NL + "\t\t\t(("; >+ protected final String TEXT_241 = ") childEditPart)."; >+ protected final String TEXT_242 = "(getPrimaryShape()."; >+ protected final String TEXT_243 = "());" + NL + "\t\t\treturn true;" + NL + "\t\t}"; >+ protected final String TEXT_244 = NL + "\t\tif (childEditPart instanceof "; > protected final String TEXT_245 = ") {" + NL + "\t\t\t"; > protected final String TEXT_246 = " pane = getPrimaryShape()."; >- protected final String TEXT_247 = "();" + NL + "\t\t\tpane.remove((("; >+ protected final String TEXT_247 = "();" + NL + "\t\t\tsetupContentPane(pane); // FIXME each comparment should handle his content pane in his own way " + NL + "\t\t\tpane.add((("; > protected final String TEXT_248 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t"; >- protected final String TEXT_249 = NL + "\t\treturn false;" + NL + "\t}"; >- protected final String TEXT_250 = NL + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_251 = " getPrimaryLabelEditPart() {"; >- protected final String TEXT_252 = NL + "\t\tfor("; >- protected final String TEXT_253 = " it = getDiagramNode().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_254 = " nextChild = ("; >- protected final String TEXT_255 = ")it.next();" + NL + "\t\t\tif ("; >- protected final String TEXT_256 = ".getVisualID(nextChild) == "; >- protected final String TEXT_257 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn ("; >- protected final String TEXT_258 = ") getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}"; >- protected final String TEXT_259 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >- protected final String TEXT_260 = " req) {" + NL + "\t\tif ("; >- protected final String TEXT_261 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; >- protected final String TEXT_262 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; >- protected final String TEXT_263 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; >- protected final String TEXT_264 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_265 = " getLabelEditPart("; >- protected final String TEXT_266 = " req) {" + NL + "\t\t"; >- protected final String TEXT_267 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >- protected final String TEXT_268 = " view = ("; >- protected final String TEXT_269 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >- protected final String TEXT_270 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >- protected final String TEXT_271 = NL + "\t\t\t\tcase "; >- protected final String TEXT_272 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >- protected final String TEXT_273 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >- protected final String TEXT_274 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel("; >- protected final String TEXT_275 = " childEditPart) {"; >- protected final String TEXT_276 = NL + "\t\tif (childEditPart instanceof "; >- protected final String TEXT_277 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}"; >- protected final String TEXT_278 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_279 = " getExternalLabelsContainer() {" + NL + "\t\t"; >- protected final String TEXT_280 = " root = ("; >- protected final String TEXT_281 = ") getRoot();" + NL + "\t\treturn root.getLayer("; >- protected final String TEXT_282 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL; >- protected final String TEXT_283 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; >- protected final String TEXT_284 = " childEditPart, int index) {"; >- protected final String TEXT_285 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; >- protected final String TEXT_286 = " labelFigure = (("; >- protected final String TEXT_287 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}"; >- protected final String TEXT_288 = NL + "\t\tif (addFixedChild(childEditPart)) {" + NL + "\t\t\treturn;" + NL + "\t\t}"; >- protected final String TEXT_289 = NL + "\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual("; >- protected final String TEXT_290 = " childEditPart) {"; >+ protected final String TEXT_249 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean removeFixedChild(EditPart childEditPart) {"; >+ protected final String TEXT_250 = "\t\t" + NL + "\t\tif (childEditPart instanceof "; >+ protected final String TEXT_251 = ") {" + NL + "\t\t\t"; >+ protected final String TEXT_252 = " pane = getPrimaryShape()."; >+ protected final String TEXT_253 = "();" + NL + "\t\t\tpane.remove((("; >+ protected final String TEXT_254 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t"; >+ protected final String TEXT_255 = NL + "\t\treturn false;" + NL + "\t}"; >+ protected final String TEXT_256 = NL + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_257 = " getPrimaryLabelEditPart() {"; >+ protected final String TEXT_258 = NL + "\t\tfor("; >+ protected final String TEXT_259 = " it = getDiagramNode().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >+ protected final String TEXT_260 = " nextChild = ("; >+ protected final String TEXT_261 = ")it.next();" + NL + "\t\t\tif ("; >+ protected final String TEXT_262 = ".getVisualID(nextChild) == "; >+ protected final String TEXT_263 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn ("; >+ protected final String TEXT_264 = ") getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}"; >+ protected final String TEXT_265 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >+ protected final String TEXT_266 = " req) {" + NL + "\t\tif ("; >+ protected final String TEXT_267 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; >+ protected final String TEXT_268 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; >+ protected final String TEXT_269 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; >+ protected final String TEXT_270 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_271 = " getLabelEditPart("; >+ protected final String TEXT_272 = " req) {" + NL + "\t\t"; >+ protected final String TEXT_273 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_274 = " view = ("; >+ protected final String TEXT_275 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >+ protected final String TEXT_276 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >+ protected final String TEXT_277 = NL + "\t\t\t\tcase "; >+ protected final String TEXT_278 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >+ protected final String TEXT_279 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >+ protected final String TEXT_280 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel("; >+ protected final String TEXT_281 = " childEditPart) {"; >+ protected final String TEXT_282 = NL + "\t\tif (childEditPart instanceof "; >+ protected final String TEXT_283 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}"; >+ protected final String TEXT_284 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_285 = " getExternalLabelsContainer() {" + NL + "\t\t"; >+ protected final String TEXT_286 = " root = ("; >+ protected final String TEXT_287 = ") getRoot();" + NL + "\t\treturn root.getLayer("; >+ protected final String TEXT_288 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL; >+ protected final String TEXT_289 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; >+ protected final String TEXT_290 = " childEditPart, int index) {"; > protected final String TEXT_291 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; > protected final String TEXT_292 = " labelFigure = (("; >- protected final String TEXT_293 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}"; >- protected final String TEXT_294 = NL + "\t\tif (removeFixedChild(childEditPart)){" + NL + "\t\t\treturn;" + NL + "\t\t}"; >- protected final String TEXT_295 = NL + "\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t}"; >- protected final String TEXT_296 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeNotify() {" + NL + "\t\tfor ("; >- protected final String TEXT_297 = " it = getChildren().iterator(); it.hasNext();) {" + NL + "\t\t\t"; >- protected final String TEXT_298 = " childEditPart = ("; >- protected final String TEXT_299 = ") it.next();" + NL + "\t\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t\tIFigure labelFigure = (("; >- protected final String TEXT_300 = ") childEditPart).getFigure();" + NL + "\t\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.removeNotify();" + NL + "\t}"; >- protected final String TEXT_301 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshBounds();" + NL + "\t\trefreshBackgroundColor();" + NL + "\t\trefreshForegroundColor();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\t"; >- protected final String TEXT_302 = " node = getDiagramNode();" + NL + "\t\tif (node.getLayoutConstraint() == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tassert node.getLayoutConstraint() instanceof "; >- protected final String TEXT_303 = ";" + NL + "\t\t"; >- protected final String TEXT_304 = " bounds = ("; >- protected final String TEXT_305 = ") node.getLayoutConstraint();" + NL + "\t\t(("; >- protected final String TEXT_306 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew "; >- protected final String TEXT_307 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_308 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_309 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_310 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_311 = " getSourceConnectionAnchor("; >- protected final String TEXT_312 = " connection) {" + NL + "\t\treturn new "; >- protected final String TEXT_313 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_314 = " getSourceConnectionAnchor("; >- protected final String TEXT_315 = " request) {" + NL + "\t\treturn new "; >- protected final String TEXT_316 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_317 = " getTargetConnectionAnchor("; >+ protected final String TEXT_293 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}"; >+ protected final String TEXT_294 = NL + "\t\tif (addFixedChild(childEditPart)) {" + NL + "\t\t\treturn;" + NL + "\t\t}"; >+ protected final String TEXT_295 = NL + "\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual("; >+ protected final String TEXT_296 = " childEditPart) {"; >+ protected final String TEXT_297 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; >+ protected final String TEXT_298 = " labelFigure = (("; >+ protected final String TEXT_299 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}"; >+ protected final String TEXT_300 = NL + "\t\tif (removeFixedChild(childEditPart)){" + NL + "\t\t\treturn;" + NL + "\t\t}"; >+ protected final String TEXT_301 = NL + "\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t}"; >+ protected final String TEXT_302 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeNotify() {" + NL + "\t\tfor ("; >+ protected final String TEXT_303 = " it = getChildren().iterator(); it.hasNext();) {" + NL + "\t\t\t"; >+ protected final String TEXT_304 = " childEditPart = ("; >+ protected final String TEXT_305 = ") it.next();" + NL + "\t\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t\tIFigure labelFigure = (("; >+ protected final String TEXT_306 = ") childEditPart).getFigure();" + NL + "\t\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.removeNotify();" + NL + "\t}"; >+ protected final String TEXT_307 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshBounds();" + NL + "\t\trefreshBackgroundColor();" + NL + "\t\trefreshForegroundColor();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\t"; >+ protected final String TEXT_308 = " node = getDiagramNode();" + NL + "\t\tif (node.getLayoutConstraint() == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tassert node.getLayoutConstraint() instanceof "; >+ protected final String TEXT_309 = ";" + NL + "\t\t"; >+ protected final String TEXT_310 = " bounds = ("; >+ protected final String TEXT_311 = ") node.getLayoutConstraint();" + NL + "\t\t(("; >+ protected final String TEXT_312 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew "; >+ protected final String TEXT_313 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_314 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_315 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_316 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_317 = " getSourceConnectionAnchor("; > protected final String TEXT_318 = " connection) {" + NL + "\t\treturn new "; > protected final String TEXT_319 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_320 = " getTargetConnectionAnchor("; >+ protected final String TEXT_320 = " getSourceConnectionAnchor("; > protected final String TEXT_321 = " request) {" + NL + "\t\treturn new "; >- protected final String TEXT_322 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; >- protected final String TEXT_323 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);"; >- protected final String TEXT_324 = NL + "\t\tinstallLinkNotationModelRefresher();"; >- protected final String TEXT_325 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {"; >- protected final String TEXT_326 = NL + "\t\tuninstallLinkNotationModelRefresher();"; >- protected final String TEXT_327 = NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}"; >- protected final String TEXT_328 = NL; >- protected final String TEXT_329 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_330 = " domainModelEditDomain = "; >- protected final String TEXT_331 = ".getEditingDomain("; >- protected final String TEXT_332 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends "; >- protected final String TEXT_333 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_334 = " filter;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_335 = " editingDomain;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher() {" + NL + "\t\t\tcreateFilter();" + NL + "\t\t}"; >- protected final String TEXT_336 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in "; >- protected final String TEXT_337 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_338 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn "; >- protected final String TEXT_339 = ".NOT_TOUCH;" + NL + "\t\t}"; >- protected final String TEXT_340 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_341 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn "; >- protected final String TEXT_342 = ".createEventTypeFilter("; >- protected final String TEXT_343 = ".SET).or(" + NL + "\t\t\t\t"; >- protected final String TEXT_344 = ".createEventTypeFilter("; >- protected final String TEXT_345 = ".UNSET).or(" + NL + "\t\t\t\t"; >- protected final String TEXT_346 = ".createEventTypeFilter("; >- protected final String TEXT_347 = ".REMOVE).or(" + NL + "\t\t\t\t"; >- protected final String TEXT_348 = ".createEventTypeFilter("; >- protected final String TEXT_349 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}"; >- protected final String TEXT_350 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void createFilter() {"; >- protected final String TEXT_351 = NL; >- protected final String TEXT_352 = NL + "\t\t\tfilter = "; >- protected final String TEXT_353 = ".createFeatureFilter("; >- protected final String TEXT_354 = ".eINSTANCE.get"; >- protected final String TEXT_355 = "());"; >- protected final String TEXT_356 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_357 = ".createFeatureFilter("; >- protected final String TEXT_358 = ".eINSTANCE.get"; >- protected final String TEXT_359 = "()));"; >+ protected final String TEXT_322 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_323 = " getTargetConnectionAnchor("; >+ protected final String TEXT_324 = " connection) {" + NL + "\t\treturn new "; >+ protected final String TEXT_325 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_326 = " getTargetConnectionAnchor("; >+ protected final String TEXT_327 = " request) {" + NL + "\t\treturn new "; >+ protected final String TEXT_328 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; >+ protected final String TEXT_329 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);"; >+ protected final String TEXT_330 = NL + "\t\tinstallLinkNotationModelRefresher();"; >+ protected final String TEXT_331 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {"; >+ protected final String TEXT_332 = NL + "\t\tuninstallLinkNotationModelRefresher();"; >+ protected final String TEXT_333 = NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}"; >+ protected final String TEXT_334 = NL; >+ protected final String TEXT_335 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_336 = " domainModelEditDomain = "; >+ protected final String TEXT_337 = ".getEditingDomain("; >+ protected final String TEXT_338 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * Service to find a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_339 = " viewService;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_340 = " getViewService() {" + NL + "\t\tif (viewService == null) {" + NL + "\t\t\tviewService = new "; >+ protected final String TEXT_341 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn viewService;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher(getViewService());" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends "; >+ protected final String TEXT_342 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher("; >+ protected final String TEXT_343 = " viewService) {" + NL + "\t\t\tsuper(viewService);" + NL + "\t\t}"; >+ protected final String TEXT_344 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in "; >+ protected final String TEXT_345 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_346 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_347 = ".NOT_TOUCH;" + NL + "\t\t}"; >+ protected final String TEXT_348 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_349 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_350 = ".createEventTypeFilter("; >+ protected final String TEXT_351 = ".SET).or(" + NL + "\t\t\t\t"; >+ protected final String TEXT_352 = ".createEventTypeFilter("; >+ protected final String TEXT_353 = ".UNSET).or(" + NL + "\t\t\t\t"; >+ protected final String TEXT_354 = ".createEventTypeFilter("; >+ protected final String TEXT_355 = ".REMOVE).or(" + NL + "\t\t\t\t"; >+ protected final String TEXT_356 = ".createEventTypeFilter("; >+ protected final String TEXT_357 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}"; >+ protected final String TEXT_358 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_359 = " createFilter() {"; > protected final String TEXT_360 = NL; >- protected final String TEXT_361 = NL + "\t\t\tfilter = "; >- protected final String TEXT_362 = ".createFeatureFilter("; >- protected final String TEXT_363 = ".eINSTANCE.get"; >- protected final String TEXT_364 = "());"; >- protected final String TEXT_365 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_366 = ".createFeatureFilter("; >- protected final String TEXT_367 = ".eINSTANCE.get"; >- protected final String TEXT_368 = "()));"; >- protected final String TEXT_369 = NL; >- protected final String TEXT_370 = NL + "\t\t\tfilter = "; >- protected final String TEXT_371 = ".createFeatureFilter("; >- protected final String TEXT_372 = ".eINSTANCE.get"; >- protected final String TEXT_373 = "());"; >- protected final String TEXT_374 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_375 = ".createFeatureFilter("; >- protected final String TEXT_376 = ".eINSTANCE.get"; >- protected final String TEXT_377 = "()));"; >- protected final String TEXT_378 = NL; >- protected final String TEXT_379 = NL + "\t\t\tfilter = "; >- protected final String TEXT_380 = ".createFeatureFilter("; >- protected final String TEXT_381 = ".eINSTANCE.get"; >- protected final String TEXT_382 = "());"; >- protected final String TEXT_383 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_384 = ".createFeatureFilter("; >- protected final String TEXT_385 = ".eINSTANCE.get"; >- protected final String TEXT_386 = "()));"; >- protected final String TEXT_387 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);"; >- protected final String TEXT_388 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter();"; >- protected final String TEXT_389 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());"; >- protected final String TEXT_390 = NL + "\t\t\tfilter = createUncontainedLinksFilter();"; >- protected final String TEXT_391 = NL + "\t\t\tfilter = "; >- protected final String TEXT_392 = ".ANY.negated();"; >- protected final String TEXT_393 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void install("; >- protected final String TEXT_394 = " editingDomain) {" + NL + "\t\t\tif (this.editingDomain != null && !this.editingDomain.equals(editingDomain)) {" + NL + "\t\t\t\tthrow new IllegalStateException(\"Already listening to another editing domain\");" + NL + "\t\t\t}" + NL + "\t\t\tthis.editingDomain = editingDomain;" + NL + "\t\t\tthis.editingDomain.addResourceSetListener(this);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isInstalled() {" + NL + "\t\t\treturn editingDomain != null;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void uninstall() {" + NL + "\t\t\tif (isInstalled()) {" + NL + "\t\t\t\teditingDomain.removeResourceSetListener(this);" + NL + "\t\t\t\teditingDomain = null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isPrecommitOnly() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_395 = " transactionAboutToCommit("; >- protected final String TEXT_396 = " event) {" + NL + "\t\t\treturn getRefreshLinkNotationModelCommand();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_397 = " getFilter() {" + NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t"; >- protected final String TEXT_398 = " command = getRefreshLinkNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_399 = " domainModelEditDomain = "; >- protected final String TEXT_400 = ".getEditingDomain("; >- protected final String TEXT_401 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new WrappingCommand(domainModelEditDomain, command));" + NL + "\t}" + NL; >- protected final String TEXT_402 = NL; >- protected final String TEXT_403 = NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private static class LinkDescriptor {" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate "; >- protected final String TEXT_404 = " mySource;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate "; >- protected final String TEXT_405 = " myDestination;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate "; >- protected final String TEXT_406 = " myLinkElement;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate int myVisualID;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor("; >- protected final String TEXT_407 = " source, "; >- protected final String TEXT_408 = " destination, "; >- protected final String TEXT_409 = " linkElement, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = linkElement;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate LinkDescriptor("; >- protected final String TEXT_410 = " source, "; >- protected final String TEXT_411 = " destination, int linkVID) {" + NL + "\t\tmySource = source;" + NL + "\t\tmyDestination = destination;" + NL + "\t\tmyVisualID = linkVID;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected "; >- protected final String TEXT_412 = " getSource() {" + NL + "\t\treturn mySource;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected "; >- protected final String TEXT_413 = " getDestination() {" + NL + "\t\treturn myDestination;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected "; >- protected final String TEXT_414 = " getLinkElement() {" + NL + "\t\treturn myLinkElement;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected int getVisualID() {" + NL + "\t\treturn myVisualID;" + NL + "\t}" + NL + "}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_415 = " getRefreshLinkNotationModelCommand() {" + NL + "\t\t"; >- protected final String TEXT_416 = "/*<LinkDescriptor>*/ semanticChildLinks = getSemanticChildLinks();" + NL + "\t\t"; >- protected final String TEXT_417 = "/*<Edge>*/ notationalChildLinks = getNotationalChildLinks();" + NL + "\t\tfinal "; >- protected final String TEXT_418 = " semanticToNotationalTypeBasedLinks = new "; >- protected final String TEXT_419 = "();" + NL + "\t\tfinal "; >- protected final String TEXT_420 = "/*<EObject, List<Edge>>*/ semanticToNotationalFeatureBasedLinks = new "; >- protected final String TEXT_421 = "();" + NL + "\t\tfor("; >- protected final String TEXT_422 = " it = notationalChildLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_423 = " next = ("; >- protected final String TEXT_424 = ") it.next();" + NL + "\t\t\t"; >- protected final String TEXT_425 = " nextSemantic = next.getElement();" + NL + "\t\t\tif (nextSemantic != null) {" + NL + "\t\t\t\tsemanticToNotationalTypeBasedLinks.put(nextSemantic, next);" + NL + "\t\t\t} else {" + NL + "\t\t\t\t"; >- protected final String TEXT_426 = " featureBasedLinksForSource = ("; >- protected final String TEXT_427 = ") semanticToNotationalFeatureBasedLinks.get(next.getSource().getElement());" + NL + "\t\t\t\tif (featureBasedLinksForSource == null) {" + NL + "\t\t\t\t\tfeatureBasedLinksForSource = new "; >- protected final String TEXT_428 = "();" + NL + "\t\t\t\t\tsemanticToNotationalFeatureBasedLinks.put(next.getSource().getElement(), featureBasedLinksForSource);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tfeatureBasedLinksForSource.add(next);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_429 = " parentView = "; >- protected final String TEXT_430 = ";" + NL + "\t\t"; >- protected final String TEXT_431 = " command = new "; >- protected final String TEXT_432 = "();" + NL + "\t\tfor("; >- protected final String TEXT_433 = " it = semanticChildLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\tLinkDescriptor next = (LinkDescriptor) it.next();" + NL + "\t\t\t"; >- protected final String TEXT_434 = " nextLinkElement = next.getLinkElement();" + NL + "\t\t\t"; >- protected final String TEXT_435 = " currentEdge;" + NL + "\t\t\tif (nextLinkElement != null) {" + NL + "\t\t\t\tcurrentEdge = ("; >- protected final String TEXT_436 = ") semanticToNotationalTypeBasedLinks.remove(nextLinkElement);" + NL + "\t\t\t} else {" + NL + "\t\t\t\t"; >- protected final String TEXT_437 = " featureBasedLinksForSource = ("; >- protected final String TEXT_438 = ") semanticToNotationalFeatureBasedLinks.get(next.getSource());" + NL + "\t\t\t\tif (featureBasedLinksForSource == null || featureBasedLinksForSource.isEmpty()) {" + NL + "\t\t\t\t\tcurrentEdge = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\tcurrentEdge = ("; >- protected final String TEXT_439 = ") featureBasedLinksForSource.remove(0);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tint linkVisualID = next.getVisualID();" + NL + "\t\t\tif (currentEdge == null) {" + NL + "\t\t\t\tif (nextLinkElement == null || shouldCreateEdge(nextLinkElement)) {" + NL + "\t\t\t\t\tcommand.appendIfCanExecute(getCreateNotationalEdgeCommand(parentView, next));" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tboolean changedSource = currentEdge.getSource().getElement() != next.getSource();" + NL + "\t\t\t\tboolean changedTarget = currentEdge.getTarget().getElement() != next.getDestination();" + NL + "\t\t\t\tboolean changedVID = linkVisualID != "; >- protected final String TEXT_440 = ".getVisualID(currentEdge);" + NL + "\t\t\t\tif (!changedSource && !changedTarget) {" + NL + "\t\t\t\t\tif (changedVID) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_441 = " notationalCommand = getCreateNotationalEdgeCommand(parentView, next);" + NL + "\t\t\t\t\t\tif (notationalCommand != null) {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_442 = "(parentView, notationalCommand, currentEdge));" + NL + "\t\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_443 = "(parentView, currentEdge));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\tif (changedVID) {" + NL + "\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_444 = "(parentView, currentEdge));" + NL + "\t\t\t\t\t\tcommand.appendIfCanExecute(getCreateNotationalEdgeCommand(parentView, next));" + NL + "\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_445 = " newSourceView = findView(next.getSource());" + NL + "\t\t\t\t\t\tif (changedSource && newSourceView != null) {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_446 = "(currentEdge, newSourceView));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_447 = " newTargetView = findView(next.getDestination());" + NL + "\t\t\t\t\t\tif (changedTarget && newTargetView != null) {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_448 = "(currentEdge, newTargetView));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tfor("; >- protected final String TEXT_449 = " it = semanticToNotationalTypeBasedLinks.values().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_450 = " obsoleteView = ("; >- protected final String TEXT_451 = ") it.next();" + NL + "\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_452 = "(parentView, obsoleteView));" + NL + "\t\t}" + NL + "\t\tfor("; >- protected final String TEXT_453 = " it = semanticToNotationalFeatureBasedLinks.values().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_454 = " obsoleteViews = ("; >- protected final String TEXT_455 = ") it.next();" + NL + "\t\t\tfor("; >- protected final String TEXT_456 = " obsoleteViewsIt = obsoleteViews.iterator(); obsoleteViewsIt.hasNext(); ) {" + NL + "\t\t\t\t"; >- protected final String TEXT_457 = " obsoleteView = ("; >- protected final String TEXT_458 = ") obsoleteViewsIt.next();" + NL + "\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_459 = "(parentView, obsoleteView));" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn command.getCommandList().isEmpty() ? null : command;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Finds a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_460 = " findView("; >- protected final String TEXT_461 = " modelElement) {" + NL + "\t\tif (modelElement == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_462 = " editPart = ("; >- protected final String TEXT_463 = ") getViewer().getEditPartRegistry().get(modelElement);" + NL + "\t\tif (editPart != null && editPart.getModel() instanceof "; >- protected final String TEXT_464 = ") {" + NL + "\t\t\treturn ("; >- protected final String TEXT_465 = ") editPart.getModel();" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_466 = " parentView = findView(modelElement.eContainer());" + NL + "\t\tif (parentView != null) {" + NL + "\t\t\t"; >- protected final String TEXT_467 = " result = findNode(parentView, modelElement);" + NL + "\t\t\tif (result != null) {" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn findEdge(modelElement);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * Finds a notational node that corresponds to the given underlying domain element in a subtree starting from the given parent element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_468 = " findNode("; >- protected final String TEXT_469 = " parentView, "; >- protected final String TEXT_470 = " modelElement) {" + NL + "\t\tfor("; >- protected final String TEXT_471 = " it = parentView.getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_472 = " next = ("; >- protected final String TEXT_473 = ") it.next();" + NL + "\t\t\tif (!next.isSetElement() || next.getElement() == parentView) {" + NL + "\t\t\t\t"; >- protected final String TEXT_474 = " result = findNode(next, modelElement);" + NL + "\t\t\t\tif (result != null) {" + NL + "\t\t\t\t\treturn result;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tif (next.isSetElement() && next.getElement() == modelElement) {" + NL + "\t\t\t\treturn next;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Finds a notational edge that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_475 = " findEdge("; >- protected final String TEXT_476 = " modelElement) {" + NL + "\t\tfor("; >- protected final String TEXT_477 = " it = "; >- protected final String TEXT_478 = ".getEdges().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_479 = " next = ("; >- protected final String TEXT_480 = ") it.next();" + NL + "\t\t\tif (next.isSetElement() && next.getElement() == modelElement) {" + NL + "\t\t\t\treturn next;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_481 = " getCreateNotationalEdgeCommand("; >- protected final String TEXT_482 = " parentView, LinkDescriptor linkDescriptor) {" + NL + "\t\t"; >- protected final String TEXT_483 = " sourceView = findView(linkDescriptor.getSource());" + NL + "\t\t"; >- protected final String TEXT_484 = " targetView = findView(linkDescriptor.getDestination());" + NL + "\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_485 = " createdEdge = "; >- protected final String TEXT_486 = ".eINSTANCE.createEdge();" + NL + "\t\tswitch (linkDescriptor.getVisualID()) {"; >- protected final String TEXT_487 = NL + "\t\tcase "; >- protected final String TEXT_488 = ".VISUAL_ID:" + NL + "\t\t\tif (linkDescriptor.getLinkElement() instanceof "; >- protected final String TEXT_489 = ") {" + NL + "\t\t\t\tcreatedEdge.setElement(linkDescriptor.getLinkElement());" + NL + "\t\t\t\t"; >- protected final String TEXT_490 = ".decorateView(createdEdge);" + NL + "\t\t\t}" + NL + "\t\t\tbreak;"; >- protected final String TEXT_491 = NL + "\t\tcase "; >- protected final String TEXT_492 = ".VISUAL_ID:" + NL + "\t\t\tif (linkDescriptor.getLinkElement() == null) {" + NL + "\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t"; >- protected final String TEXT_493 = ".decorateView(createdEdge);" + NL + "\t\t\t}" + NL + "\t\t\tbreak;"; >- protected final String TEXT_494 = NL + "\t\t}" + NL + "\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn new "; >- protected final String TEXT_495 = "(parentView, createdEdge, sourceView, targetView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_496 = " getSemanticChildLinks() {"; >- protected final String TEXT_497 = NL; >- protected final String TEXT_498 = "\t"; >- protected final String TEXT_499 = " result = new "; >- protected final String TEXT_500 = "();"; >- protected final String TEXT_501 = NL + "\t"; >- protected final String TEXT_502 = " modelObject = "; >- protected final String TEXT_503 = ".getElement();" + NL + "\t"; >- protected final String TEXT_504 = " nextValue;"; >- protected final String TEXT_505 = NL + "\tint linkVID;"; >- protected final String TEXT_506 = NL + "\tfor("; >- protected final String TEXT_507 = " it = "; >- protected final String TEXT_508 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >- protected final String TEXT_509 = ") it.next();"; >- protected final String TEXT_510 = NL + "\tnextValue = ("; >- protected final String TEXT_511 = ")"; >- protected final String TEXT_512 = ";"; >- protected final String TEXT_513 = NL + "\tlinkVID = "; >- protected final String TEXT_514 = ".INSTANCE.getLinkWithClassVisualID(nextValue);"; >- protected final String TEXT_515 = NL + "\tswitch (linkVID) {"; >- protected final String TEXT_516 = NL + "\tcase "; >- protected final String TEXT_517 = ".VISUAL_ID: {"; >- protected final String TEXT_518 = NL + "\tif ("; >- protected final String TEXT_519 = ".VISUAL_ID == linkVID) {"; >- protected final String TEXT_520 = NL + "\t\t"; >- protected final String TEXT_521 = " source = ("; >- protected final String TEXT_522 = ")"; >- protected final String TEXT_523 = ";"; >- protected final String TEXT_524 = NL + "\t\t"; >- protected final String TEXT_525 = " source = "; >- protected final String TEXT_526 = ".getElement();"; >- protected final String TEXT_527 = NL + "\t\t"; >- protected final String TEXT_528 = " target = ("; >- protected final String TEXT_529 = ")"; >- protected final String TEXT_530 = ";"; >- protected final String TEXT_531 = NL + "\t\t"; >- protected final String TEXT_532 = " target = "; >- protected final String TEXT_533 = ".getElement();"; >- protected final String TEXT_534 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new LinkDescriptor(source, target, nextValue, linkVID));" + NL + "\t\t}"; >- protected final String TEXT_535 = NL + "\t\tbreak;" + NL + "\t}"; >- protected final String TEXT_536 = NL + "\t}"; >- protected final String TEXT_537 = NL + "\t}"; >- protected final String TEXT_538 = NL + "\t}"; >- protected final String TEXT_539 = NL + "\tfor("; >- protected final String TEXT_540 = " it = "; >- protected final String TEXT_541 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >- protected final String TEXT_542 = ") it.next();"; >- protected final String TEXT_543 = NL + "\tnextValue = ("; >- protected final String TEXT_544 = ")"; >- protected final String TEXT_545 = ";"; >- protected final String TEXT_546 = NL + "\tif (nextValue != null) {"; >- protected final String TEXT_547 = NL + "\t\tresult.add(new LinkDescriptor(modelObject, nextValue, null, "; >- protected final String TEXT_548 = ".VISUAL_ID));"; >- protected final String TEXT_549 = NL + "\t}"; >- protected final String TEXT_550 = NL + "\t}"; >- protected final String TEXT_551 = NL + "\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_552 = " getNotationalChildLinks() {" + NL + "\t\t"; >- protected final String TEXT_553 = " result = new "; >- protected final String TEXT_554 = "();" + NL + "\t\t"; >- protected final String TEXT_555 = " allLinks = "; >- protected final String TEXT_556 = ".getEdges();" + NL + "\t\tfor("; >- protected final String TEXT_557 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_558 = " next = ("; >- protected final String TEXT_559 = ") it.next();"; >- protected final String TEXT_560 = NL + "\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\tresult.add(next);" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_561 = " source = next.getSource();" + NL + "\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\tresult.add(next);" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_562 = " target = next.getTarget();" + NL + "\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\tresult.add(next);" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}"; >- protected final String TEXT_563 = NL + "\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\tif (next.getSource() == "; >- protected final String TEXT_564 = ") {" + NL + "\t\t\t\t\tint linkVID = "; >- protected final String TEXT_565 = ".getVisualID(next);" + NL + "\t\t\t\t\tswitch (linkVID) {"; >- protected final String TEXT_566 = NL + "\t\t\t\t\tcase "; >- protected final String TEXT_567 = ".VISUAL_ID:"; >- protected final String TEXT_568 = NL + "\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}"; >- protected final String TEXT_569 = NL + "\t\t\t} else {"; >- protected final String TEXT_570 = NL + "\t\t\t}"; >- protected final String TEXT_571 = NL + "\t\t\tif (next.isSetElement() && next.getElement() != null) {"; >- protected final String TEXT_572 = NL + "\t\t\t\tif (next.getElement().eContainer() == "; >- protected final String TEXT_573 = ".getElement()) {" + NL + "\t\t\t\t\tint linkVID = "; >- protected final String TEXT_574 = ".getVisualID(next);" + NL + "\t\t\t\t\tswitch (linkVID) {"; >- protected final String TEXT_575 = NL + "\t\t\t\t\tcase "; >- protected final String TEXT_576 = ".VISUAL_ID:"; >- protected final String TEXT_577 = NL + "\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}"; >- protected final String TEXT_578 = NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t * The generated code always returns "; >- protected final String TEXT_579 = ". " + NL + "\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean shouldCreateEdge(EObject domainElement) {" + NL + "\t\treturn "; >- protected final String TEXT_580 = ";" + NL + "\t}"; >- protected final String TEXT_581 = NL; >- protected final String TEXT_582 = NL; >- protected final String TEXT_583 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >- protected final String TEXT_584 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_585 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >- protected final String TEXT_586 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_587 = NL; >- protected final String TEXT_588 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addRefresher("; >- protected final String TEXT_589 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeRefresher("; >- protected final String TEXT_590 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >- protected final String TEXT_591 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL; >+ protected final String TEXT_361 = NL + "\t\t\t"; >+ protected final String TEXT_362 = " filter = "; >+ protected final String TEXT_363 = ".createFeatureFilter("; >+ protected final String TEXT_364 = ".eINSTANCE.get"; >+ protected final String TEXT_365 = "());"; >+ protected final String TEXT_366 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_367 = ".createFeatureFilter("; >+ protected final String TEXT_368 = ".eINSTANCE.get"; >+ protected final String TEXT_369 = "()));"; >+ protected final String TEXT_370 = NL; >+ protected final String TEXT_371 = NL + "\t\t\t"; >+ protected final String TEXT_372 = " filter = "; >+ protected final String TEXT_373 = ".createFeatureFilter("; >+ protected final String TEXT_374 = ".eINSTANCE.get"; >+ protected final String TEXT_375 = "());"; >+ protected final String TEXT_376 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_377 = ".createFeatureFilter("; >+ protected final String TEXT_378 = ".eINSTANCE.get"; >+ protected final String TEXT_379 = "()));"; >+ protected final String TEXT_380 = NL; >+ protected final String TEXT_381 = NL + "\t\t\t"; >+ protected final String TEXT_382 = " filter = "; >+ protected final String TEXT_383 = ".createFeatureFilter("; >+ protected final String TEXT_384 = ".eINSTANCE.get"; >+ protected final String TEXT_385 = "());"; >+ protected final String TEXT_386 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_387 = ".createFeatureFilter("; >+ protected final String TEXT_388 = ".eINSTANCE.get"; >+ protected final String TEXT_389 = "()));"; >+ protected final String TEXT_390 = NL; >+ protected final String TEXT_391 = NL + "\t\t\t"; >+ protected final String TEXT_392 = " filter = "; >+ protected final String TEXT_393 = ".createFeatureFilter("; >+ protected final String TEXT_394 = ".eINSTANCE.get"; >+ protected final String TEXT_395 = "());"; >+ protected final String TEXT_396 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_397 = ".createFeatureFilter("; >+ protected final String TEXT_398 = ".eINSTANCE.get"; >+ protected final String TEXT_399 = "()));"; >+ protected final String TEXT_400 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);"; >+ protected final String TEXT_401 = NL + "\t\t\t"; >+ protected final String TEXT_402 = " filter = getConstrainedChildLinksFilter();"; >+ protected final String TEXT_403 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());"; >+ protected final String TEXT_404 = NL + "\t\t\t"; >+ protected final String TEXT_405 = " filter = createUncontainedLinksFilter();"; >+ protected final String TEXT_406 = NL + "\t\t\t"; >+ protected final String TEXT_407 = " filter = "; >+ protected final String TEXT_408 = ".NOT_TOUCH;"; >+ protected final String TEXT_409 = NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t \t * @generated" + NL + "\t \t */" + NL + "\t\tprotected "; >+ protected final String TEXT_410 = " getCreateNotationalElementCommand("; >+ protected final String TEXT_411 = " descriptor) {" + NL + "\t\t\t"; >+ protected final String TEXT_412 = " linkDescriptor = ("; >+ protected final String TEXT_413 = ") descriptor;" + NL + "\t\t\t"; >+ protected final String TEXT_414 = " sourceView = getViewService().findView(linkDescriptor.getSource());" + NL + "\t\t\t"; >+ protected final String TEXT_415 = " targetView = getViewService().findView(linkDescriptor.getDestination());" + NL + "\t\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_416 = " createdEdge = "; >+ protected final String TEXT_417 = ".eINSTANCE.createEdge();" + NL + "\t\t\tswitch (linkDescriptor.getVisualID()) {"; >+ protected final String TEXT_418 = NL + "\t\t\tcase "; >+ protected final String TEXT_419 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() instanceof "; >+ protected final String TEXT_420 = ") {" + NL + "\t\t\t\t\tcreatedEdge.setElement(linkDescriptor.getElement());" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_421 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;"; >+ protected final String TEXT_422 = NL + "\t\t\tcase "; >+ protected final String TEXT_423 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() == null) {" + NL + "\t\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_424 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;"; >+ protected final String TEXT_425 = NL + "\t\t\t}" + NL + "\t\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn new "; >+ protected final String TEXT_426 = "(getHost().getDiagram(), createdEdge, sourceView, targetView);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_427 = " getSemanticChildLinks() {"; >+ protected final String TEXT_428 = NL; >+ protected final String TEXT_429 = "\t"; >+ protected final String TEXT_430 = " result = new "; >+ protected final String TEXT_431 = "();"; >+ protected final String TEXT_432 = NL + "\t"; >+ protected final String TEXT_433 = " modelObject = "; >+ protected final String TEXT_434 = ".getElement();" + NL + "\t"; >+ protected final String TEXT_435 = " nextValue;"; >+ protected final String TEXT_436 = NL + "\tint linkVID;"; >+ protected final String TEXT_437 = NL + "\tfor("; >+ protected final String TEXT_438 = " it = "; >+ protected final String TEXT_439 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >+ protected final String TEXT_440 = ") it.next();"; >+ protected final String TEXT_441 = NL + "\tnextValue = ("; >+ protected final String TEXT_442 = ")"; >+ protected final String TEXT_443 = ";"; >+ protected final String TEXT_444 = NL + "\tlinkVID = "; >+ protected final String TEXT_445 = ".INSTANCE.getLinkWithClassVisualID(nextValue);"; >+ protected final String TEXT_446 = NL + "\tswitch (linkVID) {"; >+ protected final String TEXT_447 = NL + "\tcase "; >+ protected final String TEXT_448 = ".VISUAL_ID: {"; >+ protected final String TEXT_449 = NL + "\tif ("; >+ protected final String TEXT_450 = ".VISUAL_ID == linkVID) {"; >+ protected final String TEXT_451 = NL + "\t\t"; >+ protected final String TEXT_452 = " source = ("; >+ protected final String TEXT_453 = ")"; >+ protected final String TEXT_454 = ";"; >+ protected final String TEXT_455 = NL + "\t\t"; >+ protected final String TEXT_456 = " source = "; >+ protected final String TEXT_457 = ".getElement();"; >+ protected final String TEXT_458 = NL + "\t\t"; >+ protected final String TEXT_459 = " target = ("; >+ protected final String TEXT_460 = ")"; >+ protected final String TEXT_461 = ";"; >+ protected final String TEXT_462 = NL + "\t\t"; >+ protected final String TEXT_463 = " target = "; >+ protected final String TEXT_464 = ".getElement();"; >+ protected final String TEXT_465 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new "; >+ protected final String TEXT_466 = "(source, target, nextValue, linkVID));" + NL + "\t\t}"; >+ protected final String TEXT_467 = NL + "\t\tbreak;" + NL + "\t}"; >+ protected final String TEXT_468 = NL + "\t}"; >+ protected final String TEXT_469 = NL + "\t}"; >+ protected final String TEXT_470 = NL + "\t}"; >+ protected final String TEXT_471 = NL + "\tfor("; >+ protected final String TEXT_472 = " it = "; >+ protected final String TEXT_473 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >+ protected final String TEXT_474 = ") it.next();"; >+ protected final String TEXT_475 = NL + "\tnextValue = ("; >+ protected final String TEXT_476 = ")"; >+ protected final String TEXT_477 = ";"; >+ protected final String TEXT_478 = NL + "\tif (nextValue != null) {"; >+ protected final String TEXT_479 = NL + "\t\tresult.add(new "; >+ protected final String TEXT_480 = "(modelObject, nextValue, null, "; >+ protected final String TEXT_481 = ".VISUAL_ID));"; >+ protected final String TEXT_482 = NL + "\t}"; >+ protected final String TEXT_483 = NL + "\t}"; >+ protected final String TEXT_484 = NL + "\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_485 = " getNotationalChildLinks() {" + NL + "\t\t\t"; >+ protected final String TEXT_486 = " result = new "; >+ protected final String TEXT_487 = "();" + NL + "\t\t\t"; >+ protected final String TEXT_488 = " allLinks = "; >+ protected final String TEXT_489 = ".getEdges();" + NL + "\t\t\tfor("; >+ protected final String TEXT_490 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_491 = " next = ("; >+ protected final String TEXT_492 = ") it.next();"; >+ protected final String TEXT_493 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_494 = " source = next.getSource();" + NL + "\t\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_495 = " target = next.getTarget();" + NL + "\t\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}"; >+ protected final String TEXT_496 = NL + "\t\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\t\tif (next.getSource() == "; >+ protected final String TEXT_497 = ") {" + NL + "\t\t\t\t\t\tint linkVID = "; >+ protected final String TEXT_498 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {"; >+ protected final String TEXT_499 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_500 = ".VISUAL_ID:"; >+ protected final String TEXT_501 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}"; >+ protected final String TEXT_502 = NL + "\t\t\t\t} else {"; >+ protected final String TEXT_503 = NL + "\t\t\t\t}"; >+ protected final String TEXT_504 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null) {"; >+ protected final String TEXT_505 = NL + "\t\t\t\t\tif (next.getElement().eContainer() == "; >+ protected final String TEXT_506 = ".getElement()) {" + NL + "\t\t\t\t\t\tint linkVID = "; >+ protected final String TEXT_507 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {"; >+ protected final String TEXT_508 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_509 = ".VISUAL_ID:"; >+ protected final String TEXT_510 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}"; >+ protected final String TEXT_511 = NL + "\t\t\t}" + NL + "\t\t\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t\t * The generated code always returns "; >+ protected final String TEXT_512 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView("; >+ protected final String TEXT_513 = " descriptor) {" + NL + "\t\t\treturn "; >+ protected final String TEXT_514 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_515 = " getHost() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_516 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t"; >+ protected final String TEXT_517 = " linkRefresher = getLinkNotationModelRefresher();" + NL + "\t\tif (!linkRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_518 = " command = linkRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_519 = " domainModelEditDomain = "; >+ protected final String TEXT_520 = ".getEditingDomain("; >+ protected final String TEXT_521 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new "; >+ protected final String TEXT_522 = "(domainModelEditDomain, command));" + NL + "\t}"; >+ protected final String TEXT_523 = NL; >+ protected final String TEXT_524 = NL; >+ protected final String TEXT_525 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_526 = " domainModelRefresher = new "; >+ protected final String TEXT_527 = "(this);" + NL; >+ protected final String TEXT_528 = NL; >+ protected final String TEXT_529 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addRefresher("; >+ protected final String TEXT_530 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeRefresher("; >+ protected final String TEXT_531 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >+ protected final String TEXT_532 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL; >+ protected final String TEXT_533 = NL; >+ protected final String TEXT_534 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >+ protected final String TEXT_535 = NL + "\t\t"; >+ protected final String TEXT_536 = " style =" + NL + "\t\t\t("; >+ protected final String TEXT_537 = ") "; >+ protected final String TEXT_538 = ".getStyle(" + NL + "\t\t\t\t"; >+ protected final String TEXT_539 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_540 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >+ protected final String TEXT_541 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_542 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_543 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_544 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_545 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >+ protected final String TEXT_546 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >+ protected final String TEXT_547 = "\t" + NL + "\t}"; >+ protected final String TEXT_548 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_549 = " createdFont;"; >+ protected final String TEXT_550 = "\t" + NL; >+ protected final String TEXT_551 = NL; >+ protected final String TEXT_552 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t"; >+ protected final String TEXT_553 = " style = ("; >+ protected final String TEXT_554 = ") "; >+ protected final String TEXT_555 = ".getStyle("; >+ protected final String TEXT_556 = ".eINSTANCE.getLineStyle());" + NL + "\t\t"; >+ protected final String TEXT_557 = " toDispose = createdForegroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint foregroundColor = style.getLineColor();" + NL + "\t\t\tint red = foregroundColor & 0x000000FF;" + NL + "\t\t\tint green = (foregroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (foregroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_558 = " currentColor = getFigure().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedForegroundColor = new "; >+ protected final String TEXT_559 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdForegroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedForegroundColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_560 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t"; >+ protected final String TEXT_561 = " style = ("; >+ protected final String TEXT_562 = ") "; >+ protected final String TEXT_563 = ".getStyle("; >+ protected final String TEXT_564 = ".eINSTANCE.getFillStyle());" + NL + "\t\t"; >+ protected final String TEXT_565 = " toDispose = createdBackgroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint backgroundColor = style.getFillColor();" + NL + "\t\t\tint red = backgroundColor & 0x000000FF;" + NL + "\t\t\tint green = (backgroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (backgroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_566 = " currentColor = getFigure().getBackgroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedBackgroundColor = new "; >+ protected final String TEXT_567 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setBackgroundColor(createdBackgroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setBackgroundColor(getViewer().getControl().getBackground());" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_568 = " createdBackgroundColor;" + NL; >+ protected final String TEXT_569 = NL; >+ protected final String TEXT_570 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_571 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_572 = " feature, "; >+ protected final String TEXT_573 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new "; >+ protected final String TEXT_574 = "();"; >+ protected final String TEXT_575 = NL; >+ protected final String TEXT_576 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_577 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_578 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >+ protected final String TEXT_579 = NL; >+ protected final String TEXT_580 = "\t\tRefresher boundsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBounds();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_581 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_582 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_583 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_584 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_585 = ".eINSTANCE.getLocation_Y(), boundsRefresher);"; >+ protected final String TEXT_586 = NL; >+ protected final String TEXT_587 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_588 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; >+ protected final String TEXT_589 = NL; >+ protected final String TEXT_590 = "\t\tRefresher sourceEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshSourceConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_591 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);"; > protected final String TEXT_592 = NL; >- protected final String TEXT_593 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >- protected final String TEXT_594 = NL + "\t\t"; >- protected final String TEXT_595 = " style =" + NL + "\t\t\t("; >- protected final String TEXT_596 = ") "; >- protected final String TEXT_597 = ".getStyle(" + NL + "\t\t\t\t"; >- protected final String TEXT_598 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_599 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >- protected final String TEXT_600 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_601 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_602 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_603 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >- protected final String TEXT_604 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >- protected final String TEXT_605 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >- protected final String TEXT_606 = "\t" + NL + "\t}"; >- protected final String TEXT_607 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_608 = " createdFont;"; >- protected final String TEXT_609 = "\t" + NL; >- protected final String TEXT_610 = NL; >- protected final String TEXT_611 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t"; >- protected final String TEXT_612 = " style = ("; >- protected final String TEXT_613 = ") "; >- protected final String TEXT_614 = ".getStyle("; >- protected final String TEXT_615 = ".eINSTANCE.getLineStyle());" + NL + "\t\t"; >- protected final String TEXT_616 = " toDispose = createdForegroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint foregroundColor = style.getLineColor();" + NL + "\t\t\tint red = foregroundColor & 0x000000FF;" + NL + "\t\t\tint green = (foregroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (foregroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_617 = " currentColor = getFigure().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedForegroundColor = new "; >- protected final String TEXT_618 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdForegroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedForegroundColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_619 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t"; >- protected final String TEXT_620 = " style = ("; >- protected final String TEXT_621 = ") "; >- protected final String TEXT_622 = ".getStyle("; >- protected final String TEXT_623 = ".eINSTANCE.getFillStyle());" + NL + "\t\t"; >- protected final String TEXT_624 = " toDispose = createdBackgroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint backgroundColor = style.getFillColor();" + NL + "\t\t\tint red = backgroundColor & 0x000000FF;" + NL + "\t\t\tint green = (backgroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (backgroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_625 = " currentColor = getFigure().getBackgroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedBackgroundColor = new "; >- protected final String TEXT_626 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setBackgroundColor(createdBackgroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setBackgroundColor(getViewer().getControl().getBackground());" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_627 = " createdBackgroundColor;" + NL; >- protected final String TEXT_628 = NL; >- protected final String TEXT_629 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_630 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_631 = " feature, "; >- protected final String TEXT_632 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new "; >- protected final String TEXT_633 = "();"; >+ protected final String TEXT_593 = "\t\tRefresher targetEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshTargetConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_594 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);"; >+ protected final String TEXT_595 = NL; >+ protected final String TEXT_596 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_597 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_598 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_599 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_600 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; >+ protected final String TEXT_601 = NL; >+ protected final String TEXT_602 = "\t\tRefresher backgroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBackgroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_603 = ".eINSTANCE.getFillStyle_FillColor(), backgroundColorRefresher);" + NL + "\t\tRefresher foregroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshForegroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_604 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL; >+ protected final String TEXT_605 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect"; >+ protected final String TEXT_606 = "SourceCommand extends "; >+ protected final String TEXT_607 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_608 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_609 = " newSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_610 = " oldSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_611 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >+ protected final String TEXT_612 = "SourceCommand("; >+ protected final String TEXT_613 = " request) {" + NL + "\t\t\tthis(("; >+ protected final String TEXT_614 = ")request.getConnectionEditPart().getModel(), ("; >+ protected final String TEXT_615 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >+ protected final String TEXT_616 = "SourceCommand("; >+ protected final String TEXT_617 = " edge, "; >+ protected final String TEXT_618 = " newSource) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newSource = newSource;" + NL + "\t\t\tthis.oldSource = edge.getSource();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {"; >+ protected final String TEXT_619 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal "; >+ protected final String TEXT_620 = " domainModelEditDomain = "; >+ protected final String TEXT_621 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t"; >+ protected final String TEXT_622 = " command = new "; >+ protected final String TEXT_623 = "() {" + NL + "\t\t\t\tprivate "; >+ protected final String TEXT_624 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew "; >+ protected final String TEXT_625 = "(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();"; >+ protected final String TEXT_626 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;"; >+ protected final String TEXT_627 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {"; >+ protected final String TEXT_628 = NL + "\t\t\treturn false;"; >+ protected final String TEXT_629 = NL + "\t\t\t"; >+ protected final String TEXT_630 = " container = ("; >+ protected final String TEXT_631 = ")getRelationshipContainer(newSource.getElement(), "; >+ protected final String TEXT_632 = ".eINSTANCE.get"; >+ protected final String TEXT_633 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; > protected final String TEXT_634 = NL; >- protected final String TEXT_635 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_636 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_637 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >- protected final String TEXT_638 = NL; >- protected final String TEXT_639 = "\t\tRefresher boundsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBounds();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_640 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_641 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_642 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_643 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_644 = ".eINSTANCE.getLocation_Y(), boundsRefresher);"; >- protected final String TEXT_645 = NL; >- protected final String TEXT_646 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_647 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; >- protected final String TEXT_648 = NL; >- protected final String TEXT_649 = "\t\tRefresher sourceEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshSourceConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_650 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);"; >- protected final String TEXT_651 = NL; >- protected final String TEXT_652 = "\t\tRefresher targetEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshTargetConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_653 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);"; >- protected final String TEXT_654 = NL; >- protected final String TEXT_655 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_656 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_657 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_658 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_659 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; >- protected final String TEXT_660 = NL; >- protected final String TEXT_661 = "\t\tRefresher backgroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBackgroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_662 = ".eINSTANCE.getFillStyle_FillColor(), backgroundColorRefresher);" + NL + "\t\tRefresher foregroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshForegroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_663 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL; >- protected final String TEXT_664 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect"; >- protected final String TEXT_665 = "SourceCommand extends "; >- protected final String TEXT_666 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_667 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_668 = " newSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_669 = " oldSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_670 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >- protected final String TEXT_671 = "SourceCommand("; >- protected final String TEXT_672 = " request) {" + NL + "\t\t\tthis(("; >- protected final String TEXT_673 = ")request.getConnectionEditPart().getModel(), ("; >- protected final String TEXT_674 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >- protected final String TEXT_675 = "SourceCommand("; >- protected final String TEXT_676 = " edge, "; >- protected final String TEXT_677 = " newSource) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newSource = newSource;" + NL + "\t\t\tthis.oldSource = edge.getSource();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {"; >- protected final String TEXT_678 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal "; >- protected final String TEXT_679 = " domainModelEditDomain = "; >- protected final String TEXT_680 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t"; >- protected final String TEXT_681 = " command = new "; >- protected final String TEXT_682 = "() {" + NL + "\t\t\t\tprivate "; >- protected final String TEXT_683 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew WrappingCommand(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();"; >- protected final String TEXT_684 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;"; >- protected final String TEXT_685 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {"; >- protected final String TEXT_686 = NL + "\t\t\treturn false;"; >- protected final String TEXT_687 = NL + "\t\t\t"; >- protected final String TEXT_688 = " container = ("; >- protected final String TEXT_689 = ")getRelationshipContainer(newSource.getElement(), "; >- protected final String TEXT_690 = ".eINSTANCE.get"; >- protected final String TEXT_691 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_692 = NL; >- protected final String TEXT_693 = NL + "\t\tif ("; >- protected final String TEXT_694 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_695 = NL + "\t\t}"; >- protected final String TEXT_696 = NL + "\t\tif ("; >- protected final String TEXT_697 = ".size() >= "; >- protected final String TEXT_698 = ".eINSTANCE.get"; >- protected final String TEXT_699 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_700 = NL + "\t\t}"; >- protected final String TEXT_701 = NL; >- protected final String TEXT_702 = NL + "\t\tif ("; >- protected final String TEXT_703 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_704 = NL + "\t\t}"; >- protected final String TEXT_705 = NL + "\t\tif ("; >- protected final String TEXT_706 = ".size() >= "; >- protected final String TEXT_707 = ".eINSTANCE.get"; >- protected final String TEXT_708 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_709 = NL + "\t\t}"; >- protected final String TEXT_710 = NL; >- protected final String TEXT_711 = NL + "\t\t\tif(!"; >- protected final String TEXT_712 = ".canCreateLink("; >- protected final String TEXT_713 = ", "; >- protected final String TEXT_714 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_715 = NL + "\t\t\treturn true;"; >- protected final String TEXT_716 = NL; >- protected final String TEXT_717 = NL + "\t\tif ("; >- protected final String TEXT_718 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_719 = NL + "\t\t}"; >- protected final String TEXT_720 = NL + "\t\tif ("; >- protected final String TEXT_721 = ".size() >= "; >- protected final String TEXT_722 = ".eINSTANCE.get"; >- protected final String TEXT_723 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_724 = NL + "\t\t}"; >- protected final String TEXT_725 = NL; >- protected final String TEXT_726 = NL + "\t\t\tif(!"; >- protected final String TEXT_727 = ".canCreateLink("; >- protected final String TEXT_728 = ", "; >- protected final String TEXT_729 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_730 = NL + "\t\t\treturn true;"; >- protected final String TEXT_731 = NL + "\t\t\treturn false;"; >- protected final String TEXT_732 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_733 = " createReconnectCommand() {" + NL + "\t\t\t"; >- protected final String TEXT_734 = " editingDomain = "; >- protected final String TEXT_735 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t"; >- protected final String TEXT_736 = " result = new "; >- protected final String TEXT_737 = "();" + NL + "\t\t\tresult.append(new "; >- protected final String TEXT_738 = "(edge, newSource));"; >- protected final String TEXT_739 = NL + "\t\t\t"; >- protected final String TEXT_740 = " container = getRelationshipContainer(newSource.getElement(), "; >- protected final String TEXT_741 = ".eINSTANCE.get"; >- protected final String TEXT_742 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn "; >- protected final String TEXT_743 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_744 = " oldContainer = edge.getElement().eContainer();" + NL + "\t\t\tif (oldContainer == null) {" + NL + "\t\t\t\treturn "; >- protected final String TEXT_745 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tif (oldContainer != container) {"; >- protected final String TEXT_746 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_747 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), edge.getElement()));"; >- protected final String TEXT_748 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_749 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), "; >- protected final String TEXT_750 = ".UNSET_VALUE));"; >+ protected final String TEXT_635 = NL + "\t\tif ("; >+ protected final String TEXT_636 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_637 = NL + "\t\t}"; >+ protected final String TEXT_638 = NL + "\t\tif ("; >+ protected final String TEXT_639 = ".size() >= "; >+ protected final String TEXT_640 = ".eINSTANCE.get"; >+ protected final String TEXT_641 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_642 = NL + "\t\t}"; >+ protected final String TEXT_643 = NL; >+ protected final String TEXT_644 = NL + "\t\tif ("; >+ protected final String TEXT_645 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_646 = NL + "\t\t}"; >+ protected final String TEXT_647 = NL + "\t\tif ("; >+ protected final String TEXT_648 = ".size() >= "; >+ protected final String TEXT_649 = ".eINSTANCE.get"; >+ protected final String TEXT_650 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_651 = NL + "\t\t}"; >+ protected final String TEXT_652 = NL; >+ protected final String TEXT_653 = NL + "\t\t\tif(!"; >+ protected final String TEXT_654 = ".canCreateLink("; >+ protected final String TEXT_655 = ", "; >+ protected final String TEXT_656 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_657 = NL + "\t\t\treturn true;"; >+ protected final String TEXT_658 = NL; >+ protected final String TEXT_659 = NL + "\t\tif ("; >+ protected final String TEXT_660 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_661 = NL + "\t\t}"; >+ protected final String TEXT_662 = NL + "\t\tif ("; >+ protected final String TEXT_663 = ".size() >= "; >+ protected final String TEXT_664 = ".eINSTANCE.get"; >+ protected final String TEXT_665 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_666 = NL + "\t\t}"; >+ protected final String TEXT_667 = NL; >+ protected final String TEXT_668 = NL + "\t\t\tif(!"; >+ protected final String TEXT_669 = ".canCreateLink("; >+ protected final String TEXT_670 = ", "; >+ protected final String TEXT_671 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_672 = NL + "\t\t\treturn true;"; >+ protected final String TEXT_673 = NL + "\t\t\treturn false;"; >+ protected final String TEXT_674 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_675 = " createReconnectCommand() {" + NL + "\t\t\t"; >+ protected final String TEXT_676 = " editingDomain = "; >+ protected final String TEXT_677 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t"; >+ protected final String TEXT_678 = " result = new "; >+ protected final String TEXT_679 = "();" + NL + "\t\t\tresult.append(new "; >+ protected final String TEXT_680 = "(edge, newSource));"; >+ protected final String TEXT_681 = NL + "\t\t\t"; >+ protected final String TEXT_682 = " container = getRelationshipContainer(newSource.getElement(), "; >+ protected final String TEXT_683 = ".eINSTANCE.get"; >+ protected final String TEXT_684 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn "; >+ protected final String TEXT_685 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_686 = " oldContainer = edge.getElement().eContainer();" + NL + "\t\t\tif (oldContainer == null) {" + NL + "\t\t\t\treturn "; >+ protected final String TEXT_687 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tif (oldContainer != container) {"; >+ protected final String TEXT_688 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_689 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), edge.getElement()));"; >+ protected final String TEXT_690 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_691 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), "; >+ protected final String TEXT_692 = ".UNSET_VALUE));"; >+ protected final String TEXT_693 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_694 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, "; >+ protected final String TEXT_695 = ".eINSTANCE.get"; >+ protected final String TEXT_696 = "(), edge.getElement()));"; >+ protected final String TEXT_697 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_698 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), "; >+ protected final String TEXT_699 = ".eINSTANCE.get"; >+ protected final String TEXT_700 = "()," + NL + "\t\t\t\t\tedge.getElement()));"; >+ protected final String TEXT_701 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_702 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), "; >+ protected final String TEXT_703 = ".eINSTANCE.get"; >+ protected final String TEXT_704 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_705 = ".UNSET_VALUE));"; >+ protected final String TEXT_706 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_707 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, "; >+ protected final String TEXT_708 = ".eINSTANCE.get"; >+ protected final String TEXT_709 = "(), edge.getElement()));"; >+ protected final String TEXT_710 = NL + "\t\t\t}"; >+ protected final String TEXT_711 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_712 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_713 = ".eINSTANCE.get"; >+ protected final String TEXT_714 = "()," + NL + "\t\t\t\toldSource.getElement()));" + NL + "\t\t\tresult.append("; >+ protected final String TEXT_715 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_716 = ".eINSTANCE.get"; >+ protected final String TEXT_717 = "()," + NL + "\t\t\t\tnewSource.getElement()));"; >+ protected final String TEXT_718 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_719 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_720 = ".eINSTANCE.get"; >+ protected final String TEXT_721 = "()," + NL + "\t\t\t\tnewSource.getElement()));"; >+ protected final String TEXT_722 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_723 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), "; >+ protected final String TEXT_724 = ".eINSTANCE.get"; >+ protected final String TEXT_725 = "(), edge.getTarget().getElement()));" + NL + "\t\t\tresult.append("; >+ protected final String TEXT_726 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), "; >+ protected final String TEXT_727 = ".eINSTANCE.get"; >+ protected final String TEXT_728 = "(), edge.getTarget().getElement()));"; >+ protected final String TEXT_729 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_730 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), "; >+ protected final String TEXT_731 = ".eINSTANCE.get"; >+ protected final String TEXT_732 = "(), "; >+ protected final String TEXT_733 = ".UNSET_VALUE));" + NL + "\t\t\tresult.append("; >+ protected final String TEXT_734 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), "; >+ protected final String TEXT_735 = ".eINSTANCE.get"; >+ protected final String TEXT_736 = "(), edge.getTarget().getElement()));"; >+ protected final String TEXT_737 = NL + "\t\t\treturn result;" + NL + "\t\t}" + NL; >+ protected final String TEXT_738 = NL; >+ protected final String TEXT_739 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_740 = " getRelationshipContainer("; >+ protected final String TEXT_741 = " element, "; >+ protected final String TEXT_742 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >+ protected final String TEXT_743 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */"; >+ protected final String TEXT_744 = NL; >+ protected final String TEXT_745 = NL + "\t\t\tprivate "; >+ protected final String TEXT_746 = " createDomainModelRemoveCommand("; >+ protected final String TEXT_747 = " editingDomain) {"; >+ protected final String TEXT_748 = NL + "\t\t\t\t"; >+ protected final String TEXT_749 = " result = new "; >+ protected final String TEXT_750 = "();"; > protected final String TEXT_751 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_752 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, "; >- protected final String TEXT_753 = ".eINSTANCE.get"; >- protected final String TEXT_754 = "(), edge.getElement()));"; >- protected final String TEXT_755 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_756 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), "; >- protected final String TEXT_757 = ".eINSTANCE.get"; >- protected final String TEXT_758 = "()," + NL + "\t\t\t\t\tedge.getElement()));"; >- protected final String TEXT_759 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_760 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), "; >- protected final String TEXT_761 = ".eINSTANCE.get"; >- protected final String TEXT_762 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_763 = ".UNSET_VALUE));"; >- protected final String TEXT_764 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_765 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, "; >+ protected final String TEXT_752 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_753 = ".getElement().eContainer(), "; >+ protected final String TEXT_754 = ".getElement().eContainmentFeature(), "; >+ protected final String TEXT_755 = ".getElement()));"; >+ protected final String TEXT_756 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_757 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_758 = ".getElement().eContainer(), "; >+ protected final String TEXT_759 = ".getElement().eContainmentFeature(), "; >+ protected final String TEXT_760 = ".UNSET_VALUE));"; >+ protected final String TEXT_761 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_762 = ".INSTANCE;"; >+ protected final String TEXT_763 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_764 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_765 = ".getElement().eContainer(), "; > protected final String TEXT_766 = ".eINSTANCE.get"; >- protected final String TEXT_767 = "(), edge.getElement()));"; >- protected final String TEXT_768 = NL + "\t\t\t}"; >- protected final String TEXT_769 = NL + "\t\t\tresult.append("; >- protected final String TEXT_770 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >- protected final String TEXT_771 = ".eINSTANCE.get"; >- protected final String TEXT_772 = "()," + NL + "\t\t\t\toldSource.getElement()));" + NL + "\t\t\tresult.append("; >- protected final String TEXT_773 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >- protected final String TEXT_774 = ".eINSTANCE.get"; >- protected final String TEXT_775 = "()," + NL + "\t\t\t\tnewSource.getElement()));"; >- protected final String TEXT_776 = NL + "\t\t\tresult.append("; >- protected final String TEXT_777 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_767 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_768 = ".getElement()));"; >+ protected final String TEXT_769 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_770 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_771 = ".getElement().eContainer(), "; >+ protected final String TEXT_772 = ".eINSTANCE.get"; >+ protected final String TEXT_773 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_774 = ".UNSET_VALUE));"; >+ protected final String TEXT_775 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_776 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_777 = ".getElement(), "; > protected final String TEXT_778 = ".eINSTANCE.get"; >- protected final String TEXT_779 = "()," + NL + "\t\t\t\tnewSource.getElement()));"; >- protected final String TEXT_780 = NL + "\t\t\tresult.append("; >- protected final String TEXT_781 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), "; >- protected final String TEXT_782 = ".eINSTANCE.get"; >- protected final String TEXT_783 = "(), edge.getTarget().getElement()));" + NL + "\t\t\tresult.append("; >- protected final String TEXT_784 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), "; >- protected final String TEXT_785 = ".eINSTANCE.get"; >- protected final String TEXT_786 = "(), edge.getTarget().getElement()));"; >- protected final String TEXT_787 = NL + "\t\t\tresult.append("; >- protected final String TEXT_788 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), "; >- protected final String TEXT_789 = ".eINSTANCE.get"; >- protected final String TEXT_790 = "(), "; >- protected final String TEXT_791 = ".UNSET_VALUE));" + NL + "\t\t\tresult.append("; >- protected final String TEXT_792 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), "; >- protected final String TEXT_793 = ".eINSTANCE.get"; >- protected final String TEXT_794 = "(), edge.getTarget().getElement()));"; >- protected final String TEXT_795 = NL + "\t\t\treturn result;" + NL + "\t\t}" + NL; >- protected final String TEXT_796 = NL; >- protected final String TEXT_797 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >- protected final String TEXT_798 = " getRelationshipContainer("; >- protected final String TEXT_799 = " element, "; >- protected final String TEXT_800 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >- protected final String TEXT_801 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */"; >- protected final String TEXT_802 = NL; >- protected final String TEXT_803 = NL + "\t\t\tprivate "; >- protected final String TEXT_804 = " createDomainModelRemoveCommand("; >- protected final String TEXT_805 = " editingDomain) {"; >- protected final String TEXT_806 = NL + "\t\t\t\t"; >- protected final String TEXT_807 = " result = new "; >- protected final String TEXT_808 = "();"; >- protected final String TEXT_809 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_810 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_811 = ".getElement().eContainer(), "; >- protected final String TEXT_812 = ".getElement().eContainmentFeature(), "; >- protected final String TEXT_813 = ".getElement()));"; >- protected final String TEXT_814 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_815 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_816 = ".getElement().eContainer(), "; >- protected final String TEXT_817 = ".getElement().eContainmentFeature(), "; >- protected final String TEXT_818 = ".UNSET_VALUE));"; >- protected final String TEXT_819 = NL + "\t\t\t\treturn "; >- protected final String TEXT_820 = ".INSTANCE;"; >- protected final String TEXT_821 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_822 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_823 = ".getElement().eContainer(), "; >- protected final String TEXT_824 = ".eINSTANCE.get"; >- protected final String TEXT_825 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_826 = ".getElement()));"; >- protected final String TEXT_827 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_828 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_829 = ".getElement().eContainer(), "; >- protected final String TEXT_830 = ".eINSTANCE.get"; >- protected final String TEXT_831 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_832 = ".UNSET_VALUE));"; >- protected final String TEXT_833 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_834 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_835 = ".getElement(), "; >- protected final String TEXT_836 = ".eINSTANCE.get"; >- protected final String TEXT_837 = "(), "; >- protected final String TEXT_838 = ".getSource().getElement()));"; >- protected final String TEXT_839 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_840 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_841 = ".getElement(), "; >+ protected final String TEXT_779 = "(), "; >+ protected final String TEXT_780 = ".getSource().getElement()));"; >+ protected final String TEXT_781 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_782 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_783 = ".getElement(), "; >+ protected final String TEXT_784 = ".eINSTANCE.get"; >+ protected final String TEXT_785 = "(), "; >+ protected final String TEXT_786 = ".UNSET_VALUE));"; >+ protected final String TEXT_787 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_788 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_789 = ".getElement(), "; >+ protected final String TEXT_790 = ".eINSTANCE.get"; >+ protected final String TEXT_791 = "(), "; >+ protected final String TEXT_792 = ".getTarget().getElement()));"; >+ protected final String TEXT_793 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_794 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_795 = ".getElement(), "; >+ protected final String TEXT_796 = ".eINSTANCE.get"; >+ protected final String TEXT_797 = "(), "; >+ protected final String TEXT_798 = ".UNSET_VALUE));"; >+ protected final String TEXT_799 = NL + "\t\t\t\treturn result;"; >+ protected final String TEXT_800 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_801 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_802 = ".getSource().getElement(), "; >+ protected final String TEXT_803 = ".eINSTANCE.get"; >+ protected final String TEXT_804 = "(), "; >+ protected final String TEXT_805 = ".getTarget().getElement());"; >+ protected final String TEXT_806 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_807 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_808 = ".getSource().getElement(), "; >+ protected final String TEXT_809 = ".eINSTANCE.get"; >+ protected final String TEXT_810 = "(), "; >+ protected final String TEXT_811 = ".UNSET_VALUE);"; >+ protected final String TEXT_812 = NL + "\t\t\t}"; >+ protected final String TEXT_813 = NL + "\t}" + NL; >+ protected final String TEXT_814 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; >+ protected final String TEXT_815 = "StartCommand extends "; >+ protected final String TEXT_816 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_817 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >+ protected final String TEXT_818 = "StartCommand("; >+ protected final String TEXT_819 = " requestEx) {" + NL + "\t\t\t//Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart()." + NL + "\t\t\tsource = ("; >+ protected final String TEXT_820 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {" + NL + "\t\t\tif (source == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_821 = NL + "\t\t\treturn false;"; >+ protected final String TEXT_822 = NL + "\t\t\t"; >+ protected final String TEXT_823 = " container = ("; >+ protected final String TEXT_824 = ")getRelationshipContainer(source.getElement(), "; >+ protected final String TEXT_825 = ".eINSTANCE.get"; >+ protected final String TEXT_826 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_827 = NL; >+ protected final String TEXT_828 = NL + "\t\tif ("; >+ protected final String TEXT_829 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_830 = NL + "\t\t}"; >+ protected final String TEXT_831 = NL + "\t\tif ("; >+ protected final String TEXT_832 = ".size() >= "; >+ protected final String TEXT_833 = ".eINSTANCE.get"; >+ protected final String TEXT_834 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_835 = NL + "\t\t}"; >+ protected final String TEXT_836 = NL; >+ protected final String TEXT_837 = NL + "\t\tif ("; >+ protected final String TEXT_838 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_839 = NL + "\t\t}"; >+ protected final String TEXT_840 = NL + "\t\tif ("; >+ protected final String TEXT_841 = ".size() >= "; > protected final String TEXT_842 = ".eINSTANCE.get"; >- protected final String TEXT_843 = "(), "; >- protected final String TEXT_844 = ".UNSET_VALUE));"; >- protected final String TEXT_845 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_846 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_847 = ".getElement(), "; >- protected final String TEXT_848 = ".eINSTANCE.get"; >- protected final String TEXT_849 = "(), "; >- protected final String TEXT_850 = ".getTarget().getElement()));"; >- protected final String TEXT_851 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_852 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_853 = ".getElement(), "; >- protected final String TEXT_854 = ".eINSTANCE.get"; >- protected final String TEXT_855 = "(), "; >- protected final String TEXT_856 = ".UNSET_VALUE));"; >- protected final String TEXT_857 = NL + "\t\t\t\treturn result;"; >- protected final String TEXT_858 = NL + "\t\t\t\treturn "; >- protected final String TEXT_859 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_860 = ".getSource().getElement(), "; >- protected final String TEXT_861 = ".eINSTANCE.get"; >- protected final String TEXT_862 = "(), "; >- protected final String TEXT_863 = ".getTarget().getElement());"; >- protected final String TEXT_864 = NL + "\t\t\t\treturn "; >- protected final String TEXT_865 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_866 = ".getSource().getElement(), "; >- protected final String TEXT_867 = ".eINSTANCE.get"; >- protected final String TEXT_868 = "(), "; >- protected final String TEXT_869 = ".UNSET_VALUE);"; >- protected final String TEXT_870 = NL + "\t\t\t}"; >- protected final String TEXT_871 = NL + "\t}" + NL; >- protected final String TEXT_872 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; >- protected final String TEXT_873 = "StartCommand extends "; >- protected final String TEXT_874 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_875 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >- protected final String TEXT_876 = "StartCommand("; >- protected final String TEXT_877 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\t//Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart()." + NL + "\t\t\tsource = ("; >- protected final String TEXT_878 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {" + NL + "\t\t\tif (source == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_879 = NL + "\t\t\treturn false;"; >- protected final String TEXT_880 = NL + "\t\t\t"; >- protected final String TEXT_881 = " container = ("; >- protected final String TEXT_882 = ")getRelationshipContainer(source.getElement(), "; >- protected final String TEXT_883 = ".eINSTANCE.get"; >- protected final String TEXT_884 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_885 = NL; >- protected final String TEXT_886 = NL + "\t\tif ("; >- protected final String TEXT_887 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_888 = NL + "\t\t}"; >- protected final String TEXT_889 = NL + "\t\tif ("; >- protected final String TEXT_890 = ".size() >= "; >- protected final String TEXT_891 = ".eINSTANCE.get"; >- protected final String TEXT_892 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_893 = NL + "\t\t}"; >- protected final String TEXT_894 = NL; >- protected final String TEXT_895 = NL + "\t\tif ("; >- protected final String TEXT_896 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_897 = NL + "\t\t}"; >- protected final String TEXT_898 = NL + "\t\tif ("; >- protected final String TEXT_899 = ".size() >= "; >- protected final String TEXT_900 = ".eINSTANCE.get"; >- protected final String TEXT_901 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_902 = NL + "\t\t}"; >+ protected final String TEXT_843 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_844 = NL + "\t\t}"; >+ protected final String TEXT_845 = NL; >+ protected final String TEXT_846 = NL + "\t\t\tif(!"; >+ protected final String TEXT_847 = ".canCreateLink("; >+ protected final String TEXT_848 = ", "; >+ protected final String TEXT_849 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_850 = NL + "\t\t\treturn true;"; >+ protected final String TEXT_851 = NL; >+ protected final String TEXT_852 = NL + "\t\tif ("; >+ protected final String TEXT_853 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_854 = NL + "\t\t}"; >+ protected final String TEXT_855 = NL + "\t\tif ("; >+ protected final String TEXT_856 = ".size() >= "; >+ protected final String TEXT_857 = ".eINSTANCE.get"; >+ protected final String TEXT_858 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_859 = NL + "\t\t}"; >+ protected final String TEXT_860 = NL; >+ protected final String TEXT_861 = NL + "\t\t\tif(!"; >+ protected final String TEXT_862 = ".canCreateLink("; >+ protected final String TEXT_863 = ", "; >+ protected final String TEXT_864 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_865 = NL + "\t\t\treturn true;"; >+ protected final String TEXT_866 = NL + "\t\t\treturn false;"; >+ protected final String TEXT_867 = NL + "\t\t}"; >+ protected final String TEXT_868 = NL; >+ protected final String TEXT_869 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_870 = " getRelationshipContainer("; >+ protected final String TEXT_871 = " element, "; >+ protected final String TEXT_872 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >+ protected final String TEXT_873 = NL + NL + "\t}"; >+ protected final String TEXT_874 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect"; >+ protected final String TEXT_875 = "TargetCommand extends "; >+ protected final String TEXT_876 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_877 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_878 = " newTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_879 = " oldTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_880 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >+ protected final String TEXT_881 = "TargetCommand("; >+ protected final String TEXT_882 = " request) {" + NL + "\t\t\tthis(("; >+ protected final String TEXT_883 = ")request.getConnectionEditPart().getModel(), ("; >+ protected final String TEXT_884 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >+ protected final String TEXT_885 = "TargetCommand("; >+ protected final String TEXT_886 = " edge, "; >+ protected final String TEXT_887 = " newTarget) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newTarget = newTarget;" + NL + "\t\t\tthis.oldTarget = edge.getTarget();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {"; >+ protected final String TEXT_888 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal "; >+ protected final String TEXT_889 = " domainModelEditDomain = "; >+ protected final String TEXT_890 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t"; >+ protected final String TEXT_891 = " command = new "; >+ protected final String TEXT_892 = "() {" + NL + "\t\t\t\tprivate "; >+ protected final String TEXT_893 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew "; >+ protected final String TEXT_894 = "(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();"; >+ protected final String TEXT_895 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;"; >+ protected final String TEXT_896 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {"; >+ protected final String TEXT_897 = NL; >+ protected final String TEXT_898 = NL + "\t\t\tif(!"; >+ protected final String TEXT_899 = ".canCreateLink("; >+ protected final String TEXT_900 = ", "; >+ protected final String TEXT_901 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_902 = NL + "\t\t\treturn true;"; > protected final String TEXT_903 = NL; > protected final String TEXT_904 = NL + "\t\t\tif(!"; > protected final String TEXT_905 = ".canCreateLink("; > protected final String TEXT_906 = ", "; > protected final String TEXT_907 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; > protected final String TEXT_908 = NL + "\t\t\treturn true;"; >- protected final String TEXT_909 = NL; >- protected final String TEXT_910 = NL + "\t\tif ("; >- protected final String TEXT_911 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_912 = NL + "\t\t}"; >- protected final String TEXT_913 = NL + "\t\tif ("; >- protected final String TEXT_914 = ".size() >= "; >- protected final String TEXT_915 = ".eINSTANCE.get"; >- protected final String TEXT_916 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_917 = NL + "\t\t}"; >- protected final String TEXT_918 = NL; >- protected final String TEXT_919 = NL + "\t\t\tif(!"; >- protected final String TEXT_920 = ".canCreateLink("; >- protected final String TEXT_921 = ", "; >- protected final String TEXT_922 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_923 = NL + "\t\t\treturn true;"; >- protected final String TEXT_924 = NL + "\t\t\treturn false;"; >- protected final String TEXT_925 = NL + "\t\t}"; >- protected final String TEXT_926 = NL; >- protected final String TEXT_927 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >- protected final String TEXT_928 = " getRelationshipContainer("; >- protected final String TEXT_929 = " element, "; >- protected final String TEXT_930 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >- protected final String TEXT_931 = NL + NL + "\t}"; >- protected final String TEXT_932 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect"; >- protected final String TEXT_933 = "TargetCommand extends "; >- protected final String TEXT_934 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_935 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_936 = " newTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_937 = " oldTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_938 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >- protected final String TEXT_939 = "TargetCommand("; >- protected final String TEXT_940 = " request) {" + NL + "\t\t\tthis(("; >- protected final String TEXT_941 = ")request.getConnectionEditPart().getModel(), ("; >- protected final String TEXT_942 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect"; >- protected final String TEXT_943 = "TargetCommand("; >- protected final String TEXT_944 = " edge, "; >- protected final String TEXT_945 = " newTarget) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newTarget = newTarget;" + NL + "\t\t\tthis.oldTarget = edge.getTarget();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {"; >- protected final String TEXT_946 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal "; >- protected final String TEXT_947 = " domainModelEditDomain = "; >- protected final String TEXT_948 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t"; >- protected final String TEXT_949 = " command = new "; >- protected final String TEXT_950 = "() {" + NL + "\t\t\t\tprivate "; >- protected final String TEXT_951 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew WrappingCommand(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();"; >- protected final String TEXT_952 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;"; >- protected final String TEXT_953 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {"; >- protected final String TEXT_954 = NL; >- protected final String TEXT_955 = NL + "\t\t\tif(!"; >- protected final String TEXT_956 = ".canCreateLink("; >- protected final String TEXT_957 = ", "; >- protected final String TEXT_958 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_959 = NL + "\t\t\treturn true;"; >- protected final String TEXT_960 = NL; >- protected final String TEXT_961 = NL + "\t\t\tif(!"; >- protected final String TEXT_962 = ".canCreateLink("; >- protected final String TEXT_963 = ", "; >- protected final String TEXT_964 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_965 = NL + "\t\t\treturn true;"; >- protected final String TEXT_966 = NL + "\t\t\treturn false;"; >- protected final String TEXT_967 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_968 = " createReconnectCommand() {" + NL + "\t\t\t"; >- protected final String TEXT_969 = " editingDomain = "; >- protected final String TEXT_970 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t"; >- protected final String TEXT_971 = " result = new "; >- protected final String TEXT_972 = "();" + NL + "\t\t\tresult.append(new "; >- protected final String TEXT_973 = "(edge, newTarget));"; >- protected final String TEXT_974 = NL + "\t\t\tresult.append("; >- protected final String TEXT_975 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >- protected final String TEXT_976 = ".eINSTANCE.get"; >- protected final String TEXT_977 = "()," + NL + "\t\t\t\toldTarget.getElement()));" + NL + "\t\t\tresult.append("; >- protected final String TEXT_978 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >- protected final String TEXT_979 = ".eINSTANCE.get"; >- protected final String TEXT_980 = "()," + NL + "\t\t\t\tnewTarget.getElement()));"; >- protected final String TEXT_981 = NL + "\t\t\tresult.append("; >- protected final String TEXT_982 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >- protected final String TEXT_983 = ".eINSTANCE.get"; >- protected final String TEXT_984 = "()," + NL + "\t\t\t\tnewTarget.getElement()));"; >- protected final String TEXT_985 = NL + "\t\t\tresult.append("; >- protected final String TEXT_986 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), "; >+ protected final String TEXT_909 = NL + "\t\t\treturn false;"; >+ protected final String TEXT_910 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_911 = " createReconnectCommand() {" + NL + "\t\t\t"; >+ protected final String TEXT_912 = " editingDomain = "; >+ protected final String TEXT_913 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t"; >+ protected final String TEXT_914 = " result = new "; >+ protected final String TEXT_915 = "();" + NL + "\t\t\tresult.append(new "; >+ protected final String TEXT_916 = "(edge, newTarget));"; >+ protected final String TEXT_917 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_918 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_919 = ".eINSTANCE.get"; >+ protected final String TEXT_920 = "()," + NL + "\t\t\t\toldTarget.getElement()));" + NL + "\t\t\tresult.append("; >+ protected final String TEXT_921 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_922 = ".eINSTANCE.get"; >+ protected final String TEXT_923 = "()," + NL + "\t\t\t\tnewTarget.getElement()));"; >+ protected final String TEXT_924 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_925 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), "; >+ protected final String TEXT_926 = ".eINSTANCE.get"; >+ protected final String TEXT_927 = "()," + NL + "\t\t\t\tnewTarget.getElement()));"; >+ protected final String TEXT_928 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_929 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), "; >+ protected final String TEXT_930 = ".eINSTANCE.get"; >+ protected final String TEXT_931 = "(), oldTarget.getElement()));" + NL + "\t\t\tresult.append("; >+ protected final String TEXT_932 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), "; >+ protected final String TEXT_933 = ".eINSTANCE.get"; >+ protected final String TEXT_934 = "(), newTarget.getElement()));"; >+ protected final String TEXT_935 = NL + "\t\t\tresult.append("; >+ protected final String TEXT_936 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), "; >+ protected final String TEXT_937 = ".eINSTANCE.get"; >+ protected final String TEXT_938 = "(), newTarget.getElement()));"; >+ protected final String TEXT_939 = NL + "\t\t\treturn result;" + NL + "\t\t}"; >+ protected final String TEXT_940 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */"; >+ protected final String TEXT_941 = NL; >+ protected final String TEXT_942 = NL + "\t\t\tprivate "; >+ protected final String TEXT_943 = " createDomainModelRemoveCommand("; >+ protected final String TEXT_944 = " editingDomain) {"; >+ protected final String TEXT_945 = NL + "\t\t\t\t"; >+ protected final String TEXT_946 = " result = new "; >+ protected final String TEXT_947 = "();"; >+ protected final String TEXT_948 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_949 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_950 = ".getElement().eContainer(), "; >+ protected final String TEXT_951 = ".getElement().eContainmentFeature(), "; >+ protected final String TEXT_952 = ".getElement()));"; >+ protected final String TEXT_953 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_954 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_955 = ".getElement().eContainer(), "; >+ protected final String TEXT_956 = ".getElement().eContainmentFeature(), "; >+ protected final String TEXT_957 = ".UNSET_VALUE));"; >+ protected final String TEXT_958 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_959 = ".INSTANCE;"; >+ protected final String TEXT_960 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_961 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_962 = ".getElement().eContainer(), "; >+ protected final String TEXT_963 = ".eINSTANCE.get"; >+ protected final String TEXT_964 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_965 = ".getElement()));"; >+ protected final String TEXT_966 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_967 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_968 = ".getElement().eContainer(), "; >+ protected final String TEXT_969 = ".eINSTANCE.get"; >+ protected final String TEXT_970 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_971 = ".UNSET_VALUE));"; >+ protected final String TEXT_972 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_973 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_974 = ".getElement(), "; >+ protected final String TEXT_975 = ".eINSTANCE.get"; >+ protected final String TEXT_976 = "(), "; >+ protected final String TEXT_977 = ".getSource().getElement()));"; >+ protected final String TEXT_978 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_979 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_980 = ".getElement(), "; >+ protected final String TEXT_981 = ".eINSTANCE.get"; >+ protected final String TEXT_982 = "(), "; >+ protected final String TEXT_983 = ".UNSET_VALUE));"; >+ protected final String TEXT_984 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_985 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_986 = ".getElement(), "; > protected final String TEXT_987 = ".eINSTANCE.get"; >- protected final String TEXT_988 = "(), oldTarget.getElement()));" + NL + "\t\t\tresult.append("; >- protected final String TEXT_989 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), "; >- protected final String TEXT_990 = ".eINSTANCE.get"; >- protected final String TEXT_991 = "(), newTarget.getElement()));"; >- protected final String TEXT_992 = NL + "\t\t\tresult.append("; >- protected final String TEXT_993 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), "; >- protected final String TEXT_994 = ".eINSTANCE.get"; >- protected final String TEXT_995 = "(), newTarget.getElement()));"; >- protected final String TEXT_996 = NL + "\t\t\treturn result;" + NL + "\t\t}"; >- protected final String TEXT_997 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */"; >- protected final String TEXT_998 = NL; >- protected final String TEXT_999 = NL + "\t\t\tprivate "; >- protected final String TEXT_1000 = " createDomainModelRemoveCommand("; >- protected final String TEXT_1001 = " editingDomain) {"; >- protected final String TEXT_1002 = NL + "\t\t\t\t"; >- protected final String TEXT_1003 = " result = new "; >- protected final String TEXT_1004 = "();"; >- protected final String TEXT_1005 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1006 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1007 = ".getElement().eContainer(), "; >- protected final String TEXT_1008 = ".getElement().eContainmentFeature(), "; >- protected final String TEXT_1009 = ".getElement()));"; >- protected final String TEXT_1010 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1011 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1012 = ".getElement().eContainer(), "; >- protected final String TEXT_1013 = ".getElement().eContainmentFeature(), "; >- protected final String TEXT_1014 = ".UNSET_VALUE));"; >- protected final String TEXT_1015 = NL + "\t\t\t\treturn "; >- protected final String TEXT_1016 = ".INSTANCE;"; >- protected final String TEXT_1017 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1018 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1019 = ".getElement().eContainer(), "; >- protected final String TEXT_1020 = ".eINSTANCE.get"; >- protected final String TEXT_1021 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1022 = ".getElement()));"; >- protected final String TEXT_1023 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1024 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1025 = ".getElement().eContainer(), "; >- protected final String TEXT_1026 = ".eINSTANCE.get"; >- protected final String TEXT_1027 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1028 = ".UNSET_VALUE));"; >- protected final String TEXT_1029 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1030 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1031 = ".getElement(), "; >- protected final String TEXT_1032 = ".eINSTANCE.get"; >- protected final String TEXT_1033 = "(), "; >- protected final String TEXT_1034 = ".getSource().getElement()));"; >- protected final String TEXT_1035 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1036 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1037 = ".getElement(), "; >- protected final String TEXT_1038 = ".eINSTANCE.get"; >- protected final String TEXT_1039 = "(), "; >- protected final String TEXT_1040 = ".UNSET_VALUE));"; >- protected final String TEXT_1041 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1042 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1043 = ".getElement(), "; >- protected final String TEXT_1044 = ".eINSTANCE.get"; >- protected final String TEXT_1045 = "(), "; >- protected final String TEXT_1046 = ".getTarget().getElement()));"; >- protected final String TEXT_1047 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_1048 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1049 = ".getElement(), "; >- protected final String TEXT_1050 = ".eINSTANCE.get"; >- protected final String TEXT_1051 = "(), "; >- protected final String TEXT_1052 = ".UNSET_VALUE));"; >- protected final String TEXT_1053 = NL + "\t\t\t\treturn result;"; >- protected final String TEXT_1054 = NL + "\t\t\t\treturn "; >- protected final String TEXT_1055 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1056 = ".getSource().getElement(), "; >- protected final String TEXT_1057 = ".eINSTANCE.get"; >- protected final String TEXT_1058 = "(), "; >- protected final String TEXT_1059 = ".getTarget().getElement());"; >- protected final String TEXT_1060 = NL + "\t\t\t\treturn "; >- protected final String TEXT_1061 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_1062 = ".getSource().getElement(), "; >- protected final String TEXT_1063 = ".eINSTANCE.get"; >- protected final String TEXT_1064 = "(), "; >- protected final String TEXT_1065 = ".UNSET_VALUE);"; >- protected final String TEXT_1066 = NL + "\t\t\t}"; >- protected final String TEXT_1067 = NL + "\t}" + NL; >- protected final String TEXT_1068 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; >- protected final String TEXT_1069 = "Command extends "; >- protected final String TEXT_1070 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >- protected final String TEXT_1071 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >- protected final String TEXT_1072 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >- protected final String TEXT_1073 = " createdEdge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >- protected final String TEXT_1074 = "Command("; >- protected final String TEXT_1075 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof "; >- protected final String TEXT_1076 = ") {" + NL + "\t\t\t\tsource = ("; >- protected final String TEXT_1077 = ")requestEx.getSourceEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\tsource = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (requestEx.getTargetEditPart().getModel() instanceof "; >- protected final String TEXT_1078 = ") {" + NL + "\t\t\t\ttarget = ("; >- protected final String TEXT_1079 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\ttarget = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (source == null || target == null) {" + NL + "\t\t\t\tcreatedEdge = null;" + NL + "\t\t\t\tdomainModelAddCommand = "; >- protected final String TEXT_1080 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = "; >- protected final String TEXT_1081 = ".eINSTANCE.createEdge();"; >- protected final String TEXT_1082 = NL + "\t\t\t"; >- protected final String TEXT_1083 = " createdDomainElement = "; >- protected final String TEXT_1084 = ".eINSTANCE.create"; >- protected final String TEXT_1085 = "();" + NL + "\t\t\tcreatedEdge.setElement("; >- protected final String TEXT_1086 = "("; >- protected final String TEXT_1087 = ") "; >- protected final String TEXT_1088 = "createdDomainElement);" + NL + "\t\t\t"; >- protected final String TEXT_1089 = NL + "\t\t\t"; >- protected final String TEXT_1090 = "."; >- protected final String TEXT_1091 = ".initializeElement("; >- protected final String TEXT_1092 = "("; >- protected final String TEXT_1093 = ") "; >- protected final String TEXT_1094 = "createdDomainElement);"; >- protected final String TEXT_1095 = NL + "\t\t\tcreatedEdge.setElement(null);"; >- protected final String TEXT_1096 = NL + "\t\t\t"; >- protected final String TEXT_1097 = ".decorateView(createdEdge);" + NL + "\t\t\t"; >- protected final String TEXT_1098 = " domainModelEditDomain = "; >- protected final String TEXT_1099 = ".getEditingDomain(source.getDiagram().getElement());"; >- protected final String TEXT_1100 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();"; >- protected final String TEXT_1101 = NL + "\t\t\t"; >- protected final String TEXT_1102 = " container = getRelationshipContainer(source.getElement(), "; >- protected final String TEXT_1103 = ".eINSTANCE.get"; >- protected final String TEXT_1104 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\tdomainModelAddCommand = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_1105 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, "; >- protected final String TEXT_1106 = ".eINSTANCE.get"; >- protected final String TEXT_1107 = "(), createdDomainElement));"; >- protected final String TEXT_1108 = NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_1109 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, "; >- protected final String TEXT_1110 = ".eINSTANCE.get"; >- protected final String TEXT_1111 = "(), createdDomainElement));"; >- protected final String TEXT_1112 = NL; >- protected final String TEXT_1113 = NL + "\t\tif ("; >- protected final String TEXT_1114 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_1115 = NL + "\t\t}"; >- protected final String TEXT_1116 = NL + "\t\tif ("; >- protected final String TEXT_1117 = ".size() >= "; >- protected final String TEXT_1118 = ".eINSTANCE.get"; >- protected final String TEXT_1119 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_1120 = NL + "\t\t}"; >- protected final String TEXT_1121 = NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_1122 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >- protected final String TEXT_1123 = ".eINSTANCE.get"; >- protected final String TEXT_1124 = "(), source.getElement()));"; >- protected final String TEXT_1125 = NL; >- protected final String TEXT_1126 = NL + "\t\tif ("; >- protected final String TEXT_1127 = " != null) {" + NL + "\t\t\t"; >- protected final String TEXT_1128 = NL + "\t\t}"; >- protected final String TEXT_1129 = NL + "\t\tif ("; >- protected final String TEXT_1130 = ".size() >= "; >- protected final String TEXT_1131 = ".eINSTANCE.get"; >- protected final String TEXT_1132 = ".getUpperBound()) {" + NL + "\t\t\t"; >- protected final String TEXT_1133 = NL + "\t\t}"; >- protected final String TEXT_1134 = NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_1135 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >- protected final String TEXT_1136 = ".eINSTANCE.get"; >- protected final String TEXT_1137 = "(), target.getElement()));"; >- protected final String TEXT_1138 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;"; >- protected final String TEXT_1139 = NL + "\t\t\tdomainModelAddCommand = "; >- protected final String TEXT_1140 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t"; >- protected final String TEXT_1141 = ".eINSTANCE.get"; >- protected final String TEXT_1142 = "(), target.getElement());"; >- protected final String TEXT_1143 = NL + "\t\t}" + NL; >- protected final String TEXT_1144 = NL; >- protected final String TEXT_1145 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >- protected final String TEXT_1146 = " getRelationshipContainer("; >- protected final String TEXT_1147 = " element, "; >- protected final String TEXT_1148 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >- protected final String TEXT_1149 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\tif (source == null || target == null || createdEdge == null || domainModelAddCommand == null || !domainModelAddCommand.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_1150 = NL; >- protected final String TEXT_1151 = NL + "\t\t\tif(!"; >- protected final String TEXT_1152 = ".canCreateLink("; >- protected final String TEXT_1153 = ", "; >- protected final String TEXT_1154 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >- protected final String TEXT_1155 = NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tsource.getDiagram().insertEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(source);" + NL + "\t\t\tcreatedEdge.setTarget(target);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t\tsource.getDiagram().removeEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(null);" + NL + "\t\t\tcreatedEdge.setTarget(null);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >- protected final String TEXT_1156 = NL; >- protected final String TEXT_1157 = NL; >- protected final String TEXT_1158 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_1159 = NL + "}"; >- protected final String TEXT_1160 = NL; >+ protected final String TEXT_988 = "(), "; >+ protected final String TEXT_989 = ".getTarget().getElement()));"; >+ protected final String TEXT_990 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_991 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_992 = ".getElement(), "; >+ protected final String TEXT_993 = ".eINSTANCE.get"; >+ protected final String TEXT_994 = "(), "; >+ protected final String TEXT_995 = ".UNSET_VALUE));"; >+ protected final String TEXT_996 = NL + "\t\t\t\treturn result;"; >+ protected final String TEXT_997 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_998 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_999 = ".getSource().getElement(), "; >+ protected final String TEXT_1000 = ".eINSTANCE.get"; >+ protected final String TEXT_1001 = "(), "; >+ protected final String TEXT_1002 = ".getTarget().getElement());"; >+ protected final String TEXT_1003 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_1004 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_1005 = ".getSource().getElement(), "; >+ protected final String TEXT_1006 = ".eINSTANCE.get"; >+ protected final String TEXT_1007 = "(), "; >+ protected final String TEXT_1008 = ".UNSET_VALUE);"; >+ protected final String TEXT_1009 = NL + "\t\t\t}"; >+ protected final String TEXT_1010 = NL + "\t}" + NL; >+ protected final String TEXT_1011 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; >+ protected final String TEXT_1012 = "Command extends "; >+ protected final String TEXT_1013 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >+ protected final String TEXT_1014 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >+ protected final String TEXT_1015 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >+ protected final String TEXT_1016 = " createdEdge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >+ protected final String TEXT_1017 = "Command("; >+ protected final String TEXT_1018 = " requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof "; >+ protected final String TEXT_1019 = ") {" + NL + "\t\t\t\tsource = ("; >+ protected final String TEXT_1020 = ")requestEx.getSourceEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\tsource = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (requestEx.getTargetEditPart().getModel() instanceof "; >+ protected final String TEXT_1021 = ") {" + NL + "\t\t\t\ttarget = ("; >+ protected final String TEXT_1022 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\ttarget = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (source == null || target == null) {" + NL + "\t\t\t\tcreatedEdge = null;" + NL + "\t\t\t\tdomainModelAddCommand = "; >+ protected final String TEXT_1023 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = "; >+ protected final String TEXT_1024 = ".eINSTANCE.createEdge();"; >+ protected final String TEXT_1025 = NL + "\t\t\t"; >+ protected final String TEXT_1026 = " createdDomainElement = "; >+ protected final String TEXT_1027 = ".eINSTANCE.create"; >+ protected final String TEXT_1028 = "();" + NL + "\t\t\tcreatedEdge.setElement("; >+ protected final String TEXT_1029 = "("; >+ protected final String TEXT_1030 = ") "; >+ protected final String TEXT_1031 = "createdDomainElement);" + NL + "\t\t\t"; >+ protected final String TEXT_1032 = NL + "\t\t\t"; >+ protected final String TEXT_1033 = "."; >+ protected final String TEXT_1034 = ".initializeElement("; >+ protected final String TEXT_1035 = "("; >+ protected final String TEXT_1036 = ") "; >+ protected final String TEXT_1037 = "createdDomainElement);"; >+ protected final String TEXT_1038 = NL + "\t\t\tcreatedEdge.setElement(null);"; >+ protected final String TEXT_1039 = NL + "\t\t\t"; >+ protected final String TEXT_1040 = ".decorateView(createdEdge);" + NL + "\t\t\t"; >+ protected final String TEXT_1041 = " domainModelEditDomain = "; >+ protected final String TEXT_1042 = ".getEditingDomain(source.getDiagram().getElement());"; >+ protected final String TEXT_1043 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();"; >+ protected final String TEXT_1044 = NL + "\t\t\t"; >+ protected final String TEXT_1045 = " container = getRelationshipContainer(source.getElement(), "; >+ protected final String TEXT_1046 = ".eINSTANCE.get"; >+ protected final String TEXT_1047 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\tdomainModelAddCommand = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_1048 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, "; >+ protected final String TEXT_1049 = ".eINSTANCE.get"; >+ protected final String TEXT_1050 = "(), createdDomainElement));"; >+ protected final String TEXT_1051 = NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_1052 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, "; >+ protected final String TEXT_1053 = ".eINSTANCE.get"; >+ protected final String TEXT_1054 = "(), createdDomainElement));"; >+ protected final String TEXT_1055 = NL; >+ protected final String TEXT_1056 = NL + "\t\tif ("; >+ protected final String TEXT_1057 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_1058 = NL + "\t\t}"; >+ protected final String TEXT_1059 = NL + "\t\tif ("; >+ protected final String TEXT_1060 = ".size() >= "; >+ protected final String TEXT_1061 = ".eINSTANCE.get"; >+ protected final String TEXT_1062 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_1063 = NL + "\t\t}"; >+ protected final String TEXT_1064 = NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_1065 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >+ protected final String TEXT_1066 = ".eINSTANCE.get"; >+ protected final String TEXT_1067 = "(), source.getElement()));"; >+ protected final String TEXT_1068 = NL; >+ protected final String TEXT_1069 = NL + "\t\tif ("; >+ protected final String TEXT_1070 = " != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_1071 = NL + "\t\t}"; >+ protected final String TEXT_1072 = NL + "\t\tif ("; >+ protected final String TEXT_1073 = ".size() >= "; >+ protected final String TEXT_1074 = ".eINSTANCE.get"; >+ protected final String TEXT_1075 = ".getUpperBound()) {" + NL + "\t\t\t"; >+ protected final String TEXT_1076 = NL + "\t\t}"; >+ protected final String TEXT_1077 = NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_1078 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >+ protected final String TEXT_1079 = ".eINSTANCE.get"; >+ protected final String TEXT_1080 = "(), target.getElement()));"; >+ protected final String TEXT_1081 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;"; >+ protected final String TEXT_1082 = NL + "\t\t\tdomainModelAddCommand = "; >+ protected final String TEXT_1083 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t"; >+ protected final String TEXT_1084 = ".eINSTANCE.get"; >+ protected final String TEXT_1085 = "(), target.getElement());"; >+ protected final String TEXT_1086 = NL + "\t\t}" + NL; >+ protected final String TEXT_1087 = NL; >+ protected final String TEXT_1088 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_1089 = " getRelationshipContainer("; >+ protected final String TEXT_1090 = " element, "; >+ protected final String TEXT_1091 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >+ protected final String TEXT_1092 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\tif (source == null || target == null || createdEdge == null || domainModelAddCommand == null || !domainModelAddCommand.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_1093 = NL; >+ protected final String TEXT_1094 = NL + "\t\t\tif(!"; >+ protected final String TEXT_1095 = ".canCreateLink("; >+ protected final String TEXT_1096 = ", "; >+ protected final String TEXT_1097 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; >+ protected final String TEXT_1098 = NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tsource.getDiagram().insertEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(source);" + NL + "\t\t\tcreatedEdge.setTarget(target);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t\tsource.getDiagram().removeEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(null);" + NL + "\t\t\tcreatedEdge.setTarget(null);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >+ protected final String TEXT_1099 = NL; >+ protected final String TEXT_1100 = NL; >+ protected final String TEXT_1101 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_1102 = NL + "}"; >+ protected final String TEXT_1103 = NL; > > public String generate(Object argument) > { >@@ -1191,7 +1134,6 @@ > boolean isXYLayout = ViewmapLayoutTypeHelper.getSharedInstance().isStoringChildPositions(genNode); > final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; > importManager.registerInnerClass("LinkNotationModelRefresher"); //from linkNotationModelRefresher.jetinc >-importManager.registerInnerClass("LinkDescriptor"); //from linkNotationModelRefresher.jetinc > > stringBuffer.append(TEXT_1); > stringBuffer.append(TEXT_2); >@@ -1442,27 +1384,27 @@ > stringBuffer.append(TEXT_24); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.NodeEditPart")); > stringBuffer.append(TEXT_25); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_26); > { > GenCommonBase genCommonBase = genNode; >- stringBuffer.append(TEXT_26); > stringBuffer.append(TEXT_27); >- stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_28); >- } >+ stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_29); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ } > stringBuffer.append(TEXT_30); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_31); >- stringBuffer.append(genNode.getEditPartClassName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_32); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(genNode.getEditPartClassName()); > stringBuffer.append(TEXT_33); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_34); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_35); > stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_37); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_38); >@@ -1470,28 +1412,32 @@ > stringBuffer.append(TEXT_39); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_40); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_41); > stringBuffer.append(TEXT_42); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_43); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_44); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); > stringBuffer.append(TEXT_45); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_46); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); > stringBuffer.append(TEXT_47); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_48); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_49); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_50); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_51); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); > stringBuffer.append(TEXT_52); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_53); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_54); > > { > TypeModelFacet facet = genNode.getModelFacet(); >@@ -1499,166 +1445,166 @@ > GenFeature containmentFeature = facet.getContainmentMetaFeature(); > if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { > >- stringBuffer.append(TEXT_53); >+ stringBuffer.append(TEXT_55); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_54); >+ stringBuffer.append(TEXT_56); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_55); >+ stringBuffer.append(TEXT_57); > > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_56); >+ stringBuffer.append(TEXT_58); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_57); >+ stringBuffer.append(TEXT_59); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_58); >+ stringBuffer.append(TEXT_60); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_59); >+ stringBuffer.append(TEXT_61); > > } else { > >- stringBuffer.append(TEXT_60); >+ stringBuffer.append(TEXT_62); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_61); >+ stringBuffer.append(TEXT_63); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_62); >+ stringBuffer.append(TEXT_64); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_65); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_64); >+ stringBuffer.append(TEXT_66); > > } > > > if (childFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_65); >+ stringBuffer.append(TEXT_67); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_66); >+ stringBuffer.append(TEXT_68); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_67); >+ stringBuffer.append(TEXT_69); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_68); >+ stringBuffer.append(TEXT_70); > > } else { > >- stringBuffer.append(TEXT_69); >+ stringBuffer.append(TEXT_71); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_70); >+ stringBuffer.append(TEXT_72); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_73); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_72); >+ stringBuffer.append(TEXT_74); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_75); > > } > >- stringBuffer.append(TEXT_74); >+ stringBuffer.append(TEXT_76); > > } else { > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_75); >+ stringBuffer.append(TEXT_77); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_76); >+ stringBuffer.append(TEXT_78); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_77); >+ stringBuffer.append(TEXT_79); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_78); >+ stringBuffer.append(TEXT_80); > > } else { > >- stringBuffer.append(TEXT_79); >+ stringBuffer.append(TEXT_81); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_80); >+ stringBuffer.append(TEXT_82); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_81); >+ stringBuffer.append(TEXT_83); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_82); >+ stringBuffer.append(TEXT_84); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_83); >+ stringBuffer.append(TEXT_85); > > } > } > >- stringBuffer.append(TEXT_84); >+ stringBuffer.append(TEXT_86); > > } /*restrict local vars used in component edit policy*/ > >- stringBuffer.append(TEXT_85); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >- stringBuffer.append(TEXT_86); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy")); > stringBuffer.append(TEXT_87); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_88); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy")); > stringBuffer.append(TEXT_89); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_90); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateRequest")); > stringBuffer.append(TEXT_91); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_92); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_93); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); > stringBuffer.append(TEXT_94); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_95); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >- stringBuffer.append(TEXT_96); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_96); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_97); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ResizableEditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_98); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_99); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ResizableEditPolicy")); > stringBuffer.append(TEXT_100); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_101); >- stringBuffer.append(genNode.getEditPartClassName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_102); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); > stringBuffer.append(TEXT_103); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy")); >+ stringBuffer.append(genNode.getEditPartClassName()); > stringBuffer.append(TEXT_104); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_105); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy")); > stringBuffer.append(TEXT_106); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(TEXT_107); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest")); >+ stringBuffer.append(TEXT_108); > > if (!myHelper.hasIncomingLinks()) { > >- stringBuffer.append(TEXT_107); >+ stringBuffer.append(TEXT_109); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_108); >+ stringBuffer.append(TEXT_110); > > } else { > >- stringBuffer.append(TEXT_109); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); >- stringBuffer.append(TEXT_110); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_111); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); > stringBuffer.append(TEXT_112); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_113); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_114); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_115); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_116); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); > stringBuffer.append(TEXT_117); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_118); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_119); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(TEXT_120); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(TEXT_121); > > for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) { > GenLink genLink = (GenLink)it.next(); >@@ -1682,58 +1628,60 @@ > continue; > } > >- stringBuffer.append(TEXT_120); >+ stringBuffer.append(TEXT_122); > stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_121); >+ stringBuffer.append(TEXT_123); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_122); >+ stringBuffer.append(TEXT_124); > > } > >- stringBuffer.append(TEXT_123); >+ stringBuffer.append(TEXT_125); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_124); >+ stringBuffer.append(TEXT_126); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_127); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_125); >+ stringBuffer.append(TEXT_128); > > } > >- stringBuffer.append(TEXT_126); >+ stringBuffer.append(TEXT_129); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_127); >+ stringBuffer.append(TEXT_130); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest")); >- stringBuffer.append(TEXT_128); >+ stringBuffer.append(TEXT_131); > > if (!myHelper.hasOutgoingLinks()) { > >- stringBuffer.append(TEXT_129); >+ stringBuffer.append(TEXT_132); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_130); >+ stringBuffer.append(TEXT_133); > > } else { > >- stringBuffer.append(TEXT_131); >+ stringBuffer.append(TEXT_134); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); >- stringBuffer.append(TEXT_132); >+ stringBuffer.append(TEXT_135); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_133); >+ stringBuffer.append(TEXT_136); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_134); >+ stringBuffer.append(TEXT_137); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_135); >+ stringBuffer.append(TEXT_138); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_136); >+ stringBuffer.append(TEXT_139); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_137); >+ stringBuffer.append(TEXT_140); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_138); >+ stringBuffer.append(TEXT_141); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_139); >+ stringBuffer.append(TEXT_142); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_140); >+ stringBuffer.append(TEXT_143); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_141); >+ stringBuffer.append(TEXT_144); > > for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) { > GenLink genLink = (GenLink)it.next(); >@@ -1759,40 +1707,42 @@ > continue; > } > >- stringBuffer.append(TEXT_142); >+ stringBuffer.append(TEXT_145); > stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_143); >+ stringBuffer.append(TEXT_146); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_144); >+ stringBuffer.append(TEXT_147); > > } > >- stringBuffer.append(TEXT_145); >+ stringBuffer.append(TEXT_148); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_146); >+ stringBuffer.append(TEXT_149); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_150); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_147); >+ stringBuffer.append(TEXT_151); > > } > >- stringBuffer.append(TEXT_148); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_149); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")); >- stringBuffer.append(TEXT_150); >- if (palette != null && myHelper.hasOutgoingLinks()) { >- stringBuffer.append(TEXT_151); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); > stringBuffer.append(TEXT_152); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_153); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")); > stringBuffer.append(TEXT_154); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ if (palette != null && myHelper.hasOutgoingLinks()) { > stringBuffer.append(TEXT_155); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); > stringBuffer.append(TEXT_156); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_157); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_158); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_159); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_160); > > for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) { > GenLink genLink = (GenLink)it.next(); >@@ -1818,40 +1768,42 @@ > continue; > } > >- stringBuffer.append(TEXT_157); >+ stringBuffer.append(TEXT_161); > stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_158); >+ stringBuffer.append(TEXT_162); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_159); >+ stringBuffer.append(TEXT_163); > > } > >- stringBuffer.append(TEXT_160); >+ stringBuffer.append(TEXT_164); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_161); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_162); >- }/*when there's palette*/ >- stringBuffer.append(TEXT_163); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_164); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")); > stringBuffer.append(TEXT_165); >- if (palette != null && myHelper.hasIncomingLinks()) { >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_166); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_167); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ }/*when there's palette*/ > stringBuffer.append(TEXT_168); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_169); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")); > stringBuffer.append(TEXT_170); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ if (palette != null && myHelper.hasIncomingLinks()) { > stringBuffer.append(TEXT_171); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_172); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_173); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_174); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_175); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_176); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_177); > > for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) { > GenLink genLink = (GenLink)it.next(); >@@ -1875,46 +1827,48 @@ > continue; > } > >- stringBuffer.append(TEXT_173); >+ stringBuffer.append(TEXT_178); > stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_174); >+ stringBuffer.append(TEXT_179); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_175); >+ stringBuffer.append(TEXT_180); > > } > >- stringBuffer.append(TEXT_176); >+ stringBuffer.append(TEXT_181); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_177); >+ stringBuffer.append(TEXT_182); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_183); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_178); >+ stringBuffer.append(TEXT_184); > }/*when there's palette*/ >- stringBuffer.append(TEXT_179); >+ stringBuffer.append(TEXT_185); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_180); >+ stringBuffer.append(TEXT_186); > > if (myHelper.containsLinks()) { > >- stringBuffer.append(TEXT_181); >+ stringBuffer.append(TEXT_187); > > } > >- stringBuffer.append(TEXT_182); >+ stringBuffer.append(TEXT_188); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_183); >+ stringBuffer.append(TEXT_189); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_184); >+ stringBuffer.append(TEXT_190); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); >- stringBuffer.append(TEXT_185); >+ stringBuffer.append(TEXT_191); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.StackLayout")); >- stringBuffer.append(TEXT_186); >+ stringBuffer.append(TEXT_192); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_187); >+ stringBuffer.append(TEXT_193); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_188); >+ stringBuffer.append(TEXT_194); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_195); > > String figureQualifiedClassName = null; > Viewmap viewmap = genNode.getViewmap(); >@@ -1924,98 +1878,98 @@ > figureQualifiedClassName = "org.eclipse.draw2d.RectangleFigure"; > } > >- stringBuffer.append(TEXT_190); >+ stringBuffer.append(TEXT_196); > stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); >- stringBuffer.append(TEXT_191); >+ stringBuffer.append(TEXT_197); > if (isXYLayout) { >- stringBuffer.append(TEXT_192); >+ stringBuffer.append(TEXT_198); > } /* use flow layout*/ >- stringBuffer.append(TEXT_193); >+ stringBuffer.append(TEXT_199); > } else if (viewmap instanceof SnippetViewmap) { >- stringBuffer.append(TEXT_194); >+ stringBuffer.append(TEXT_200); > stringBuffer.append(((SnippetViewmap) viewmap).getBody()); >- stringBuffer.append(TEXT_195); >+ stringBuffer.append(TEXT_201); > } else if (viewmap instanceof InnerClassViewmap) { > figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName(); > >- stringBuffer.append(TEXT_196); >+ stringBuffer.append(TEXT_202); > stringBuffer.append(figureQualifiedClassName); >- stringBuffer.append(TEXT_197); >+ stringBuffer.append(TEXT_203); > stringBuffer.append(figureQualifiedClassName); >- stringBuffer.append(TEXT_198); >+ stringBuffer.append(TEXT_204); > if (!genNode.getChildNodes().isEmpty() && isXYLayout) { /*otherwise, leave to figure's default value*/ >- stringBuffer.append(TEXT_199); >+ stringBuffer.append(TEXT_205); > } >- stringBuffer.append(TEXT_200); >+ stringBuffer.append(TEXT_206); > } >- stringBuffer.append(TEXT_201); >+ stringBuffer.append(TEXT_207); > if (figureQualifiedClassName != null) { >- stringBuffer.append(TEXT_202); >+ stringBuffer.append(TEXT_208); > stringBuffer.append(figureQualifiedClassName); >- stringBuffer.append(TEXT_203); >+ stringBuffer.append(TEXT_209); > stringBuffer.append(figureQualifiedClassName); >- stringBuffer.append(TEXT_204); >+ stringBuffer.append(TEXT_210); > } >- stringBuffer.append(TEXT_205); >+ stringBuffer.append(TEXT_211); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_206); >+ stringBuffer.append(TEXT_212); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_207); >+ stringBuffer.append(TEXT_213); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_208); >+ stringBuffer.append(TEXT_214); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation")); >- stringBuffer.append(TEXT_209); >+ stringBuffer.append(TEXT_215); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); >- stringBuffer.append(TEXT_210); >+ stringBuffer.append(TEXT_216); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); >- stringBuffer.append(TEXT_211); >+ stringBuffer.append(TEXT_217); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout")); >- stringBuffer.append(TEXT_212); >+ stringBuffer.append(TEXT_218); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure")); >- stringBuffer.append(TEXT_213); >+ stringBuffer.append(TEXT_219); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure")); >- stringBuffer.append(TEXT_214); >+ stringBuffer.append(TEXT_220); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_215); >+ stringBuffer.append(TEXT_221); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); >- stringBuffer.append(TEXT_216); >+ stringBuffer.append(TEXT_222); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout")); >- stringBuffer.append(TEXT_217); >+ stringBuffer.append(TEXT_223); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_218); >+ stringBuffer.append(TEXT_224); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_219); >+ stringBuffer.append(TEXT_225); > > if (!isXYLayout) { > String layoutClassName = importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout"); > >- stringBuffer.append(TEXT_220); >+ stringBuffer.append(TEXT_226); > stringBuffer.append(layoutClassName); >- stringBuffer.append(TEXT_221); >+ stringBuffer.append(TEXT_227); > stringBuffer.append(layoutClassName); >- stringBuffer.append(TEXT_222); >+ stringBuffer.append(TEXT_228); > } else { >- stringBuffer.append(TEXT_223); >+ stringBuffer.append(TEXT_229); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout")); >- stringBuffer.append(TEXT_224); >+ stringBuffer.append(TEXT_230); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_225); >+ stringBuffer.append(TEXT_231); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_226); >+ stringBuffer.append(TEXT_232); > } >- stringBuffer.append(TEXT_227); >+ stringBuffer.append(TEXT_233); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_228); >+ stringBuffer.append(TEXT_234); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >- stringBuffer.append(TEXT_229); >+ stringBuffer.append(TEXT_235); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >- stringBuffer.append(TEXT_230); >+ stringBuffer.append(TEXT_236); > > if (myHelper.hasFixedChildren()) { > >- stringBuffer.append(TEXT_231); >+ stringBuffer.append(TEXT_237); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_232); >+ stringBuffer.append(TEXT_238); > > for (Iterator it = myHelper.getInnerFixedLabels(); it.hasNext(); ) { > GenNodeLabel genLabel = (GenNodeLabel) it.next(); >@@ -2023,15 +1977,15 @@ > final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) genLabel.getViewmap(); > final String childSetterName = childViewmap.getSetterName() == null ? "setLabel" : childViewmap.getSetterName(); > >- stringBuffer.append(TEXT_233); >+ stringBuffer.append(TEXT_239); > stringBuffer.append(labelEditPart); >- stringBuffer.append(TEXT_234); >+ stringBuffer.append(TEXT_240); > stringBuffer.append(labelEditPart); >- stringBuffer.append(TEXT_235); >+ stringBuffer.append(TEXT_241); > stringBuffer.append(childSetterName); >- stringBuffer.append(TEXT_236); >+ stringBuffer.append(TEXT_242); > stringBuffer.append(childViewmap.getGetterName()); >- stringBuffer.append(TEXT_237); >+ stringBuffer.append(TEXT_243); > > } > >@@ -2040,19 +1994,19 @@ > final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) next.getViewmap(); > String compartmentEditPartFQN = importManager.getImportedName(next.getEditPartQualifiedClassName()); > >- stringBuffer.append(TEXT_238); >+ stringBuffer.append(TEXT_244); > stringBuffer.append(compartmentEditPartFQN); >- stringBuffer.append(TEXT_239); >+ stringBuffer.append(TEXT_245); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_240); >+ stringBuffer.append(TEXT_246); > stringBuffer.append(childViewmap.getGetterName()); >- stringBuffer.append(TEXT_241); >+ stringBuffer.append(TEXT_247); > stringBuffer.append(compartmentEditPartFQN); >- stringBuffer.append(TEXT_242); >+ stringBuffer.append(TEXT_248); > > } // for pinned compartments > >- stringBuffer.append(TEXT_243); >+ stringBuffer.append(TEXT_249); > > //XXX: ignore labels assuming that they never may be removed > for (Iterator it = myHelper.getPinnedCompartments(); it.hasNext(); ) { >@@ -2060,25 +2014,25 @@ > final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) next.getViewmap(); > String compartmentEditPartFQN = importManager.getImportedName(next.getEditPartQualifiedClassName()); > >- stringBuffer.append(TEXT_244); >+ stringBuffer.append(TEXT_250); > stringBuffer.append(compartmentEditPartFQN); >- stringBuffer.append(TEXT_245); >+ stringBuffer.append(TEXT_251); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_246); >+ stringBuffer.append(TEXT_252); > stringBuffer.append(childViewmap.getGetterName()); >- stringBuffer.append(TEXT_247); >+ stringBuffer.append(TEXT_253); > stringBuffer.append(compartmentEditPartFQN); >- stringBuffer.append(TEXT_248); >+ stringBuffer.append(TEXT_254); > > } // for pinned compartments > >- stringBuffer.append(TEXT_249); >+ stringBuffer.append(TEXT_255); > > } // if myHelper.hasFixedChildren() > >- stringBuffer.append(TEXT_250); >+ stringBuffer.append(TEXT_256); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_251); >+ stringBuffer.append(TEXT_257); > > GenNodeLabel firstEditableLabel = null; > for (Iterator it = myHelper.getAllInnerLabels(); it.hasNext(); ) { >@@ -2090,45 +2044,45 @@ > } > if (firstEditableLabel != null) { > >- stringBuffer.append(TEXT_252); >+ stringBuffer.append(TEXT_258); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_253); >+ stringBuffer.append(TEXT_259); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_254); >+ stringBuffer.append(TEXT_260); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_255); >+ stringBuffer.append(TEXT_261); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_256); >+ stringBuffer.append(TEXT_262); > stringBuffer.append(importManager.getImportedName(firstEditableLabel.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_257); >+ stringBuffer.append(TEXT_263); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_258); >+ stringBuffer.append(TEXT_264); > > } > >- stringBuffer.append(TEXT_259); >+ stringBuffer.append(TEXT_265); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >- stringBuffer.append(TEXT_260); >+ stringBuffer.append(TEXT_266); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); >- stringBuffer.append(TEXT_261); >+ stringBuffer.append(TEXT_267); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_262); >+ stringBuffer.append(TEXT_268); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >- stringBuffer.append(TEXT_263); >+ stringBuffer.append(TEXT_269); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >- stringBuffer.append(TEXT_264); >+ stringBuffer.append(TEXT_270); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_265); >+ stringBuffer.append(TEXT_271); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >- stringBuffer.append(TEXT_266); >+ stringBuffer.append(TEXT_272); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_267); >+ stringBuffer.append(TEXT_273); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_268); >+ stringBuffer.append(TEXT_274); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_269); >+ stringBuffer.append(TEXT_275); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_270); >+ stringBuffer.append(TEXT_276); > > for (Iterator it = myHelper.getAllInnerLabels(); it.hasNext(); ) { > GenNodeLabel genLabel = (GenNodeLabel) it.next(); >@@ -2136,129 +2090,117 @@ > continue; > } > >- stringBuffer.append(TEXT_271); >+ stringBuffer.append(TEXT_277); > stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_272); >+ stringBuffer.append(TEXT_278); > > } > >- stringBuffer.append(TEXT_273); >+ stringBuffer.append(TEXT_279); > > if (myHelper.hasExternalLabels()) { > >- stringBuffer.append(TEXT_274); >+ stringBuffer.append(TEXT_280); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_275); >+ stringBuffer.append(TEXT_281); > > for (Iterator externalLabels = myHelper.getExternalLabels(); externalLabels.hasNext();) { > GenNodeLabel next = (GenNodeLabel) externalLabels.next(); > >- stringBuffer.append(TEXT_276); >+ stringBuffer.append(TEXT_282); > stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_277); >+ stringBuffer.append(TEXT_283); > > } > >- stringBuffer.append(TEXT_278); >+ stringBuffer.append(TEXT_284); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_279); >+ stringBuffer.append(TEXT_285); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.LayerManager")); >- stringBuffer.append(TEXT_280); >+ stringBuffer.append(TEXT_286); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.LayerManager")); >- stringBuffer.append(TEXT_281); >+ stringBuffer.append(TEXT_287); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_282); >+ stringBuffer.append(TEXT_288); > > } > if (myHelper.hasExternalLabels() || myHelper.hasFixedChildren()) { > >- stringBuffer.append(TEXT_283); >+ stringBuffer.append(TEXT_289); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_284); >+ stringBuffer.append(TEXT_290); > > if (myHelper.hasExternalLabels()) { > >- stringBuffer.append(TEXT_285); >+ stringBuffer.append(TEXT_291); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_286); >+ stringBuffer.append(TEXT_292); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >- stringBuffer.append(TEXT_287); >+ stringBuffer.append(TEXT_293); > > } > if (myHelper.hasFixedChildren()) { > >- stringBuffer.append(TEXT_288); >+ stringBuffer.append(TEXT_294); > > } > >- stringBuffer.append(TEXT_289); >+ stringBuffer.append(TEXT_295); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_290); >+ stringBuffer.append(TEXT_296); > > if (myHelper.hasExternalLabels()) { > >- stringBuffer.append(TEXT_291); >+ stringBuffer.append(TEXT_297); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_292); >+ stringBuffer.append(TEXT_298); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >- stringBuffer.append(TEXT_293); >+ stringBuffer.append(TEXT_299); > > } > if (myHelper.hasFixedChildren()){ > >- stringBuffer.append(TEXT_294); >+ stringBuffer.append(TEXT_300); > > } > >- stringBuffer.append(TEXT_295); >+ stringBuffer.append(TEXT_301); > > } > > > if (myHelper.hasExternalLabels()) { > >- stringBuffer.append(TEXT_296); >+ stringBuffer.append(TEXT_302); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_297); >+ stringBuffer.append(TEXT_303); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_298); >+ stringBuffer.append(TEXT_304); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_299); >+ stringBuffer.append(TEXT_305); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >- stringBuffer.append(TEXT_300); >+ stringBuffer.append(TEXT_306); > > } > >- stringBuffer.append(TEXT_301); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >- stringBuffer.append(TEXT_302); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); >- stringBuffer.append(TEXT_303); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); >- stringBuffer.append(TEXT_304); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); >- stringBuffer.append(TEXT_305); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >- stringBuffer.append(TEXT_306); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_307); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_308); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); > stringBuffer.append(TEXT_309); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); > stringBuffer.append(TEXT_310); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); > stringBuffer.append(TEXT_311); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); > stringBuffer.append(TEXT_312); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_313); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_314); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_315); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_316); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); > stringBuffer.append(TEXT_317); >@@ -2272,47 +2214,63 @@ > stringBuffer.append(TEXT_321); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); > stringBuffer.append(TEXT_322); >- /*@ include file="adapters/propertySource.javajetinc"*/ >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); > stringBuffer.append(TEXT_323); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); >+ stringBuffer.append(TEXT_324); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(TEXT_325); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(TEXT_326); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(TEXT_327); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(TEXT_328); >+ /*@ include file="adapters/propertySource.javajetinc"*/ >+ stringBuffer.append(TEXT_329); > > if (myHelper.containsLinks()) { > >- stringBuffer.append(TEXT_324); >+ stringBuffer.append(TEXT_330); > > } > >- stringBuffer.append(TEXT_325); >+ stringBuffer.append(TEXT_331); > > if (myHelper.containsLinks()) { > >- stringBuffer.append(TEXT_326); >+ stringBuffer.append(TEXT_332); > > } > >- stringBuffer.append(TEXT_327); >+ stringBuffer.append(TEXT_333); > > { > final String _getViewCode = "getDiagramNode()"; > final String _getDiagramCode = "getDiagramNode().getDiagram()"; > final boolean _includeUncontainedLinks = false; > >- stringBuffer.append(TEXT_328); >+ stringBuffer.append(TEXT_334); > > if (myHelper.containsLinks() || _includeUncontainedLinks) { > >- stringBuffer.append(TEXT_329); >+ stringBuffer.append(TEXT_335); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_330); >+ stringBuffer.append(TEXT_336); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_331); >+ stringBuffer.append(TEXT_337); > stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_332); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetListenerImpl")); >- stringBuffer.append(TEXT_333); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_334); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_335); >+ stringBuffer.append(TEXT_338); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); >+ stringBuffer.append(TEXT_339); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); >+ stringBuffer.append(TEXT_340); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService")); >+ stringBuffer.append(TEXT_341); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher")); >+ stringBuffer.append(TEXT_342); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); >+ stringBuffer.append(TEXT_343); > > boolean hasConstraintsInContainedLinks = false; > for (Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { >@@ -2325,40 +2283,42 @@ > } > if (hasConstraintsInContainedLinks) { > >- stringBuffer.append(TEXT_336); >+ stringBuffer.append(TEXT_344); > stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName()); >- stringBuffer.append(TEXT_337); >+ stringBuffer.append(TEXT_345); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_338); >+ stringBuffer.append(TEXT_346); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_339); >+ stringBuffer.append(TEXT_347); > > } > if (_includeUncontainedLinks) { > >- stringBuffer.append(TEXT_340); >+ stringBuffer.append(TEXT_348); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_341); >+ stringBuffer.append(TEXT_349); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_342); >+ stringBuffer.append(TEXT_350); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_343); >+ stringBuffer.append(TEXT_351); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_344); >+ stringBuffer.append(TEXT_352); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_345); >+ stringBuffer.append(TEXT_353); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_346); >+ stringBuffer.append(TEXT_354); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_347); >+ stringBuffer.append(TEXT_355); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_348); >+ stringBuffer.append(TEXT_356); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_349); >+ stringBuffer.append(TEXT_357); > > } > >- stringBuffer.append(TEXT_350); >+ stringBuffer.append(TEXT_358); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_359); > > { > boolean hasDeclaredFilter = false; >@@ -2371,7 +2331,7 @@ > } > GenFeature _feature = modelFacet.getChildMetaFeature(); > >- stringBuffer.append(TEXT_351); >+ stringBuffer.append(TEXT_360); > > /* > * input: >@@ -2385,30 +2345,32 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_352); >+ stringBuffer.append(TEXT_361); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_353); >+ stringBuffer.append(TEXT_362); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_363); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_354); >+ stringBuffer.append(TEXT_364); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_355); >+ stringBuffer.append(TEXT_365); > > } else { > >- stringBuffer.append(TEXT_356); >+ stringBuffer.append(TEXT_366); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_357); >+ stringBuffer.append(TEXT_367); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_358); >+ stringBuffer.append(TEXT_368); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_359); >+ stringBuffer.append(TEXT_369); > > } > > > _feature = modelFacet.getSourceMetaFeature(); > >- stringBuffer.append(TEXT_360); >+ stringBuffer.append(TEXT_370); > > /* > * input: >@@ -2422,30 +2384,32 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_361); >+ stringBuffer.append(TEXT_371); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_362); >+ stringBuffer.append(TEXT_372); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_373); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_363); >+ stringBuffer.append(TEXT_374); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_364); >+ stringBuffer.append(TEXT_375); > > } else { > >- stringBuffer.append(TEXT_365); >+ stringBuffer.append(TEXT_376); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_366); >+ stringBuffer.append(TEXT_377); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_367); >+ stringBuffer.append(TEXT_378); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_368); >+ stringBuffer.append(TEXT_379); > > } > > > _feature = modelFacet.getTargetMetaFeature(); > >- stringBuffer.append(TEXT_369); >+ stringBuffer.append(TEXT_380); > > /* > * input: >@@ -2459,23 +2423,25 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_370); >+ stringBuffer.append(TEXT_381); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_371); >+ stringBuffer.append(TEXT_382); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_383); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_372); >+ stringBuffer.append(TEXT_384); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_373); >+ stringBuffer.append(TEXT_385); > > } else { > >- stringBuffer.append(TEXT_374); >+ stringBuffer.append(TEXT_386); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_375); >+ stringBuffer.append(TEXT_387); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_376); >+ stringBuffer.append(TEXT_388); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_377); >+ stringBuffer.append(TEXT_389); > > } > >@@ -2485,7 +2451,7 @@ > GenLink nextLink = (GenLink) it.next(); > GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature(); > >- stringBuffer.append(TEXT_378); >+ stringBuffer.append(TEXT_390); > > /* > * input: >@@ -2499,23 +2465,25 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_379); >+ stringBuffer.append(TEXT_391); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_380); >+ stringBuffer.append(TEXT_392); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_393); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_381); >+ stringBuffer.append(TEXT_394); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_382); >+ stringBuffer.append(TEXT_395); > > } else { > >- stringBuffer.append(TEXT_383); >+ stringBuffer.append(TEXT_396); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_384); >+ stringBuffer.append(TEXT_397); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_385); >+ stringBuffer.append(TEXT_398); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_386); >+ stringBuffer.append(TEXT_399); > > } > >@@ -2524,222 +2492,59 @@ > if (hasConstraintsInContainedLinks) { > if (hasDeclaredFilter) { > >- stringBuffer.append(TEXT_387); >+ stringBuffer.append(TEXT_400); > > } else { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_388); >+ stringBuffer.append(TEXT_401); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_402); > > } > } > if (_includeUncontainedLinks) { > if (hasDeclaredFilter) { > >- stringBuffer.append(TEXT_389); >+ stringBuffer.append(TEXT_403); > > } else { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_390); >+ stringBuffer.append(TEXT_404); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_405); > > } > } > if (!hasDeclaredFilter) { > >- stringBuffer.append(TEXT_391); >+ stringBuffer.append(TEXT_406); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_392); >+ stringBuffer.append(TEXT_407); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_408); > > } > } //local declaration of hasDeclaredFilter > >- stringBuffer.append(TEXT_393); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_394); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_395); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetChangeEvent")); >- stringBuffer.append(TEXT_396); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_397); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_398); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_399); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_400); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_401); >- stringBuffer.append(TEXT_402); >- /*inner class*/ >- stringBuffer.append(TEXT_403); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_404); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_405); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_406); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_407); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_408); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); > stringBuffer.append(TEXT_409); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); > stringBuffer.append(TEXT_410); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); > stringBuffer.append(TEXT_411); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); > stringBuffer.append(TEXT_412); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); > stringBuffer.append(TEXT_413); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_414); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_415); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_416); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_417); >- stringBuffer.append(importManager.getImportedName("java.util.Map")); >- stringBuffer.append(TEXT_418); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_419); >- stringBuffer.append(importManager.getImportedName("java.util.Map")); >- stringBuffer.append(TEXT_420); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_421); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_422); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_423); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_424); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_425); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_426); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_427); >- stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_428); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_429); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_430); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_431); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_432); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_433); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_434); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_435); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_436); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_437); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_438); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_439); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_440); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")); >- stringBuffer.append(TEXT_441); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReplaceNotationalElementCommand")); >- stringBuffer.append(TEXT_442); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_443); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_444); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_445); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeSourceCommand")); >- stringBuffer.append(TEXT_446); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_447); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeTargetCommand")); >- stringBuffer.append(TEXT_448); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_449); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_450); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_451); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_452); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_453); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_454); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_455); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_456); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_457); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_458); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_459); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_460); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_461); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_462); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_463); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_464); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_465); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_466); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_467); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_468); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_469); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_470); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_471); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_472); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_473); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_474); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_475); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_476); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_477); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_478); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_479); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_480); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")); >- stringBuffer.append(TEXT_481); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_482); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_483); >+ stringBuffer.append(TEXT_414); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_484); >+ stringBuffer.append(TEXT_415); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_485); >+ stringBuffer.append(TEXT_416); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_486); >+ stringBuffer.append(TEXT_417); > > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); >@@ -2748,37 +2553,37 @@ > continue; > } > >- stringBuffer.append(TEXT_487); >+ stringBuffer.append(TEXT_418); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_488); >+ stringBuffer.append(TEXT_419); > stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_489); >+ stringBuffer.append(TEXT_420); > stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_490); >+ stringBuffer.append(TEXT_421); > > } > for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > >- stringBuffer.append(TEXT_491); >+ stringBuffer.append(TEXT_422); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_492); >+ stringBuffer.append(TEXT_423); > stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_493); >+ stringBuffer.append(TEXT_424); > > } > >- stringBuffer.append(TEXT_494); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")); >- stringBuffer.append(TEXT_495); >+ stringBuffer.append(TEXT_425); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand")); >+ stringBuffer.append(TEXT_426); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_496); >- stringBuffer.append(TEXT_497); >- stringBuffer.append(TEXT_498); >+ stringBuffer.append(TEXT_427); >+ stringBuffer.append(TEXT_428); >+ stringBuffer.append(TEXT_429); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_499); >+ stringBuffer.append(TEXT_430); > stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_500); >+ stringBuffer.append(TEXT_431); > > Map genFeature2genLinkMap = new LinkedHashMap(); > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { >@@ -2801,18 +2606,18 @@ > } > if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) { > >- stringBuffer.append(TEXT_501); >+ stringBuffer.append(TEXT_432); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_502); >+ stringBuffer.append(TEXT_433); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_503); >+ stringBuffer.append(TEXT_434); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_504); >+ stringBuffer.append(TEXT_435); > > } > if (!genFeature2genLinkMap.isEmpty()) { > >- stringBuffer.append(TEXT_505); >+ stringBuffer.append(TEXT_436); > > } > for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) { >@@ -2821,32 +2626,32 @@ > Collection genLinksCollection = (Collection) nextEntry.getValue(); > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_506); >+ stringBuffer.append(TEXT_437); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_507); >+ stringBuffer.append(TEXT_438); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true); >- stringBuffer.append(TEXT_508); >+ stringBuffer.append(TEXT_439); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_509); >+ stringBuffer.append(TEXT_440); > > } else { > >- stringBuffer.append(TEXT_510); >+ stringBuffer.append(TEXT_441); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_511); >+ stringBuffer.append(TEXT_442); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false); >- stringBuffer.append(TEXT_512); >+ stringBuffer.append(TEXT_443); > > } > >- stringBuffer.append(TEXT_513); >+ stringBuffer.append(TEXT_444); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_514); >+ stringBuffer.append(TEXT_445); > > boolean generateSwitch = genLinksCollection.size() != 1; > if (generateSwitch) { > >- stringBuffer.append(TEXT_515); >+ stringBuffer.append(TEXT_446); > > } > for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { >@@ -2854,65 +2659,67 @@ > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet(); > if (generateSwitch) { > >- stringBuffer.append(TEXT_516); >+ stringBuffer.append(TEXT_447); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_517); >+ stringBuffer.append(TEXT_448); > > } else { > >- stringBuffer.append(TEXT_518); >+ stringBuffer.append(TEXT_449); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_519); >+ stringBuffer.append(TEXT_450); > > } > if (modelFacet.getSourceMetaFeature() != null) { > >- stringBuffer.append(TEXT_520); >+ stringBuffer.append(TEXT_451); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_521); >+ stringBuffer.append(TEXT_452); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_522); >+ stringBuffer.append(TEXT_453); > myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false); >- stringBuffer.append(TEXT_523); >+ stringBuffer.append(TEXT_454); > > } else { > >- stringBuffer.append(TEXT_524); >+ stringBuffer.append(TEXT_455); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_525); >+ stringBuffer.append(TEXT_456); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_526); >+ stringBuffer.append(TEXT_457); > > } > if (modelFacet.getTargetMetaFeature() != null) { > >- stringBuffer.append(TEXT_527); >+ stringBuffer.append(TEXT_458); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_528); >+ stringBuffer.append(TEXT_459); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_529); >+ stringBuffer.append(TEXT_460); > myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false); >- stringBuffer.append(TEXT_530); >+ stringBuffer.append(TEXT_461); > > } else { > >- stringBuffer.append(TEXT_531); >+ stringBuffer.append(TEXT_462); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_532); >+ stringBuffer.append(TEXT_463); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_533); >+ stringBuffer.append(TEXT_464); > > } > >- stringBuffer.append(TEXT_534); >+ stringBuffer.append(TEXT_465); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); >+ stringBuffer.append(TEXT_466); > > if (generateSwitch) { > >- stringBuffer.append(TEXT_535); >+ stringBuffer.append(TEXT_467); > > } else { > >- stringBuffer.append(TEXT_536); >+ stringBuffer.append(TEXT_468); > > } > >@@ -2920,12 +2727,12 @@ > } //iterate over genLinksCollection > if (generateSwitch) { > >- stringBuffer.append(TEXT_537); >+ stringBuffer.append(TEXT_469); > > } > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_538); >+ stringBuffer.append(TEXT_470); > > } > } >@@ -2935,163 +2742,176 @@ > Collection genLinksCollection = (Collection) nextEntry.getValue(); > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_539); >+ stringBuffer.append(TEXT_471); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_540); >+ stringBuffer.append(TEXT_472); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true); >- stringBuffer.append(TEXT_541); >+ stringBuffer.append(TEXT_473); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_542); >+ stringBuffer.append(TEXT_474); > > } else { > >- stringBuffer.append(TEXT_543); >+ stringBuffer.append(TEXT_475); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_544); >+ stringBuffer.append(TEXT_476); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false); >- stringBuffer.append(TEXT_545); >+ stringBuffer.append(TEXT_477); > > } > >- stringBuffer.append(TEXT_546); >+ stringBuffer.append(TEXT_478); > > for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { > GenLink nextLink = (GenLink) genLinksIterator.next(); > >- stringBuffer.append(TEXT_547); >+ stringBuffer.append(TEXT_479); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); >+ stringBuffer.append(TEXT_480); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_548); >+ stringBuffer.append(TEXT_481); > > } > >- stringBuffer.append(TEXT_549); >+ stringBuffer.append(TEXT_482); > > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_550); >+ stringBuffer.append(TEXT_483); > > } > } > >- stringBuffer.append(TEXT_551); >+ stringBuffer.append(TEXT_484); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_552); >+ stringBuffer.append(TEXT_485); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_553); >+ stringBuffer.append(TEXT_486); > stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_554); >+ stringBuffer.append(TEXT_487); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_555); >+ stringBuffer.append(TEXT_488); > stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_556); >+ stringBuffer.append(TEXT_489); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_557); >+ stringBuffer.append(TEXT_490); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_558); >+ stringBuffer.append(TEXT_491); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_559); >+ stringBuffer.append(TEXT_492); > > if (_includeUncontainedLinks) { > >- stringBuffer.append(TEXT_560); >+ stringBuffer.append(TEXT_493); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_561); >+ stringBuffer.append(TEXT_494); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_562); >+ stringBuffer.append(TEXT_495); > > } >- >- > if (myHelper.containsFeatureModelFacetLinks()) { > >- stringBuffer.append(TEXT_563); >+ stringBuffer.append(TEXT_496); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_564); >+ stringBuffer.append(TEXT_497); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_565); >+ stringBuffer.append(TEXT_498); > > for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > >- stringBuffer.append(TEXT_566); >+ stringBuffer.append(TEXT_499); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_567); >+ stringBuffer.append(TEXT_500); > > } > >- stringBuffer.append(TEXT_568); >+ stringBuffer.append(TEXT_501); > > if (myHelper.containsTypeModelFacetLinks()) { > >- stringBuffer.append(TEXT_569); >+ stringBuffer.append(TEXT_502); > > } else { > >- stringBuffer.append(TEXT_570); >+ stringBuffer.append(TEXT_503); > > } > } >- >- >- > if (myHelper.containsTypeModelFacetLinks()) { > if (!myHelper.containsFeatureModelFacetLinks()) { > >- stringBuffer.append(TEXT_571); >+ stringBuffer.append(TEXT_504); > > } > >- stringBuffer.append(TEXT_572); >+ stringBuffer.append(TEXT_505); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_573); >+ stringBuffer.append(TEXT_506); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_574); >+ stringBuffer.append(TEXT_507); > > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > >- stringBuffer.append(TEXT_575); >+ stringBuffer.append(TEXT_508); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_576); >+ stringBuffer.append(TEXT_509); > > } > >- stringBuffer.append(TEXT_577); >+ stringBuffer.append(TEXT_510); > > } > >- stringBuffer.append(TEXT_578); >+ stringBuffer.append(TEXT_511); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_579); >+ stringBuffer.append(TEXT_512); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_513); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_580); >+ stringBuffer.append(TEXT_514); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_515); >+ stringBuffer.append(_getViewCode); >+ stringBuffer.append(TEXT_516); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher")); >+ stringBuffer.append(TEXT_517); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(TEXT_518); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_519); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(TEXT_520); >+ stringBuffer.append(_getDiagramCode); >+ stringBuffer.append(TEXT_521); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_522); > > } > > > } //end of local declarations > >- stringBuffer.append(TEXT_581); >- stringBuffer.append(TEXT_582); >- stringBuffer.append(TEXT_583); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); >- stringBuffer.append(TEXT_584); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_585); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_586); >- stringBuffer.append(TEXT_587); >- stringBuffer.append(TEXT_588); >+ stringBuffer.append(TEXT_523); >+ stringBuffer.append(TEXT_524); >+ stringBuffer.append(TEXT_525); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); >+ stringBuffer.append(TEXT_526); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); >+ stringBuffer.append(TEXT_527); >+ stringBuffer.append(TEXT_528); >+ stringBuffer.append(TEXT_529); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_589); >+ stringBuffer.append(TEXT_530); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_590); >+ stringBuffer.append(TEXT_531); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_591); >+ stringBuffer.append(TEXT_532); > > final String primaryView = "getDiagramNode()"; > >- stringBuffer.append(TEXT_592); >+ stringBuffer.append(TEXT_533); > > boolean isFixedFontSetInFigure; > { >@@ -3099,137 +2919,137 @@ > isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont(); > } > >- stringBuffer.append(TEXT_593); >+ stringBuffer.append(TEXT_534); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_594); >+ stringBuffer.append(TEXT_535); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_595); >+ stringBuffer.append(TEXT_536); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_596); >+ stringBuffer.append(TEXT_537); > stringBuffer.append(primaryView); >- stringBuffer.append(TEXT_597); >+ stringBuffer.append(TEXT_538); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_598); >+ stringBuffer.append(TEXT_539); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_599); >+ stringBuffer.append(TEXT_540); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >- stringBuffer.append(TEXT_600); >+ stringBuffer.append(TEXT_541); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >- stringBuffer.append(TEXT_601); >+ stringBuffer.append(TEXT_542); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >- stringBuffer.append(TEXT_602); >+ stringBuffer.append(TEXT_543); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_603); >+ stringBuffer.append(TEXT_544); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >- stringBuffer.append(TEXT_604); >+ stringBuffer.append(TEXT_545); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_605); >+ stringBuffer.append(TEXT_546); > > } > >- stringBuffer.append(TEXT_606); >+ stringBuffer.append(TEXT_547); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_607); >+ stringBuffer.append(TEXT_548); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_608); >+ stringBuffer.append(TEXT_549); > > } > >- stringBuffer.append(TEXT_609); >- stringBuffer.append(TEXT_610); >- stringBuffer.append(TEXT_611); >+ stringBuffer.append(TEXT_550); >+ stringBuffer.append(TEXT_551); >+ stringBuffer.append(TEXT_552); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); >- stringBuffer.append(TEXT_612); >+ stringBuffer.append(TEXT_553); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); >- stringBuffer.append(TEXT_613); >+ stringBuffer.append(TEXT_554); > stringBuffer.append(primaryView); >- stringBuffer.append(TEXT_614); >+ stringBuffer.append(TEXT_555); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_615); >+ stringBuffer.append(TEXT_556); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_616); >+ stringBuffer.append(TEXT_557); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_617); >+ stringBuffer.append(TEXT_558); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_618); >+ stringBuffer.append(TEXT_559); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_619); >+ stringBuffer.append(TEXT_560); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); >- stringBuffer.append(TEXT_620); >+ stringBuffer.append(TEXT_561); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); >- stringBuffer.append(TEXT_621); >+ stringBuffer.append(TEXT_562); > stringBuffer.append(primaryView); >- stringBuffer.append(TEXT_622); >+ stringBuffer.append(TEXT_563); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_623); >+ stringBuffer.append(TEXT_564); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_624); >+ stringBuffer.append(TEXT_565); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_625); >+ stringBuffer.append(TEXT_566); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_626); >+ stringBuffer.append(TEXT_567); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_627); >- stringBuffer.append(TEXT_628); >- stringBuffer.append(TEXT_629); >+ stringBuffer.append(TEXT_568); >+ stringBuffer.append(TEXT_569); >+ stringBuffer.append(TEXT_570); > stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_630); >+ stringBuffer.append(TEXT_571); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_631); >+ stringBuffer.append(TEXT_572); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_632); >+ stringBuffer.append(TEXT_573); > stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_633); >- stringBuffer.append(TEXT_634); >- stringBuffer.append(TEXT_635); >+ stringBuffer.append(TEXT_574); >+ stringBuffer.append(TEXT_575); >+ stringBuffer.append(TEXT_576); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_636); >+ stringBuffer.append(TEXT_577); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_637); >- stringBuffer.append(TEXT_638); >- stringBuffer.append(TEXT_639); >+ stringBuffer.append(TEXT_578); >+ stringBuffer.append(TEXT_579); >+ stringBuffer.append(TEXT_580); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_640); >+ stringBuffer.append(TEXT_581); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_641); >+ stringBuffer.append(TEXT_582); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_642); >+ stringBuffer.append(TEXT_583); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_643); >+ stringBuffer.append(TEXT_584); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_644); >- stringBuffer.append(TEXT_645); >- stringBuffer.append(TEXT_646); >+ stringBuffer.append(TEXT_585); >+ stringBuffer.append(TEXT_586); >+ stringBuffer.append(TEXT_587); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_647); >- stringBuffer.append(TEXT_648); >- stringBuffer.append(TEXT_649); >+ stringBuffer.append(TEXT_588); >+ stringBuffer.append(TEXT_589); >+ stringBuffer.append(TEXT_590); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_650); >- stringBuffer.append(TEXT_651); >- stringBuffer.append(TEXT_652); >+ stringBuffer.append(TEXT_591); >+ stringBuffer.append(TEXT_592); >+ stringBuffer.append(TEXT_593); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_653); >- stringBuffer.append(TEXT_654); >- stringBuffer.append(TEXT_655); >+ stringBuffer.append(TEXT_594); >+ stringBuffer.append(TEXT_595); >+ stringBuffer.append(TEXT_596); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_656); >+ stringBuffer.append(TEXT_597); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_657); >+ stringBuffer.append(TEXT_598); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_658); >+ stringBuffer.append(TEXT_599); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_659); >- stringBuffer.append(TEXT_660); >- stringBuffer.append(TEXT_661); >+ stringBuffer.append(TEXT_600); >+ stringBuffer.append(TEXT_601); >+ stringBuffer.append(TEXT_602); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_662); >+ stringBuffer.append(TEXT_603); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_663); >+ stringBuffer.append(TEXT_604); > > for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) { > GenLink genLink = (GenLink)it.next(); >@@ -3257,77 +3077,79 @@ > } > GenLinkConstraints linkConstraints = genLink.getCreationConstraints(); > >- stringBuffer.append(TEXT_664); >+ stringBuffer.append(TEXT_605); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_665); >+ stringBuffer.append(TEXT_606); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_666); >+ stringBuffer.append(TEXT_607); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_667); >+ stringBuffer.append(TEXT_608); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_668); >+ stringBuffer.append(TEXT_609); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_669); >+ stringBuffer.append(TEXT_610); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_670); >+ stringBuffer.append(TEXT_611); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_671); >+ stringBuffer.append(TEXT_612); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest")); >- stringBuffer.append(TEXT_672); >+ stringBuffer.append(TEXT_613); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_673); >+ stringBuffer.append(TEXT_614); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_674); >+ stringBuffer.append(TEXT_615); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_675); >+ stringBuffer.append(TEXT_616); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_676); >+ stringBuffer.append(TEXT_617); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_677); >+ stringBuffer.append(TEXT_618); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_678); >+ stringBuffer.append(TEXT_619); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_679); >+ stringBuffer.append(TEXT_620); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_680); >+ stringBuffer.append(TEXT_621); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_681); >+ stringBuffer.append(TEXT_622); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_682); >+ stringBuffer.append(TEXT_623); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_683); >+ stringBuffer.append(TEXT_624); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_625); > > } else { > >- stringBuffer.append(TEXT_684); >+ stringBuffer.append(TEXT_626); > > } > >- stringBuffer.append(TEXT_685); >+ stringBuffer.append(TEXT_627); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenFeature containmentFeature = modelFacet.getContainmentMetaFeature(); > if (containmentFeature == null) { > >- stringBuffer.append(TEXT_686); >+ stringBuffer.append(TEXT_628); > > } else { > >- stringBuffer.append(TEXT_687); >+ stringBuffer.append(TEXT_629); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_688); >+ stringBuffer.append(TEXT_630); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_689); >+ stringBuffer.append(TEXT_631); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_690); >+ stringBuffer.append(TEXT_632); > stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_691); >+ stringBuffer.append(TEXT_633); > > { > GenFeature _feature = containmentFeature; >@@ -3335,29 +3157,29 @@ > String _exceedsUpperBound = "return false;"; > GenClass _ownerGenClass = containmentFeature.getGenClass(); > >- stringBuffer.append(TEXT_692); >+ stringBuffer.append(TEXT_634); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_693); >+ stringBuffer.append(TEXT_635); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_694); >+ stringBuffer.append(TEXT_636); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_695); >+ stringBuffer.append(TEXT_637); > > } else { > >- stringBuffer.append(TEXT_696); >+ stringBuffer.append(TEXT_638); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_697); >+ stringBuffer.append(TEXT_639); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_698); >+ stringBuffer.append(TEXT_640); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_699); >+ stringBuffer.append(TEXT_641); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_700); >+ stringBuffer.append(TEXT_642); > > } > } >@@ -3372,29 +3194,29 @@ > String _exceedsUpperBound = "return false;"; > GenClass _ownerGenClass = containmentFeature.getGenClass(); > >- stringBuffer.append(TEXT_701); >+ stringBuffer.append(TEXT_643); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_702); >+ stringBuffer.append(TEXT_644); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_703); >+ stringBuffer.append(TEXT_645); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_704); >+ stringBuffer.append(TEXT_646); > > } else { > >- stringBuffer.append(TEXT_705); >+ stringBuffer.append(TEXT_647); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_706); >+ stringBuffer.append(TEXT_648); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_707); >+ stringBuffer.append(TEXT_649); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_708); >+ stringBuffer.append(TEXT_650); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_709); >+ stringBuffer.append(TEXT_651); > > } > } >@@ -3408,24 +3230,24 @@ > String _source = "newSource.getElement()"; > String _target = "edge.getTarget().getElement()"; > >- stringBuffer.append(TEXT_710); >+ stringBuffer.append(TEXT_652); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_711); >+ stringBuffer.append(TEXT_653); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_712); >+ stringBuffer.append(TEXT_654); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_713); >+ stringBuffer.append(TEXT_655); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_714); >+ stringBuffer.append(TEXT_656); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_715); >+ stringBuffer.append(TEXT_657); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); >@@ -3435,29 +3257,29 @@ > String _exceedsUpperBound = "return false;"; > GenClass _ownerGenClass = null; > >- stringBuffer.append(TEXT_716); >+ stringBuffer.append(TEXT_658); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_717); >+ stringBuffer.append(TEXT_659); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_718); >+ stringBuffer.append(TEXT_660); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_719); >+ stringBuffer.append(TEXT_661); > > } else { > >- stringBuffer.append(TEXT_720); >+ stringBuffer.append(TEXT_662); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_721); >+ stringBuffer.append(TEXT_663); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_722); >+ stringBuffer.append(TEXT_664); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_723); >+ stringBuffer.append(TEXT_665); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_724); >+ stringBuffer.append(TEXT_666); > > } > } >@@ -3468,44 +3290,44 @@ > String _source = "newSource.getElement()"; > String _target = "edge.getTarget().getElement()"; > >- stringBuffer.append(TEXT_725); >+ stringBuffer.append(TEXT_667); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_726); >+ stringBuffer.append(TEXT_668); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_727); >+ stringBuffer.append(TEXT_669); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_728); >+ stringBuffer.append(TEXT_670); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_729); >+ stringBuffer.append(TEXT_671); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_730); >+ stringBuffer.append(TEXT_672); > > } else { > >- stringBuffer.append(TEXT_731); >+ stringBuffer.append(TEXT_673); > > } > >- stringBuffer.append(TEXT_732); >+ stringBuffer.append(TEXT_674); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_733); >+ stringBuffer.append(TEXT_675); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_734); >+ stringBuffer.append(TEXT_676); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_735); >+ stringBuffer.append(TEXT_677); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_736); >+ stringBuffer.append(TEXT_678); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_737); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeSourceCommand")); >- stringBuffer.append(TEXT_738); >+ stringBuffer.append(TEXT_679); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeSourceCommand")); >+ stringBuffer.append(TEXT_680); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); >@@ -3524,110 +3346,110 @@ > } > if (containmentFeature != null || setChild) { > >- stringBuffer.append(TEXT_739); >+ stringBuffer.append(TEXT_681); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_740); >+ stringBuffer.append(TEXT_682); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_741); >+ stringBuffer.append(TEXT_683); > stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_742); >+ stringBuffer.append(TEXT_684); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_743); >+ stringBuffer.append(TEXT_685); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_744); >+ stringBuffer.append(TEXT_686); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_745); >+ stringBuffer.append(TEXT_687); > > } > if (containmentFeature != null) { > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_746); >+ stringBuffer.append(TEXT_688); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_747); >+ stringBuffer.append(TEXT_689); > > } else { > >- stringBuffer.append(TEXT_748); >+ stringBuffer.append(TEXT_690); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_749); >+ stringBuffer.append(TEXT_691); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_750); >+ stringBuffer.append(TEXT_692); > > } > >- stringBuffer.append(TEXT_751); >+ stringBuffer.append(TEXT_693); > stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_752); >+ stringBuffer.append(TEXT_694); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_753); >+ stringBuffer.append(TEXT_695); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_754); >+ stringBuffer.append(TEXT_696); > > } > if (setChild) { > if (childFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_755); >+ stringBuffer.append(TEXT_697); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_756); >+ stringBuffer.append(TEXT_698); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_757); >+ stringBuffer.append(TEXT_699); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_758); >+ stringBuffer.append(TEXT_700); > > } else { > >- stringBuffer.append(TEXT_759); >+ stringBuffer.append(TEXT_701); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_760); >+ stringBuffer.append(TEXT_702); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_761); >+ stringBuffer.append(TEXT_703); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_762); >+ stringBuffer.append(TEXT_704); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_763); >+ stringBuffer.append(TEXT_705); > > } > >- stringBuffer.append(TEXT_764); >+ stringBuffer.append(TEXT_706); > stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_765); >+ stringBuffer.append(TEXT_707); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_766); >+ stringBuffer.append(TEXT_708); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_767); >+ stringBuffer.append(TEXT_709); > > } > >- stringBuffer.append(TEXT_768); >+ stringBuffer.append(TEXT_710); > > if (setSource) { > if (sourceFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_769); >+ stringBuffer.append(TEXT_711); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_770); >+ stringBuffer.append(TEXT_712); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_771); >+ stringBuffer.append(TEXT_713); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_772); >+ stringBuffer.append(TEXT_714); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_773); >+ stringBuffer.append(TEXT_715); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_774); >+ stringBuffer.append(TEXT_716); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_775); >+ stringBuffer.append(TEXT_717); > > } else { > >- stringBuffer.append(TEXT_776); >+ stringBuffer.append(TEXT_718); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_777); >+ stringBuffer.append(TEXT_719); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_778); >+ stringBuffer.append(TEXT_720); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_779); >+ stringBuffer.append(TEXT_721); > > } > } >@@ -3635,53 +3457,53 @@ > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > if (metaFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_780); >+ stringBuffer.append(TEXT_722); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_781); >+ stringBuffer.append(TEXT_723); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_782); >+ stringBuffer.append(TEXT_724); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_783); >+ stringBuffer.append(TEXT_725); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_784); >+ stringBuffer.append(TEXT_726); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_785); >+ stringBuffer.append(TEXT_727); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_786); >+ stringBuffer.append(TEXT_728); > > } else { > >- stringBuffer.append(TEXT_787); >+ stringBuffer.append(TEXT_729); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_788); >+ stringBuffer.append(TEXT_730); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_789); >+ stringBuffer.append(TEXT_731); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_790); >+ stringBuffer.append(TEXT_732); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_791); >+ stringBuffer.append(TEXT_733); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_792); >+ stringBuffer.append(TEXT_734); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_793); >+ stringBuffer.append(TEXT_735); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_794); >+ stringBuffer.append(TEXT_736); > > } > } > >- stringBuffer.append(TEXT_795); >- stringBuffer.append(TEXT_796); >+ stringBuffer.append(TEXT_737); >+ stringBuffer.append(TEXT_738); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_797); >+ stringBuffer.append(TEXT_739); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_798); >+ stringBuffer.append(TEXT_740); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_799); >+ stringBuffer.append(TEXT_741); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); >- stringBuffer.append(TEXT_800); >+ stringBuffer.append(TEXT_742); > > } > >@@ -3689,16 +3511,16 @@ > if (linkConstraints != null) { > String _edge = "edge"; > >- stringBuffer.append(TEXT_801); >- stringBuffer.append(TEXT_802); >+ stringBuffer.append(TEXT_743); >+ stringBuffer.append(TEXT_744); > > //input: _edge : String > >- stringBuffer.append(TEXT_803); >+ stringBuffer.append(TEXT_745); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_804); >+ stringBuffer.append(TEXT_746); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_805); >+ stringBuffer.append(TEXT_747); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); >@@ -3725,217 +3547,217 @@ > } > } > >- stringBuffer.append(TEXT_806); >+ stringBuffer.append(TEXT_748); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_807); >+ stringBuffer.append(TEXT_749); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_808); >+ stringBuffer.append(TEXT_750); > > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_809); >+ stringBuffer.append(TEXT_751); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_810); >+ stringBuffer.append(TEXT_752); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_811); >+ stringBuffer.append(TEXT_753); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_812); >+ stringBuffer.append(TEXT_754); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_813); >+ stringBuffer.append(TEXT_755); > > } else { > >- stringBuffer.append(TEXT_814); >+ stringBuffer.append(TEXT_756); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_815); >+ stringBuffer.append(TEXT_757); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_816); >+ stringBuffer.append(TEXT_758); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_817); >+ stringBuffer.append(TEXT_759); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_818); >+ stringBuffer.append(TEXT_760); > > } > } else { > >- stringBuffer.append(TEXT_819); >+ stringBuffer.append(TEXT_761); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_820); >+ stringBuffer.append(TEXT_762); > > } > if (removeChild) { > if (childFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_821); >+ stringBuffer.append(TEXT_763); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_822); >+ stringBuffer.append(TEXT_764); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_823); >+ stringBuffer.append(TEXT_765); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_824); >+ stringBuffer.append(TEXT_766); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_825); >+ stringBuffer.append(TEXT_767); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_826); >+ stringBuffer.append(TEXT_768); > > } else { > >- stringBuffer.append(TEXT_827); >+ stringBuffer.append(TEXT_769); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_828); >+ stringBuffer.append(TEXT_770); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_829); >+ stringBuffer.append(TEXT_771); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_830); >+ stringBuffer.append(TEXT_772); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_831); >+ stringBuffer.append(TEXT_773); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_832); >+ stringBuffer.append(TEXT_774); > > } > } > if (removeSource) { > if (sourceFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_833); >+ stringBuffer.append(TEXT_775); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_834); >+ stringBuffer.append(TEXT_776); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_835); >+ stringBuffer.append(TEXT_777); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_836); >+ stringBuffer.append(TEXT_778); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_837); >+ stringBuffer.append(TEXT_779); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_838); >+ stringBuffer.append(TEXT_780); > > } else { > >- stringBuffer.append(TEXT_839); >+ stringBuffer.append(TEXT_781); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_840); >+ stringBuffer.append(TEXT_782); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_841); >+ stringBuffer.append(TEXT_783); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_842); >+ stringBuffer.append(TEXT_784); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_843); >+ stringBuffer.append(TEXT_785); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_844); >+ stringBuffer.append(TEXT_786); > > } > } > if (removeTarget) { > if (targetFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_845); >+ stringBuffer.append(TEXT_787); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_846); >+ stringBuffer.append(TEXT_788); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_847); >+ stringBuffer.append(TEXT_789); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_848); >+ stringBuffer.append(TEXT_790); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_849); >+ stringBuffer.append(TEXT_791); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_850); >+ stringBuffer.append(TEXT_792); > > } else { > >- stringBuffer.append(TEXT_851); >+ stringBuffer.append(TEXT_793); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_852); >+ stringBuffer.append(TEXT_794); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_853); >+ stringBuffer.append(TEXT_795); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_854); >+ stringBuffer.append(TEXT_796); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_855); >+ stringBuffer.append(TEXT_797); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_856); >+ stringBuffer.append(TEXT_798); > > } > } > >- stringBuffer.append(TEXT_857); >+ stringBuffer.append(TEXT_799); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > if (metaFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_858); >+ stringBuffer.append(TEXT_800); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_859); >+ stringBuffer.append(TEXT_801); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_860); >+ stringBuffer.append(TEXT_802); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_861); >+ stringBuffer.append(TEXT_803); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_862); >+ stringBuffer.append(TEXT_804); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_863); >+ stringBuffer.append(TEXT_805); > > } else { > >- stringBuffer.append(TEXT_864); >+ stringBuffer.append(TEXT_806); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_865); >+ stringBuffer.append(TEXT_807); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_866); >+ stringBuffer.append(TEXT_808); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_867); >+ stringBuffer.append(TEXT_809); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_868); >+ stringBuffer.append(TEXT_810); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_869); >+ stringBuffer.append(TEXT_811); > > } > > > } > >- stringBuffer.append(TEXT_870); >+ stringBuffer.append(TEXT_812); > > } > >- stringBuffer.append(TEXT_871); >+ stringBuffer.append(TEXT_813); > > if (palette != null) { > >- stringBuffer.append(TEXT_872); >+ stringBuffer.append(TEXT_814); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_873); >+ stringBuffer.append(TEXT_815); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_874); >+ stringBuffer.append(TEXT_816); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_875); >+ stringBuffer.append(TEXT_817); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_876); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_877); >+ stringBuffer.append(TEXT_818); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_819); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_878); >+ stringBuffer.append(TEXT_820); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenFeature containmentFeature = modelFacet.getContainmentMetaFeature(); > if (containmentFeature == null) { > >- stringBuffer.append(TEXT_879); >+ stringBuffer.append(TEXT_821); > > } else { > >- stringBuffer.append(TEXT_880); >+ stringBuffer.append(TEXT_822); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_881); >+ stringBuffer.append(TEXT_823); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_882); >+ stringBuffer.append(TEXT_824); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_883); >+ stringBuffer.append(TEXT_825); > stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_884); >+ stringBuffer.append(TEXT_826); > > { > GenFeature _feature = containmentFeature; >@@ -3943,29 +3765,29 @@ > String _exceedsUpperBound = "return false;"; > GenClass _ownerGenClass = containmentFeature.getGenClass(); > >- stringBuffer.append(TEXT_885); >+ stringBuffer.append(TEXT_827); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_886); >+ stringBuffer.append(TEXT_828); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_887); >+ stringBuffer.append(TEXT_829); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_888); >+ stringBuffer.append(TEXT_830); > > } else { > >- stringBuffer.append(TEXT_889); >+ stringBuffer.append(TEXT_831); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_890); >+ stringBuffer.append(TEXT_832); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_891); >+ stringBuffer.append(TEXT_833); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_892); >+ stringBuffer.append(TEXT_834); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_893); >+ stringBuffer.append(TEXT_835); > > } > } >@@ -3980,29 +3802,29 @@ > String _exceedsUpperBound = "return false;"; > GenClass _ownerGenClass = containmentFeature.getGenClass(); > >- stringBuffer.append(TEXT_894); >+ stringBuffer.append(TEXT_836); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_895); >+ stringBuffer.append(TEXT_837); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_896); >+ stringBuffer.append(TEXT_838); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_897); >+ stringBuffer.append(TEXT_839); > > } else { > >- stringBuffer.append(TEXT_898); >+ stringBuffer.append(TEXT_840); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_899); >+ stringBuffer.append(TEXT_841); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_900); >+ stringBuffer.append(TEXT_842); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_901); >+ stringBuffer.append(TEXT_843); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_902); >+ stringBuffer.append(TEXT_844); > > } > } >@@ -4014,24 +3836,24 @@ > String _source = "source.getElement()"; > String _target = "null"; > >- stringBuffer.append(TEXT_903); >+ stringBuffer.append(TEXT_845); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_904); >+ stringBuffer.append(TEXT_846); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_905); >+ stringBuffer.append(TEXT_847); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_906); >+ stringBuffer.append(TEXT_848); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_907); >+ stringBuffer.append(TEXT_849); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_908); >+ stringBuffer.append(TEXT_850); > > } > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { >@@ -4042,29 +3864,29 @@ > String _exceedsUpperBound = "return false;"; > GenClass _ownerGenClass = null; > >- stringBuffer.append(TEXT_909); >+ stringBuffer.append(TEXT_851); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_910); >+ stringBuffer.append(TEXT_852); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_911); >+ stringBuffer.append(TEXT_853); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_912); >+ stringBuffer.append(TEXT_854); > > } else { > >- stringBuffer.append(TEXT_913); >+ stringBuffer.append(TEXT_855); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_914); >+ stringBuffer.append(TEXT_856); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_915); >+ stringBuffer.append(TEXT_857); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_916); >+ stringBuffer.append(TEXT_858); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_917); >+ stringBuffer.append(TEXT_859); > > } > } >@@ -4075,47 +3897,47 @@ > String _source = "source.getElement()"; > String _target = "null"; > >- stringBuffer.append(TEXT_918); >+ stringBuffer.append(TEXT_860); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_919); >+ stringBuffer.append(TEXT_861); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_920); >+ stringBuffer.append(TEXT_862); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_921); >+ stringBuffer.append(TEXT_863); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_922); >+ stringBuffer.append(TEXT_864); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_923); >+ stringBuffer.append(TEXT_865); > > } else { > >- stringBuffer.append(TEXT_924); >+ stringBuffer.append(TEXT_866); > > } > >- stringBuffer.append(TEXT_925); >- stringBuffer.append(TEXT_926); >+ stringBuffer.append(TEXT_867); >+ stringBuffer.append(TEXT_868); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_927); >+ stringBuffer.append(TEXT_869); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_928); >+ stringBuffer.append(TEXT_870); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_929); >+ stringBuffer.append(TEXT_871); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); >- stringBuffer.append(TEXT_930); >+ stringBuffer.append(TEXT_872); > > } > >- stringBuffer.append(TEXT_931); >+ stringBuffer.append(TEXT_873); > > } //if there's palette > } //outgoing links >@@ -4145,203 +3967,205 @@ > } > GenLinkConstraints linkConstraints = genLink.getCreationConstraints(); > >- stringBuffer.append(TEXT_932); >+ stringBuffer.append(TEXT_874); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_933); >+ stringBuffer.append(TEXT_875); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_934); >+ stringBuffer.append(TEXT_876); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_935); >+ stringBuffer.append(TEXT_877); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_936); >+ stringBuffer.append(TEXT_878); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_937); >+ stringBuffer.append(TEXT_879); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_938); >+ stringBuffer.append(TEXT_880); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_939); >+ stringBuffer.append(TEXT_881); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest")); >- stringBuffer.append(TEXT_940); >+ stringBuffer.append(TEXT_882); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_941); >+ stringBuffer.append(TEXT_883); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_942); >+ stringBuffer.append(TEXT_884); > stringBuffer.append(reconnectCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_943); >+ stringBuffer.append(TEXT_885); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_944); >+ stringBuffer.append(TEXT_886); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_945); >+ stringBuffer.append(TEXT_887); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_946); >+ stringBuffer.append(TEXT_888); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_947); >+ stringBuffer.append(TEXT_889); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_948); >+ stringBuffer.append(TEXT_890); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_949); >+ stringBuffer.append(TEXT_891); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_950); >+ stringBuffer.append(TEXT_892); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_951); >+ stringBuffer.append(TEXT_893); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_894); > > } else { > >- stringBuffer.append(TEXT_952); >+ stringBuffer.append(TEXT_895); > > } > >- stringBuffer.append(TEXT_953); >+ stringBuffer.append(TEXT_896); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > { > String _source = "edge.getSource().getElement()"; > String _target = "newTarget.getElement()"; > >- stringBuffer.append(TEXT_954); >+ stringBuffer.append(TEXT_897); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_955); >+ stringBuffer.append(TEXT_898); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_956); >+ stringBuffer.append(TEXT_899); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_957); >+ stringBuffer.append(TEXT_900); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_958); >+ stringBuffer.append(TEXT_901); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_959); >+ stringBuffer.append(TEXT_902); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > { > String _source = "edge.getSource().getElement()"; > String _target = "newTarget.getElement()"; > >- stringBuffer.append(TEXT_960); >+ stringBuffer.append(TEXT_903); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_961); >+ stringBuffer.append(TEXT_904); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_962); >+ stringBuffer.append(TEXT_905); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_963); >+ stringBuffer.append(TEXT_906); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_964); >+ stringBuffer.append(TEXT_907); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_965); >+ stringBuffer.append(TEXT_908); > > } else { > >- stringBuffer.append(TEXT_966); >+ stringBuffer.append(TEXT_909); > > } > >- stringBuffer.append(TEXT_967); >+ stringBuffer.append(TEXT_910); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_968); >+ stringBuffer.append(TEXT_911); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_969); >+ stringBuffer.append(TEXT_912); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_970); >+ stringBuffer.append(TEXT_913); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_971); >+ stringBuffer.append(TEXT_914); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_972); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeTargetCommand")); >- stringBuffer.append(TEXT_973); >+ stringBuffer.append(TEXT_915); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeTargetCommand")); >+ stringBuffer.append(TEXT_916); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenFeature targetFeature = modelFacet.getTargetMetaFeature(); > if (targetFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_974); >+ stringBuffer.append(TEXT_917); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_975); >+ stringBuffer.append(TEXT_918); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_976); >+ stringBuffer.append(TEXT_919); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_977); >+ stringBuffer.append(TEXT_920); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_978); >+ stringBuffer.append(TEXT_921); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_979); >+ stringBuffer.append(TEXT_922); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_980); >+ stringBuffer.append(TEXT_923); > > } else { > >- stringBuffer.append(TEXT_981); >+ stringBuffer.append(TEXT_924); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_982); >+ stringBuffer.append(TEXT_925); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_983); >+ stringBuffer.append(TEXT_926); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_984); >+ stringBuffer.append(TEXT_927); > > } > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > if (metaFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_985); >+ stringBuffer.append(TEXT_928); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_986); >+ stringBuffer.append(TEXT_929); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_987); >+ stringBuffer.append(TEXT_930); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_988); >+ stringBuffer.append(TEXT_931); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_989); >+ stringBuffer.append(TEXT_932); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_990); >+ stringBuffer.append(TEXT_933); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_991); >+ stringBuffer.append(TEXT_934); > > } else { > >- stringBuffer.append(TEXT_992); >+ stringBuffer.append(TEXT_935); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_993); >+ stringBuffer.append(TEXT_936); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_994); >+ stringBuffer.append(TEXT_937); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_995); >+ stringBuffer.append(TEXT_938); > > } > } > >- stringBuffer.append(TEXT_996); >+ stringBuffer.append(TEXT_939); > > if (linkConstraints != null) { > String _edge = "edge"; > >- stringBuffer.append(TEXT_997); >- stringBuffer.append(TEXT_998); >+ stringBuffer.append(TEXT_940); >+ stringBuffer.append(TEXT_941); > > //input: _edge : String > >- stringBuffer.append(TEXT_999); >+ stringBuffer.append(TEXT_942); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_1000); >+ stringBuffer.append(TEXT_943); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_1001); >+ stringBuffer.append(TEXT_944); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); >@@ -4368,260 +4192,260 @@ > } > } > >- stringBuffer.append(TEXT_1002); >+ stringBuffer.append(TEXT_945); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_1003); >+ stringBuffer.append(TEXT_946); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_1004); >+ stringBuffer.append(TEXT_947); > > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_1005); >+ stringBuffer.append(TEXT_948); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_1006); >+ stringBuffer.append(TEXT_949); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1007); >+ stringBuffer.append(TEXT_950); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1008); >+ stringBuffer.append(TEXT_951); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1009); >+ stringBuffer.append(TEXT_952); > > } else { > >- stringBuffer.append(TEXT_1010); >+ stringBuffer.append(TEXT_953); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1011); >+ stringBuffer.append(TEXT_954); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1012); >+ stringBuffer.append(TEXT_955); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1013); >+ stringBuffer.append(TEXT_956); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1014); >+ stringBuffer.append(TEXT_957); > > } > } else { > >- stringBuffer.append(TEXT_1015); >+ stringBuffer.append(TEXT_958); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_1016); >+ stringBuffer.append(TEXT_959); > > } > if (removeChild) { > if (childFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_1017); >+ stringBuffer.append(TEXT_960); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_1018); >+ stringBuffer.append(TEXT_961); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1019); >+ stringBuffer.append(TEXT_962); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1020); >+ stringBuffer.append(TEXT_963); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1021); >+ stringBuffer.append(TEXT_964); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1022); >+ stringBuffer.append(TEXT_965); > > } else { > >- stringBuffer.append(TEXT_1023); >+ stringBuffer.append(TEXT_966); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1024); >+ stringBuffer.append(TEXT_967); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1025); >+ stringBuffer.append(TEXT_968); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1026); >+ stringBuffer.append(TEXT_969); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1027); >+ stringBuffer.append(TEXT_970); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1028); >+ stringBuffer.append(TEXT_971); > > } > } > if (removeSource) { > if (sourceFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_1029); >+ stringBuffer.append(TEXT_972); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_1030); >+ stringBuffer.append(TEXT_973); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1031); >+ stringBuffer.append(TEXT_974); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1032); >+ stringBuffer.append(TEXT_975); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1033); >+ stringBuffer.append(TEXT_976); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1034); >+ stringBuffer.append(TEXT_977); > > } else { > >- stringBuffer.append(TEXT_1035); >+ stringBuffer.append(TEXT_978); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1036); >+ stringBuffer.append(TEXT_979); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1037); >+ stringBuffer.append(TEXT_980); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1038); >+ stringBuffer.append(TEXT_981); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1039); >+ stringBuffer.append(TEXT_982); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1040); >+ stringBuffer.append(TEXT_983); > > } > } > if (removeTarget) { > if (targetFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_1041); >+ stringBuffer.append(TEXT_984); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_1042); >+ stringBuffer.append(TEXT_985); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1043); >+ stringBuffer.append(TEXT_986); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1044); >+ stringBuffer.append(TEXT_987); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1045); >+ stringBuffer.append(TEXT_988); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1046); >+ stringBuffer.append(TEXT_989); > > } else { > >- stringBuffer.append(TEXT_1047); >+ stringBuffer.append(TEXT_990); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1048); >+ stringBuffer.append(TEXT_991); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1049); >+ stringBuffer.append(TEXT_992); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1050); >+ stringBuffer.append(TEXT_993); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1051); >+ stringBuffer.append(TEXT_994); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1052); >+ stringBuffer.append(TEXT_995); > > } > } > >- stringBuffer.append(TEXT_1053); >+ stringBuffer.append(TEXT_996); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > if (metaFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_1054); >+ stringBuffer.append(TEXT_997); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_1055); >+ stringBuffer.append(TEXT_998); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1056); >+ stringBuffer.append(TEXT_999); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1057); >+ stringBuffer.append(TEXT_1000); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1058); >+ stringBuffer.append(TEXT_1001); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1059); >+ stringBuffer.append(TEXT_1002); > > } else { > >- stringBuffer.append(TEXT_1060); >+ stringBuffer.append(TEXT_1003); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1061); >+ stringBuffer.append(TEXT_1004); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_1062); >+ stringBuffer.append(TEXT_1005); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1063); >+ stringBuffer.append(TEXT_1006); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1064); >+ stringBuffer.append(TEXT_1007); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1065); >+ stringBuffer.append(TEXT_1008); > > } > > > } > >- stringBuffer.append(TEXT_1066); >+ stringBuffer.append(TEXT_1009); > > } > >- stringBuffer.append(TEXT_1067); >+ stringBuffer.append(TEXT_1010); > > if (palette != null) { > >- stringBuffer.append(TEXT_1068); >+ stringBuffer.append(TEXT_1011); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_1069); >+ stringBuffer.append(TEXT_1012); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_1070); >+ stringBuffer.append(TEXT_1013); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_1071); >+ stringBuffer.append(TEXT_1014); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_1072); >+ stringBuffer.append(TEXT_1015); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_1073); >+ stringBuffer.append(TEXT_1016); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_1074); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_1075); >+ stringBuffer.append(TEXT_1017); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")); >+ stringBuffer.append(TEXT_1018); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_1076); >+ stringBuffer.append(TEXT_1019); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_1077); >+ stringBuffer.append(TEXT_1020); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_1078); >+ stringBuffer.append(TEXT_1021); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_1079); >+ stringBuffer.append(TEXT_1022); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_1080); >+ stringBuffer.append(TEXT_1023); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_1081); >+ stringBuffer.append(TEXT_1024); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenClass linkClass = modelFacet.getMetaClass(); > >- stringBuffer.append(TEXT_1082); >+ stringBuffer.append(TEXT_1025); > stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName()))); >- stringBuffer.append(TEXT_1083); >+ stringBuffer.append(TEXT_1026); > stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName())); >- stringBuffer.append(TEXT_1084); >+ stringBuffer.append(TEXT_1027); > stringBuffer.append(linkClass.getClassifierAccessorName()); >- stringBuffer.append(TEXT_1085); >+ stringBuffer.append(TEXT_1028); > if (linkClass.isExternalInterface()) { >- stringBuffer.append(TEXT_1086); >+ stringBuffer.append(TEXT_1029); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_1087); >+ stringBuffer.append(TEXT_1030); > } >- stringBuffer.append(TEXT_1088); >+ stringBuffer.append(TEXT_1031); > /*XXX: Class name DomainElementInitializer should be user-customizable*/ >- stringBuffer.append(TEXT_1089); >+ stringBuffer.append(TEXT_1032); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); >- stringBuffer.append(TEXT_1090); >+ stringBuffer.append(TEXT_1033); > stringBuffer.append(genLink.getUniqueIdentifier()); >- stringBuffer.append(TEXT_1091); >+ stringBuffer.append(TEXT_1034); > if (linkClass.isExternalInterface()) { >- stringBuffer.append(TEXT_1092); >+ stringBuffer.append(TEXT_1035); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_1093); >+ stringBuffer.append(TEXT_1036); > } >- stringBuffer.append(TEXT_1094); >+ stringBuffer.append(TEXT_1037); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > >- stringBuffer.append(TEXT_1095); >+ stringBuffer.append(TEXT_1038); > > } > >- stringBuffer.append(TEXT_1096); >+ stringBuffer.append(TEXT_1039); > stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_1097); >+ stringBuffer.append(TEXT_1040); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_1098); >+ stringBuffer.append(TEXT_1041); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_1099); >+ stringBuffer.append(TEXT_1042); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_1100); >+ stringBuffer.append(TEXT_1043); > > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenFeature sourceFeature = modelFacet.getSourceMetaFeature(); >@@ -4648,30 +4472,30 @@ > } > } > >- stringBuffer.append(TEXT_1101); >+ stringBuffer.append(TEXT_1044); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_1102); >+ stringBuffer.append(TEXT_1045); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1103); >+ stringBuffer.append(TEXT_1046); > stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_1104); >+ stringBuffer.append(TEXT_1047); > stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1105); >+ stringBuffer.append(TEXT_1048); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1106); >+ stringBuffer.append(TEXT_1049); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1107); >+ stringBuffer.append(TEXT_1050); > > } > if (addChild) { > >- stringBuffer.append(TEXT_1108); >+ stringBuffer.append(TEXT_1051); > stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1109); >+ stringBuffer.append(TEXT_1052); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1110); >+ stringBuffer.append(TEXT_1053); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1111); >+ stringBuffer.append(TEXT_1054); > > } > if (addSource) { >@@ -4681,29 +4505,29 @@ > String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;"; > GenClass _ownerGenClass = modelFacet.getMetaClass(); > >- stringBuffer.append(TEXT_1112); >+ stringBuffer.append(TEXT_1055); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_1113); >+ stringBuffer.append(TEXT_1056); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_1114); >+ stringBuffer.append(TEXT_1057); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_1115); >+ stringBuffer.append(TEXT_1058); > > } else { > >- stringBuffer.append(TEXT_1116); >+ stringBuffer.append(TEXT_1059); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_1117); >+ stringBuffer.append(TEXT_1060); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1118); >+ stringBuffer.append(TEXT_1061); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1119); >+ stringBuffer.append(TEXT_1062); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_1120); >+ stringBuffer.append(TEXT_1063); > > } > } >@@ -4711,13 +4535,13 @@ > > } > >- stringBuffer.append(TEXT_1121); >+ stringBuffer.append(TEXT_1064); > stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1122); >+ stringBuffer.append(TEXT_1065); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1123); >+ stringBuffer.append(TEXT_1066); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1124); >+ stringBuffer.append(TEXT_1067); > > } > if (addTarget) { >@@ -4727,29 +4551,29 @@ > String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;"; > GenClass _ownerGenClass = modelFacet.getMetaClass(); > >- stringBuffer.append(TEXT_1125); >+ stringBuffer.append(TEXT_1068); > > int upperBound = _feature.getEcoreFeature().getUpperBound(); > if (upperBound > 0) { > if (upperBound == 1) { > >- stringBuffer.append(TEXT_1126); >+ stringBuffer.append(TEXT_1069); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false); >- stringBuffer.append(TEXT_1127); >+ stringBuffer.append(TEXT_1070); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_1128); >+ stringBuffer.append(TEXT_1071); > > } else { > >- stringBuffer.append(TEXT_1129); >+ stringBuffer.append(TEXT_1072); > myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true); >- stringBuffer.append(TEXT_1130); >+ stringBuffer.append(TEXT_1073); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1131); >+ stringBuffer.append(TEXT_1074); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1132); >+ stringBuffer.append(TEXT_1075); > stringBuffer.append(_exceedsUpperBound); >- stringBuffer.append(TEXT_1133); >+ stringBuffer.append(TEXT_1076); > > } > } >@@ -4757,70 +4581,70 @@ > > } > >- stringBuffer.append(TEXT_1134); >+ stringBuffer.append(TEXT_1077); > stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1135); >+ stringBuffer.append(TEXT_1078); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1136); >+ stringBuffer.append(TEXT_1079); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1137); >+ stringBuffer.append(TEXT_1080); > > } > >- stringBuffer.append(TEXT_1138); >+ stringBuffer.append(TEXT_1081); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > >- stringBuffer.append(TEXT_1139); >+ stringBuffer.append(TEXT_1082); > stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_1140); >+ stringBuffer.append(TEXT_1083); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_1141); >+ stringBuffer.append(TEXT_1084); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_1142); >+ stringBuffer.append(TEXT_1085); > > } > >- stringBuffer.append(TEXT_1143); >- stringBuffer.append(TEXT_1144); >+ stringBuffer.append(TEXT_1086); >+ stringBuffer.append(TEXT_1087); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_1145); >+ stringBuffer.append(TEXT_1088); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_1146); >+ stringBuffer.append(TEXT_1089); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_1147); >+ stringBuffer.append(TEXT_1090); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); >- stringBuffer.append(TEXT_1148); >+ stringBuffer.append(TEXT_1091); > > } > >- stringBuffer.append(TEXT_1149); >+ stringBuffer.append(TEXT_1092); > > { > String _source = "source.getElement()"; > String _target = "target.getElement()"; > >- stringBuffer.append(TEXT_1150); >+ stringBuffer.append(TEXT_1093); > > if (linkConstraints != null) { > >- stringBuffer.append(TEXT_1151); >+ stringBuffer.append(TEXT_1094); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); >- stringBuffer.append(TEXT_1152); >+ stringBuffer.append(TEXT_1095); > stringBuffer.append(_source); >- stringBuffer.append(TEXT_1153); >+ stringBuffer.append(TEXT_1096); > stringBuffer.append(_target); >- stringBuffer.append(TEXT_1154); >+ stringBuffer.append(TEXT_1097); > > } > > > } //local declarations for linkConstraints.jetinc > >- stringBuffer.append(TEXT_1155); >+ stringBuffer.append(TEXT_1098); > > } > >@@ -4829,22 +4653,22 @@ > if (genNode.getViewmap() instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) genNode.getViewmap()).getClassBody(); > >- stringBuffer.append(TEXT_1156); >+ stringBuffer.append(TEXT_1099); > stringBuffer.append(classBody); >- stringBuffer.append(TEXT_1157); >+ stringBuffer.append(TEXT_1100); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_1158); >+ stringBuffer.append(TEXT_1101); > > } > > > } > >- stringBuffer.append(TEXT_1159); >+ stringBuffer.append(TEXT_1102); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_1160); >+ stringBuffer.append(TEXT_1103); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java,v >retrieving revision 1.10 >diff -u -r1.10 LinkEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java 2 Aug 2006 10:43:51 -0000 1.10 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java 30 Aug 2006 15:22:22 -0000 >@@ -23,182 +23,183 @@ > protected final String TEXT_3 = NL + " */"; > protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; > protected final String TEXT_5 = " extends "; >- protected final String TEXT_6 = " implements IUpdatableEditPart {"; >- protected final String TEXT_7 = NL; >- protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >- protected final String TEXT_9 = ";"; >- protected final String TEXT_10 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_11 = "("; >- protected final String TEXT_12 = " view) {" + NL + "\t\tassert view instanceof "; >- protected final String TEXT_13 = ";" + NL + "\t\tsetModel(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_14 = " getDiagramEdge() {" + NL + "\t\treturn ("; >- protected final String TEXT_15 = ") getModel();" + NL + "\t}" + NL; >- protected final String TEXT_16 = NL; >- protected final String TEXT_17 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >- protected final String TEXT_18 = " view = ("; >- protected final String TEXT_19 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >- protected final String TEXT_20 = " view = ("; >- protected final String TEXT_21 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\t//XXX: install correct edit policies!"; >- protected final String TEXT_22 = NL; >- protected final String TEXT_23 = "\t\tinstallEditPolicy("; >- protected final String TEXT_24 = ".COMPONENT_ROLE, new "; >- protected final String TEXT_25 = "() {" + NL + "\t\t\tprotected "; >- protected final String TEXT_26 = " createDeleteCommand("; >- protected final String TEXT_27 = " deleteRequest) {" + NL + "\t\t\t\tfinal Edge edgeToRemove = getDiagramEdge();" + NL + "\t\t\t\tfinal View source = edgeToRemove.getSource();" + NL + "\t\t\t\tfinal View target = edgeToRemove.getTarget();" + NL + "\t\t\t\t"; >- protected final String TEXT_28 = " editingDomain = "; >- protected final String TEXT_29 = ".getEditingDomain(getDiagramEdge().getDiagram().getElement());" + NL + "\t\t\t\t"; >- protected final String TEXT_30 = " cc = new "; >- protected final String TEXT_31 = "();" + NL + "\t\t\t\tcc.append(createDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append(new "; >- protected final String TEXT_32 = "() {" + NL + "\t\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\t\treturn source != null && edgeToRemove != null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn source != null && edgeToRemove != null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\tsource.getDiagram().insertEdge(edgeToRemove);" + NL + "\t\t\t\t\t\tedgeToRemove.setSource(source);" + NL + "\t\t\t\t\t\tedgeToRemove.setTarget(target);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\tsource.getDiagram().removeEdge(edgeToRemove);" + NL + "\t\t\t\t\t\tedgeToRemove.setSource(null);" + NL + "\t\t\t\t\t\tedgeToRemove.setTarget(null);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t});" + NL + "\t\t\t\treturn new WrappingCommand(editingDomain, cc);" + NL + "\t\t\t}"; >- protected final String TEXT_33 = NL; >- protected final String TEXT_34 = NL + "\t\t\tprivate "; >- protected final String TEXT_35 = " createDomainModelRemoveCommand("; >- protected final String TEXT_36 = " editingDomain) {"; >- protected final String TEXT_37 = NL + "\t\t\t\t"; >- protected final String TEXT_38 = " result = new "; >- protected final String TEXT_39 = "();"; >- protected final String TEXT_40 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_41 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_42 = ".getElement().eContainer(), "; >- protected final String TEXT_43 = ".getElement().eContainmentFeature(), "; >- protected final String TEXT_44 = ".getElement()));"; >- protected final String TEXT_45 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_46 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_47 = ".getElement().eContainer(), "; >- protected final String TEXT_48 = ".getElement().eContainmentFeature(), "; >- protected final String TEXT_49 = ".UNSET_VALUE));"; >- protected final String TEXT_50 = NL + "\t\t\t\treturn "; >- protected final String TEXT_51 = ".INSTANCE;"; >- protected final String TEXT_52 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_53 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_54 = ".getElement().eContainer(), "; >- protected final String TEXT_55 = ".eINSTANCE.get"; >- protected final String TEXT_56 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_57 = ".getElement()));"; >- protected final String TEXT_58 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_59 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_60 = ".getElement().eContainer(), "; >- protected final String TEXT_61 = ".eINSTANCE.get"; >- protected final String TEXT_62 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_63 = ".UNSET_VALUE));"; >- protected final String TEXT_64 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_65 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_66 = ".getElement(), "; >- protected final String TEXT_67 = ".eINSTANCE.get"; >- protected final String TEXT_68 = "(), "; >- protected final String TEXT_69 = ".getSource().getElement()));"; >- protected final String TEXT_70 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_71 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_72 = ".getElement(), "; >- protected final String TEXT_73 = ".eINSTANCE.get"; >- protected final String TEXT_74 = "(), "; >- protected final String TEXT_75 = ".UNSET_VALUE));"; >- protected final String TEXT_76 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_77 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_78 = ".getElement(), "; >- protected final String TEXT_79 = ".eINSTANCE.get"; >- protected final String TEXT_80 = "(), "; >- protected final String TEXT_81 = ".getTarget().getElement()));"; >- protected final String TEXT_82 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_83 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_84 = ".getElement(), "; >- protected final String TEXT_85 = ".eINSTANCE.get"; >- protected final String TEXT_86 = "(), "; >- protected final String TEXT_87 = ".UNSET_VALUE));"; >- protected final String TEXT_88 = NL + "\t\t\t\treturn result;"; >- protected final String TEXT_89 = NL + "\t\t\t\treturn "; >- protected final String TEXT_90 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_91 = ".getSource().getElement(), "; >- protected final String TEXT_92 = ".eINSTANCE.get"; >- protected final String TEXT_93 = "(), "; >- protected final String TEXT_94 = ".getTarget().getElement());"; >- protected final String TEXT_95 = NL + "\t\t\t\treturn "; >- protected final String TEXT_96 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >- protected final String TEXT_97 = ".getSource().getElement(), "; >- protected final String TEXT_98 = ".eINSTANCE.get"; >- protected final String TEXT_99 = "(), "; >- protected final String TEXT_100 = ".UNSET_VALUE);"; >- protected final String TEXT_101 = NL + "\t\t\t}"; >- protected final String TEXT_102 = NL + "\t\t});" + NL + "\t\tinstallEditPolicy("; >- protected final String TEXT_103 = ".CONNECTION_ENDPOINTS_ROLE, new "; >- protected final String TEXT_104 = "());" + NL + "\t\tinstallEditPolicy("; >- protected final String TEXT_105 = ".CONNECTION_BENDPOINTS_ROLE, new "; >- protected final String TEXT_106 = "());" + NL + "\t}" + NL; >- protected final String TEXT_107 = NL + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_108 = " getPrimaryLabelEditPart() {" + NL + "\t\tfor("; >- protected final String TEXT_109 = " it = getDiagramEdge().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_110 = " nextChild = ("; >- protected final String TEXT_111 = ")it.next();" + NL + "\t\t\tif ("; >- protected final String TEXT_112 = ".getVisualID(nextChild) == "; >- protected final String TEXT_113 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn (EditPart) getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >- protected final String TEXT_114 = " req) {" + NL + "\t\tif ("; >- protected final String TEXT_115 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; >- protected final String TEXT_116 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; >- protected final String TEXT_117 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; >- protected final String TEXT_118 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_119 = " getLabelEditPart("; >- protected final String TEXT_120 = " req) {" + NL + "\t\t"; >- protected final String TEXT_121 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >- protected final String TEXT_122 = " view = ("; >- protected final String TEXT_123 = ") result.getModel();" + NL + "\t\t\tif (getDiagramEdge().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >- protected final String TEXT_124 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >- protected final String TEXT_125 = NL + "\t\t\t\tcase "; >- protected final String TEXT_126 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >- protected final String TEXT_127 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >- protected final String TEXT_128 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn ((Edge)getModel()).getChildren();" + NL + "\t}" + NL; >- protected final String TEXT_129 = NL; >- protected final String TEXT_130 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_131 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_132 = " feature, "; >- protected final String TEXT_133 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + NL; >- protected final String TEXT_134 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >- protected final String TEXT_135 = NL; >- protected final String TEXT_136 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >- protected final String TEXT_137 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_138 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >- protected final String TEXT_139 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_140 = NL; >- protected final String TEXT_141 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addRefresher("; >- protected final String TEXT_142 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeRefresher("; >- protected final String TEXT_143 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >- protected final String TEXT_144 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >- protected final String TEXT_145 = NL; >- protected final String TEXT_146 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_147 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_148 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >- protected final String TEXT_149 = NL; >- protected final String TEXT_150 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_151 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; >- protected final String TEXT_152 = NL; >- protected final String TEXT_153 = "\t\tRefresher bendpointsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBendpoints();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_154 = ".eINSTANCE.getEdge_Bendpoints(), bendpointsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_155 = ".eINSTANCE.getRelativeBendpoints_Points(), bendpointsRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "//XXX:\t\trefreshBackgroundColor();" + NL + "//XXX:\t\trefreshForegroundColor();" + NL + "//XXX:\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t\trefreshBendpoints();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBendpoints() {" + NL + "\t\t"; >- protected final String TEXT_156 = " bendpoints = ("; >- protected final String TEXT_157 = ") getDiagramEdge().getBendpoints();" + NL + "\t\tif (bendpoints == null) {" + NL + "\t\t\tgetConnectionFigure().setRoutingConstraint("; >- protected final String TEXT_158 = ".EMPTY_LIST);" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_159 = " modelConstraint = bendpoints.getPoints();" + NL + "\t\t"; >- protected final String TEXT_160 = " figureConstraint = new "; >- protected final String TEXT_161 = "();" + NL + "\t\tfor (int i = 0; i < modelConstraint.size(); i++) {" + NL + "\t\t\t"; >- protected final String TEXT_162 = " wbp = ("; >- protected final String TEXT_163 = ") modelConstraint.get(i);" + NL + "\t\t\t"; >- protected final String TEXT_164 = " rbp = new "; >- protected final String TEXT_165 = "(getConnectionFigure());" + NL + "\t\t\trbp.setRelativeDimensions(new "; >- protected final String TEXT_166 = "(wbp.getSourceX(), wbp.getSourceY()), new "; >- protected final String TEXT_167 = "(wbp.getTargetX(), wbp.getTargetY()));" + NL + "\t\t\trbp.setWeight((i + 1) / ((float) modelConstraint.size() + 1));" + NL + "\t\t\tfigureConstraint.add(rbp);" + NL + "\t\t}" + NL + "\t\tgetConnectionFigure().setRoutingConstraint(figureConstraint);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = ((View)getModel()).isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addNotify() {" + NL + "\t\tsuper.addNotify();" + NL + "\t\tgetConnectionFigure().setConnectionRouter(new "; >- protected final String TEXT_168 = "());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Creates figure for this edit part." + NL + "\t * " + NL + "\t * Body of this method does not depend on settings in generation model" + NL + "\t * so you may safely remove <i>generated</i> tag and modify it." + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_169 = " createFigure() {"; >- protected final String TEXT_170 = NL + "\t\treturn new "; >- protected final String TEXT_171 = "();"; >- protected final String TEXT_172 = NL + "\t\treturn "; >- protected final String TEXT_173 = ";"; >- protected final String TEXT_174 = NL + " \t\treturn new "; >- protected final String TEXT_175 = "();"; >- protected final String TEXT_176 = NL + "\t}" + NL; >- protected final String TEXT_177 = NL; >+ protected final String TEXT_6 = " implements "; >+ protected final String TEXT_7 = " {"; >+ protected final String TEXT_8 = NL; >+ protected final String TEXT_9 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >+ protected final String TEXT_10 = ";"; >+ protected final String TEXT_11 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_12 = "("; >+ protected final String TEXT_13 = " view) {" + NL + "\t\tassert view instanceof "; >+ protected final String TEXT_14 = ";" + NL + "\t\tsetModel(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_15 = " getDiagramEdge() {" + NL + "\t\treturn ("; >+ protected final String TEXT_16 = ") getModel();" + NL + "\t}" + NL; >+ protected final String TEXT_17 = NL; >+ protected final String TEXT_18 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >+ protected final String TEXT_19 = " view = ("; >+ protected final String TEXT_20 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >+ protected final String TEXT_21 = " view = ("; >+ protected final String TEXT_22 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\t//XXX: install correct edit policies!"; >+ protected final String TEXT_23 = NL; >+ protected final String TEXT_24 = "\t\tinstallEditPolicy("; >+ protected final String TEXT_25 = ".COMPONENT_ROLE, new "; >+ protected final String TEXT_26 = "() {" + NL + "\t\t\tprotected "; >+ protected final String TEXT_27 = " createDeleteCommand("; >+ protected final String TEXT_28 = " deleteRequest) {" + NL + "\t\t\t\tfinal Edge edgeToRemove = getDiagramEdge();" + NL + "\t\t\t\tfinal View source = edgeToRemove.getSource();" + NL + "\t\t\t\tfinal View target = edgeToRemove.getTarget();" + NL + "\t\t\t\t"; >+ protected final String TEXT_29 = " editingDomain = "; >+ protected final String TEXT_30 = ".getEditingDomain(getDiagramEdge().getDiagram().getElement());" + NL + "\t\t\t\t"; >+ protected final String TEXT_31 = " cc = new "; >+ protected final String TEXT_32 = "();" + NL + "\t\t\t\tcc.append(createDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append(new "; >+ protected final String TEXT_33 = "() {" + NL + "\t\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\t\treturn source != null && edgeToRemove != null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn source != null && edgeToRemove != null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\tsource.getDiagram().insertEdge(edgeToRemove);" + NL + "\t\t\t\t\t\tedgeToRemove.setSource(source);" + NL + "\t\t\t\t\t\tedgeToRemove.setTarget(target);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\tsource.getDiagram().removeEdge(edgeToRemove);" + NL + "\t\t\t\t\t\tedgeToRemove.setSource(null);" + NL + "\t\t\t\t\t\tedgeToRemove.setTarget(null);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t});" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_34 = "(editingDomain, cc);" + NL + "\t\t\t}"; >+ protected final String TEXT_35 = NL; >+ protected final String TEXT_36 = NL + "\t\t\tprivate "; >+ protected final String TEXT_37 = " createDomainModelRemoveCommand("; >+ protected final String TEXT_38 = " editingDomain) {"; >+ protected final String TEXT_39 = NL + "\t\t\t\t"; >+ protected final String TEXT_40 = " result = new "; >+ protected final String TEXT_41 = "();"; >+ protected final String TEXT_42 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_43 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_44 = ".getElement().eContainer(), "; >+ protected final String TEXT_45 = ".getElement().eContainmentFeature(), "; >+ protected final String TEXT_46 = ".getElement()));"; >+ protected final String TEXT_47 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_48 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_49 = ".getElement().eContainer(), "; >+ protected final String TEXT_50 = ".getElement().eContainmentFeature(), "; >+ protected final String TEXT_51 = ".UNSET_VALUE));"; >+ protected final String TEXT_52 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_53 = ".INSTANCE;"; >+ protected final String TEXT_54 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_55 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_56 = ".getElement().eContainer(), "; >+ protected final String TEXT_57 = ".eINSTANCE.get"; >+ protected final String TEXT_58 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_59 = ".getElement()));"; >+ protected final String TEXT_60 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_61 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_62 = ".getElement().eContainer(), "; >+ protected final String TEXT_63 = ".eINSTANCE.get"; >+ protected final String TEXT_64 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_65 = ".UNSET_VALUE));"; >+ protected final String TEXT_66 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_67 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_68 = ".getElement(), "; >+ protected final String TEXT_69 = ".eINSTANCE.get"; >+ protected final String TEXT_70 = "(), "; >+ protected final String TEXT_71 = ".getSource().getElement()));"; >+ protected final String TEXT_72 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_73 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_74 = ".getElement(), "; >+ protected final String TEXT_75 = ".eINSTANCE.get"; >+ protected final String TEXT_76 = "(), "; >+ protected final String TEXT_77 = ".UNSET_VALUE));"; >+ protected final String TEXT_78 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_79 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_80 = ".getElement(), "; >+ protected final String TEXT_81 = ".eINSTANCE.get"; >+ protected final String TEXT_82 = "(), "; >+ protected final String TEXT_83 = ".getTarget().getElement()));"; >+ protected final String TEXT_84 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_85 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_86 = ".getElement(), "; >+ protected final String TEXT_87 = ".eINSTANCE.get"; >+ protected final String TEXT_88 = "(), "; >+ protected final String TEXT_89 = ".UNSET_VALUE));"; >+ protected final String TEXT_90 = NL + "\t\t\t\treturn result;"; >+ protected final String TEXT_91 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_92 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_93 = ".getSource().getElement(), "; >+ protected final String TEXT_94 = ".eINSTANCE.get"; >+ protected final String TEXT_95 = "(), "; >+ protected final String TEXT_96 = ".getTarget().getElement());"; >+ protected final String TEXT_97 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_98 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_99 = ".getSource().getElement(), "; >+ protected final String TEXT_100 = ".eINSTANCE.get"; >+ protected final String TEXT_101 = "(), "; >+ protected final String TEXT_102 = ".UNSET_VALUE);"; >+ protected final String TEXT_103 = NL + "\t\t\t}"; >+ protected final String TEXT_104 = NL + "\t\t});" + NL + "\t\tinstallEditPolicy("; >+ protected final String TEXT_105 = ".CONNECTION_ENDPOINTS_ROLE, new "; >+ protected final String TEXT_106 = "());" + NL + "\t\tinstallEditPolicy("; >+ protected final String TEXT_107 = ".CONNECTION_BENDPOINTS_ROLE, new "; >+ protected final String TEXT_108 = "());" + NL + "\t}" + NL; >+ protected final String TEXT_109 = NL + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_110 = " getPrimaryLabelEditPart() {" + NL + "\t\tfor("; >+ protected final String TEXT_111 = " it = getDiagramEdge().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >+ protected final String TEXT_112 = " nextChild = ("; >+ protected final String TEXT_113 = ")it.next();" + NL + "\t\t\tif ("; >+ protected final String TEXT_114 = ".getVisualID(nextChild) == "; >+ protected final String TEXT_115 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn (EditPart) getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >+ protected final String TEXT_116 = " req) {" + NL + "\t\tif ("; >+ protected final String TEXT_117 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; >+ protected final String TEXT_118 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; >+ protected final String TEXT_119 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; >+ protected final String TEXT_120 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_121 = " getLabelEditPart("; >+ protected final String TEXT_122 = " req) {" + NL + "\t\t"; >+ protected final String TEXT_123 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_124 = " view = ("; >+ protected final String TEXT_125 = ") result.getModel();" + NL + "\t\t\tif (getDiagramEdge().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >+ protected final String TEXT_126 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >+ protected final String TEXT_127 = NL + "\t\t\t\tcase "; >+ protected final String TEXT_128 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >+ protected final String TEXT_129 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >+ protected final String TEXT_130 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn ((Edge)getModel()).getChildren();" + NL + "\t}" + NL; >+ protected final String TEXT_131 = NL; >+ protected final String TEXT_132 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_133 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_134 = " feature, "; >+ protected final String TEXT_135 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + NL; >+ protected final String TEXT_136 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >+ protected final String TEXT_137 = NL; >+ protected final String TEXT_138 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_139 = " domainModelRefresher = new "; >+ protected final String TEXT_140 = "(this);" + NL; >+ protected final String TEXT_141 = NL; >+ protected final String TEXT_142 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addRefresher("; >+ protected final String TEXT_143 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeRefresher("; >+ protected final String TEXT_144 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >+ protected final String TEXT_145 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >+ protected final String TEXT_146 = NL; >+ protected final String TEXT_147 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_148 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_149 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >+ protected final String TEXT_150 = NL; >+ protected final String TEXT_151 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_152 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; >+ protected final String TEXT_153 = NL; >+ protected final String TEXT_154 = "\t\tRefresher bendpointsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBendpoints();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_155 = ".eINSTANCE.getEdge_Bendpoints(), bendpointsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_156 = ".eINSTANCE.getRelativeBendpoints_Points(), bendpointsRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "//XXX:\t\trefreshBackgroundColor();" + NL + "//XXX:\t\trefreshForegroundColor();" + NL + "//XXX:\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t\trefreshBendpoints();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBendpoints() {" + NL + "\t\t"; >+ protected final String TEXT_157 = " bendpoints = ("; >+ protected final String TEXT_158 = ") getDiagramEdge().getBendpoints();" + NL + "\t\tif (bendpoints == null) {" + NL + "\t\t\tgetConnectionFigure().setRoutingConstraint("; >+ protected final String TEXT_159 = ".EMPTY_LIST);" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_160 = " modelConstraint = bendpoints.getPoints();" + NL + "\t\t"; >+ protected final String TEXT_161 = " figureConstraint = new "; >+ protected final String TEXT_162 = "();" + NL + "\t\tfor (int i = 0; i < modelConstraint.size(); i++) {" + NL + "\t\t\t"; >+ protected final String TEXT_163 = " wbp = ("; >+ protected final String TEXT_164 = ") modelConstraint.get(i);" + NL + "\t\t\t"; >+ protected final String TEXT_165 = " rbp = new "; >+ protected final String TEXT_166 = "(getConnectionFigure());" + NL + "\t\t\trbp.setRelativeDimensions(new "; >+ protected final String TEXT_167 = "(wbp.getSourceX(), wbp.getSourceY()), new "; >+ protected final String TEXT_168 = "(wbp.getTargetX(), wbp.getTargetY()));" + NL + "\t\t\trbp.setWeight((i + 1) / ((float) modelConstraint.size() + 1));" + NL + "\t\t\tfigureConstraint.add(rbp);" + NL + "\t\t}" + NL + "\t\tgetConnectionFigure().setRoutingConstraint(figureConstraint);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = ((View)getModel()).isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addNotify() {" + NL + "\t\tsuper.addNotify();" + NL + "\t\tgetConnectionFigure().setConnectionRouter(new "; >+ protected final String TEXT_169 = "());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Creates figure for this edit part." + NL + "\t * " + NL + "\t * Body of this method does not depend on settings in generation model" + NL + "\t * so you may safely remove <i>generated</i> tag and modify it." + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_170 = " createFigure() {"; >+ protected final String TEXT_171 = NL + "\t\treturn new "; >+ protected final String TEXT_172 = "();"; >+ protected final String TEXT_173 = NL + "\t\treturn "; >+ protected final String TEXT_174 = ";"; >+ protected final String TEXT_175 = NL + " \t\treturn new "; >+ protected final String TEXT_176 = "();"; >+ protected final String TEXT_177 = NL + "\t}" + NL; > protected final String TEXT_178 = NL; >- protected final String TEXT_179 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_180 = NL + "}"; >- protected final String TEXT_181 = NL; >+ protected final String TEXT_179 = NL; >+ protected final String TEXT_180 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_181 = NL + "}"; >+ protected final String TEXT_182 = NL; > > public String generate(Object argument) > { >@@ -227,27 +228,27 @@ > stringBuffer.append(TEXT_5); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.AbstractConnectionEditPart")); > stringBuffer.append(TEXT_6); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_7); > { > GenCommonBase genCommonBase = genLink; >- stringBuffer.append(TEXT_7); > stringBuffer.append(TEXT_8); >- stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_9); >- } >+ stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_10); >- stringBuffer.append(genLink.getEditPartClassName()); >+ } > stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(genLink.getEditPartClassName()); > stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_13); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_14); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_15); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); > stringBuffer.append(TEXT_16); > stringBuffer.append(TEXT_17); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_18); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_19); >@@ -255,39 +256,43 @@ > stringBuffer.append(TEXT_20); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_21); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_22); > stringBuffer.append(TEXT_23); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_24); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_25); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); > stringBuffer.append(TEXT_26); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_27); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); > stringBuffer.append(TEXT_28); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_29); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_30); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_31); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_32); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >+ stringBuffer.append(TEXT_33); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_34); > > { > String _edge = "getDiagramEdge()"; > >- stringBuffer.append(TEXT_33); >+ stringBuffer.append(TEXT_35); > > //input: _edge : String > >- stringBuffer.append(TEXT_34); >+ stringBuffer.append(TEXT_36); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_35); >+ stringBuffer.append(TEXT_37); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_36); >+ stringBuffer.append(TEXT_38); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); >@@ -314,188 +319,188 @@ > } > } > >- stringBuffer.append(TEXT_37); >+ stringBuffer.append(TEXT_39); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_38); >+ stringBuffer.append(TEXT_40); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_39); >+ stringBuffer.append(TEXT_41); > > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_40); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_41); >- stringBuffer.append(_edge); > stringBuffer.append(TEXT_42); >- stringBuffer.append(_edge); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); > stringBuffer.append(TEXT_43); > stringBuffer.append(_edge); > stringBuffer.append(TEXT_44); >+ stringBuffer.append(_edge); >+ stringBuffer.append(TEXT_45); >+ stringBuffer.append(_edge); >+ stringBuffer.append(TEXT_46); > > } else { > >- stringBuffer.append(TEXT_45); >+ stringBuffer.append(TEXT_47); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_46); >+ stringBuffer.append(TEXT_48); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_47); >+ stringBuffer.append(TEXT_49); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_48); >+ stringBuffer.append(TEXT_50); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_49); >+ stringBuffer.append(TEXT_51); > > } > } else { > >- stringBuffer.append(TEXT_50); >+ stringBuffer.append(TEXT_52); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_51); >+ stringBuffer.append(TEXT_53); > > } > if (removeChild) { > if (childFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_52); >+ stringBuffer.append(TEXT_54); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_53); >+ stringBuffer.append(TEXT_55); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_54); >+ stringBuffer.append(TEXT_56); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_55); >+ stringBuffer.append(TEXT_57); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_56); >+ stringBuffer.append(TEXT_58); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_57); >+ stringBuffer.append(TEXT_59); > > } else { > >- stringBuffer.append(TEXT_58); >+ stringBuffer.append(TEXT_60); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_59); >+ stringBuffer.append(TEXT_61); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_60); >+ stringBuffer.append(TEXT_62); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_61); >+ stringBuffer.append(TEXT_63); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_62); >+ stringBuffer.append(TEXT_64); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_65); > > } > } > if (removeSource) { > if (sourceFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_64); >+ stringBuffer.append(TEXT_66); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_65); >+ stringBuffer.append(TEXT_67); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_66); >+ stringBuffer.append(TEXT_68); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_67); >+ stringBuffer.append(TEXT_69); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_68); >+ stringBuffer.append(TEXT_70); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_69); >+ stringBuffer.append(TEXT_71); > > } else { > >- stringBuffer.append(TEXT_70); >+ stringBuffer.append(TEXT_72); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_73); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_72); >+ stringBuffer.append(TEXT_74); > stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_75); > stringBuffer.append(sourceFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_74); >+ stringBuffer.append(TEXT_76); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_75); >+ stringBuffer.append(TEXT_77); > > } > } > if (removeTarget) { > if (targetFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_76); >+ stringBuffer.append(TEXT_78); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_77); >+ stringBuffer.append(TEXT_79); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_78); >+ stringBuffer.append(TEXT_80); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_79); >+ stringBuffer.append(TEXT_81); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_80); >+ stringBuffer.append(TEXT_82); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_81); >+ stringBuffer.append(TEXT_83); > > } else { > >- stringBuffer.append(TEXT_82); >+ stringBuffer.append(TEXT_84); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_83); >+ stringBuffer.append(TEXT_85); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_84); >+ stringBuffer.append(TEXT_86); > stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_85); >+ stringBuffer.append(TEXT_87); > stringBuffer.append(targetFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_86); >+ stringBuffer.append(TEXT_88); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_87); >+ stringBuffer.append(TEXT_89); > > } > } > >- stringBuffer.append(TEXT_88); >+ stringBuffer.append(TEXT_90); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > if (metaFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_89); >+ stringBuffer.append(TEXT_91); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_90); >+ stringBuffer.append(TEXT_92); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_91); >+ stringBuffer.append(TEXT_93); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_92); >+ stringBuffer.append(TEXT_94); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_93); >+ stringBuffer.append(TEXT_95); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_94); >+ stringBuffer.append(TEXT_96); > > } else { > >- stringBuffer.append(TEXT_95); >+ stringBuffer.append(TEXT_97); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_96); >+ stringBuffer.append(TEXT_98); > stringBuffer.append(_edge); >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_99); > stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_98); >+ stringBuffer.append(TEXT_100); > stringBuffer.append(metaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_99); >+ stringBuffer.append(TEXT_101); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_102); > > } > > > } > >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_103); > > } //local declarations > >- stringBuffer.append(TEXT_102); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >- stringBuffer.append(TEXT_103); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy")); > stringBuffer.append(TEXT_104); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_105); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPoliciesPackageName() + ".BendpointEditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy")); > stringBuffer.append(TEXT_106); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >+ stringBuffer.append(TEXT_107); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.policies.BendpointEditPolicy")); >+ stringBuffer.append(TEXT_108); > > GenLinkLabel primaryLabel = null; > for(Iterator it = genLink.getLabels().iterator(); it.hasNext(); ) { >@@ -507,41 +512,41 @@ > } > if (primaryLabel != null) { > >- stringBuffer.append(TEXT_107); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_108); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); > stringBuffer.append(TEXT_109); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_110); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("java.util.Iterator")); > stringBuffer.append(TEXT_111); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_112); >- stringBuffer.append(importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_113); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); > stringBuffer.append(TEXT_114); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); >+ stringBuffer.append(importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_115); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_116); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); > stringBuffer.append(TEXT_117); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >- stringBuffer.append(TEXT_118); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_118); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_119); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_120); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_121); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_122); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_123); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_124); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_125); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(TEXT_126); > > for (Iterator it = genLink.getLabels().iterator(); it.hasNext(); ) { > GenLinkLabel genLabel = (GenLinkLabel) it.next(); >@@ -549,93 +554,91 @@ > continue; > } > >- stringBuffer.append(TEXT_125); >+ stringBuffer.append(TEXT_127); > stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_126); >+ stringBuffer.append(TEXT_128); > > } > >- stringBuffer.append(TEXT_127); >+ stringBuffer.append(TEXT_129); > > } //if (primaryLabel != null, i.e., there are editable labels) > >- stringBuffer.append(TEXT_128); >- stringBuffer.append(TEXT_129); > stringBuffer.append(TEXT_130); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_131); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_132); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_133); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(TEXT_134); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(TEXT_135); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > //Otherwise, there's no element associated with the element > >- stringBuffer.append(TEXT_134); >- stringBuffer.append(TEXT_135); > stringBuffer.append(TEXT_136); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); > stringBuffer.append(TEXT_137); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_138); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); > stringBuffer.append(TEXT_139); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); >+ stringBuffer.append(TEXT_140); > > } > >- stringBuffer.append(TEXT_140); > stringBuffer.append(TEXT_141); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_142); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_143); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_144); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_145); > stringBuffer.append(TEXT_146); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_147); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_148); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_149); > stringBuffer.append(TEXT_150); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_151); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_152); > stringBuffer.append(TEXT_153); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_154); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_155); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_156); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); > stringBuffer.append(TEXT_157); >- stringBuffer.append(importManager.getImportedName("java.util.Collections")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); > stringBuffer.append(TEXT_158); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("java.util.Collections")); > stringBuffer.append(TEXT_159); > stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_160); >- stringBuffer.append(importManager.getImportedName("java.util.ArrayList")); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_161); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); >+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList")); > stringBuffer.append(TEXT_162); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); > stringBuffer.append(TEXT_163); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.RelativeBendpoint")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); > stringBuffer.append(TEXT_164); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.RelativeBendpoint")); > stringBuffer.append(TEXT_165); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.RelativeBendpoint")); > stringBuffer.append(TEXT_166); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); > stringBuffer.append(TEXT_167); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BendpointConnectionRouter")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); > stringBuffer.append(TEXT_168); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BendpointConnectionRouter")); > stringBuffer.append(TEXT_169); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(TEXT_170); > > Viewmap viewmap = genLink.getViewmap(); > if (viewmap instanceof FigureViewmap) { >@@ -645,41 +648,41 @@ > figureQualifiedClassName = "org.eclipse.gmf.runtime.draw2d.PolylineConnection"; > } > >- stringBuffer.append(TEXT_170); >- stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); > stringBuffer.append(TEXT_171); >+ stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); >+ stringBuffer.append(TEXT_172); > } // instanceof FigureViewmap > else if (viewmap instanceof SnippetViewmap) { >- stringBuffer.append(TEXT_172); >- stringBuffer.append(((SnippetViewmap) viewmap).getBody()); > stringBuffer.append(TEXT_173); >+ stringBuffer.append(((SnippetViewmap) viewmap).getBody()); >+ stringBuffer.append(TEXT_174); > } // instanceof SnippetViewmap > else if (viewmap instanceof InnerClassViewmap) { >- stringBuffer.append(TEXT_174); >- stringBuffer.append(((InnerClassViewmap) viewmap).getClassName()); > stringBuffer.append(TEXT_175); >- } >+ stringBuffer.append(((InnerClassViewmap) viewmap).getClassName()); > stringBuffer.append(TEXT_176); >+ } >+ stringBuffer.append(TEXT_177); > > if (genLink.getViewmap() instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) genLink.getViewmap()).getClassBody(); > >- stringBuffer.append(TEXT_177); >- stringBuffer.append(classBody); > stringBuffer.append(TEXT_178); >+ stringBuffer.append(classBody); >+ stringBuffer.append(TEXT_179); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_179); >+ stringBuffer.append(TEXT_180); > > } > > > } > >- stringBuffer.append(TEXT_180); >- importManager.emitSortedImports(); > stringBuffer.append(TEXT_181); >+ importManager.emitSortedImports(); >+ stringBuffer.append(TEXT_182); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeLabelEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeLabelEditPartGenerator.java,v >retrieving revision 1.9 >diff -u -r1.9 NodeLabelEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeLabelEditPartGenerator.java 4 Aug 2006 17:05:48 -0000 1.9 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeLabelEditPartGenerator.java 30 Aug 2006 15:22:24 -0000 >@@ -67,196 +67,204 @@ > protected final String TEXT_47 = ".getDiagram().getElement());"; > protected final String TEXT_48 = NL + "\t\t\t\t\t\tif (parseResult.length != 1) {" + NL + "\t\t\t\t\t\t\treturn "; > protected final String TEXT_49 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_50 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]);" + NL + "\t\t\t\t\t\treturn new WrappingCommand(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_51 = " createDomainModelCommand("; >- protected final String TEXT_52 = " editingDomain, Object value) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_53 = " element = "; >- protected final String TEXT_54 = ";" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_55 = " feature = ("; >- protected final String TEXT_56 = ") "; >- protected final String TEXT_57 = ".eINSTANCE.get"; >- protected final String TEXT_58 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >- protected final String TEXT_59 = ".parseValue(feature, value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_60 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >- protected final String TEXT_61 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_62 = " result = new "; >- protected final String TEXT_63 = "();" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_64 = " values = new "; >- protected final String TEXT_65 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >- protected final String TEXT_66 = "());" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_67 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_68 = ".create(editingDomain, element, feature, valueToSet));" + NL + "\t\t\t\t\t\treturn result;"; >- protected final String TEXT_69 = NL + "\t\t\t\t\t\treturn "; >- protected final String TEXT_70 = ".create(editingDomain, element, feature, valueToSet);"; >- protected final String TEXT_71 = NL + "\t\t\t\t\t}"; >- protected final String TEXT_72 = NL + "\t\t\t\t\t\tif (parseResult.length != "; >- protected final String TEXT_73 = ") {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_74 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_75 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult);" + NL + "\t\t\t\t\t\treturn new WrappingCommand(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_76 = " createDomainModelCommand("; >- protected final String TEXT_77 = " editingDomain, Object[] values) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_78 = " element = "; >- protected final String TEXT_79 = ";" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_80 = " result = new "; >- protected final String TEXT_81 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;"; >- protected final String TEXT_82 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_83 = " "; >- protected final String TEXT_84 = "feature = ("; >- protected final String TEXT_85 = ") "; >- protected final String TEXT_86 = ".eINSTANCE.get"; >- protected final String TEXT_87 = "();" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >- protected final String TEXT_88 = ".parseValue(feature, values["; >- protected final String TEXT_89 = "]);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_90 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >- protected final String TEXT_91 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_92 = " "; >- protected final String TEXT_93 = "values = new "; >- protected final String TEXT_94 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >- protected final String TEXT_95 = "());" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_96 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_97 = ".create(editingDomain, element, feature, valueToSet));"; >- protected final String TEXT_98 = NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_50 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]);" + NL + "\t\t\t\t\t\treturn new "; >+ protected final String TEXT_51 = "(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_52 = " createDomainModelCommand("; >+ protected final String TEXT_53 = " editingDomain, Object value) {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_54 = " element = "; >+ protected final String TEXT_55 = ";" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_56 = " feature = ("; >+ protected final String TEXT_57 = ") "; >+ protected final String TEXT_58 = ".eINSTANCE.get"; >+ protected final String TEXT_59 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >+ protected final String TEXT_60 = ".parseValue(feature, value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_61 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >+ protected final String TEXT_62 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_63 = " result = new "; >+ protected final String TEXT_64 = "();" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_65 = " values = new "; >+ protected final String TEXT_66 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >+ protected final String TEXT_67 = "());" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_68 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_69 = ".create(editingDomain, element, feature, valueToSet));" + NL + "\t\t\t\t\t\treturn result;"; >+ protected final String TEXT_70 = NL + "\t\t\t\t\t\treturn "; >+ protected final String TEXT_71 = ".create(editingDomain, element, feature, valueToSet);"; >+ protected final String TEXT_72 = NL + "\t\t\t\t\t}"; >+ protected final String TEXT_73 = NL + "\t\t\t\t\t\tif (parseResult.length != "; >+ protected final String TEXT_74 = ") {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_75 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_76 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult);" + NL + "\t\t\t\t\t\treturn new "; >+ protected final String TEXT_77 = "(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_78 = " createDomainModelCommand("; >+ protected final String TEXT_79 = " editingDomain, Object[] values) {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_80 = " element = "; >+ protected final String TEXT_81 = ";" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_82 = " result = new "; >+ protected final String TEXT_83 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;"; >+ protected final String TEXT_84 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_85 = " "; >+ protected final String TEXT_86 = "feature = ("; >+ protected final String TEXT_87 = ") "; >+ protected final String TEXT_88 = ".eINSTANCE.get"; >+ protected final String TEXT_89 = "();" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >+ protected final String TEXT_90 = ".parseValue(feature, values["; >+ protected final String TEXT_91 = "]);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_92 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >+ protected final String TEXT_93 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_94 = " "; >+ protected final String TEXT_95 = "values = new "; >+ protected final String TEXT_96 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >+ protected final String TEXT_97 = "());" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_98 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; > protected final String TEXT_99 = ".create(editingDomain, element, feature, valueToSet));"; >- protected final String TEXT_100 = NL + "\t\t\t\t\t\treturn result;" + NL + "\t\t\t\t\t}"; >- protected final String TEXT_101 = NL + "\t\t\t\t});"; >- protected final String TEXT_102 = NL + "\t}" + NL; >- protected final String TEXT_103 = NL; >- protected final String TEXT_104 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >- protected final String TEXT_105 = " req) {" + NL + "\t\tif ("; >- protected final String TEXT_106 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(req);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_107 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tmanager = new "; >- protected final String TEXT_108 = "(this, "; >- protected final String TEXT_109 = ".class, new "; >- protected final String TEXT_110 = "() {" + NL + "\t\t\t\tpublic void relocate("; >- protected final String TEXT_111 = " celleditor) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_112 = " rect = getLabel().getTextBounds();" + NL + "\t\t\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "\t\t\t\t\tcelleditor.getControl().setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t}) {" + NL + "\t\t\t\tprotected void initCellEditor() {" + NL + "\t\t\t\t\tgetCellEditor().setValue(getLabelEditText());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL; >- protected final String TEXT_113 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tgetLabel().setText(getLabelText());" + NL + "\t\tgetLabel().setIcon(getLabelIcon());" + NL + "\t}" + NL; >- protected final String TEXT_114 = NL; >- protected final String TEXT_115 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String VIEW_PATTERN = \""; >- protected final String TEXT_116 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String EDIT_PATTERN = \""; >- protected final String TEXT_117 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t"; >- protected final String TEXT_118 = " element = "; >- protected final String TEXT_119 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, VIEW_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelEditText() {" + NL + "\t\t"; >+ protected final String TEXT_100 = NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_101 = ".create(editingDomain, element, feature, valueToSet));"; >+ protected final String TEXT_102 = NL + "\t\t\t\t\t\treturn result;" + NL + "\t\t\t\t\t}"; >+ protected final String TEXT_103 = NL + "\t\t\t\t});"; >+ protected final String TEXT_104 = NL + "\t}" + NL; >+ protected final String TEXT_105 = NL; >+ protected final String TEXT_106 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >+ protected final String TEXT_107 = " req) {" + NL + "\t\tif ("; >+ protected final String TEXT_108 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(req);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_109 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tmanager = new "; >+ protected final String TEXT_110 = "(this, "; >+ protected final String TEXT_111 = ".class, new "; >+ protected final String TEXT_112 = "() {" + NL + "\t\t\t\tpublic void relocate("; >+ protected final String TEXT_113 = " celleditor) {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_114 = " rect = getLabel().getTextBounds();" + NL + "\t\t\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "\t\t\t\t\tcelleditor.getControl().setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t}) {" + NL + "\t\t\t\tprotected void initCellEditor() {" + NL + "\t\t\t\t\tgetCellEditor().setValue(getLabelEditText());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL; >+ protected final String TEXT_115 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tgetLabel().setText(getLabelText());" + NL + "\t\tgetLabel().setIcon(getLabelIcon());" + NL + "\t}" + NL; >+ protected final String TEXT_116 = NL; >+ protected final String TEXT_117 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String VIEW_PATTERN = \""; >+ protected final String TEXT_118 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String EDIT_PATTERN = \""; >+ protected final String TEXT_119 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t"; > protected final String TEXT_120 = " element = "; >- protected final String TEXT_121 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, EDIT_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String buildTextByPattern("; >- protected final String TEXT_122 = " element, String pattern) {"; >- protected final String TEXT_123 = NL + "\t\tif ("; >- protected final String TEXT_124 = " == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}"; >- protected final String TEXT_125 = NL + "\t\treturn "; >- protected final String TEXT_126 = ".format(pattern, new Object[] {"; >- protected final String TEXT_127 = NL + "\t\t\tnew "; >- protected final String TEXT_128 = "("; >- protected final String TEXT_129 = ")"; >- protected final String TEXT_130 = NL + "\t\t});"; >- protected final String TEXT_131 = NL + "\t\treturn "; >- protected final String TEXT_132 = ".format(pattern, new Object[] {"; >- protected final String TEXT_133 = NL + "\t\t\tnew "; >- protected final String TEXT_134 = "("; >- protected final String TEXT_135 = ")"; >- protected final String TEXT_136 = ","; >- protected final String TEXT_137 = NL + "\t\t});"; >- protected final String TEXT_138 = NL + "\t\t//XXX: unexpected model facet." + NL + "\t\treturn defaultText;"; >- protected final String TEXT_139 = NL + "\t}"; >- protected final String TEXT_140 = NL; >- protected final String TEXT_141 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >- protected final String TEXT_142 = NL + "\t\t"; >- protected final String TEXT_143 = " style =" + NL + "\t\t\t("; >- protected final String TEXT_144 = ") "; >- protected final String TEXT_145 = ".getStyle(" + NL + "\t\t\t\t"; >- protected final String TEXT_146 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_147 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >- protected final String TEXT_148 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_149 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_150 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_151 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >- protected final String TEXT_152 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >- protected final String TEXT_153 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >- protected final String TEXT_154 = "\t" + NL + "\t}"; >- protected final String TEXT_155 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_156 = " createdFont;"; >- protected final String TEXT_157 = "\t"; >- protected final String TEXT_158 = NL; >- protected final String TEXT_159 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFontColor() {" + NL + "\t\t"; >- protected final String TEXT_160 = " style = ("; >- protected final String TEXT_161 = ") "; >- protected final String TEXT_162 = ".getStyle("; >- protected final String TEXT_163 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_164 = " toDispose = createdFontColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint fontColor = style.getFontColor();" + NL + "\t\t\tint red = fontColor & 0x000000FF;" + NL + "\t\t\tint green = (fontColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (fontColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_165 = " currentColor = getLabel().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFontColor = new "; >- protected final String TEXT_166 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdFontColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedFontColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshFontColor()}) currently assigned to the label." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_167 = " createdFontColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_168 = " getLabelIcon() {"; >- protected final String TEXT_169 = NL + "\t\t"; >- protected final String TEXT_170 = " element = resolveSemanticElement();" + NL + "\t\t"; >- protected final String TEXT_171 = " imageDescriptor = "; >- protected final String TEXT_172 = ".getInstance().getItemImageDescriptor(element);" + NL + "\t\tif (imageDescriptor != null) {" + NL + "\t\t\treturn imageDescriptor.createImage();" + NL + "\t\t}"; >- protected final String TEXT_173 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_174 = " resolveSemanticElement() {" + NL + "\t\tView view = (View) getModel();" + NL + "\t\treturn (view.getElement() instanceof "; >- protected final String TEXT_175 = ") ? ("; >- protected final String TEXT_176 = ") view.getElement() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_177 = " getUpdatableParent() {" + NL + "\t\tfor(EditPart editPart = getParent(); editPart != null; editPart = editPart.getParent()) {" + NL + "\t\t\tif (editPart instanceof "; >- protected final String TEXT_178 = ") {" + NL + "\t\t\t\treturn ("; >- protected final String TEXT_179 = ") editPart;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\t"; >- protected final String TEXT_180 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_181 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_182 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_183 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_184 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_185 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >- protected final String TEXT_186 = NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_187 = ".eINSTANCE.get"; >- protected final String TEXT_188 = "(), labelRefresher);"; >- protected final String TEXT_189 = NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_190 = ".eINSTANCE.get"; >- protected final String TEXT_191 = "(), labelRefresher);"; >- protected final String TEXT_192 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tsuper.deactivate();" + NL + "\t\t"; >- protected final String TEXT_193 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_194 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_195 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_196 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_197 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_198 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >- protected final String TEXT_199 = NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_200 = ".eINSTANCE.get"; >- protected final String TEXT_201 = "(), labelRefresher);"; >- protected final String TEXT_202 = NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_203 = ".eINSTANCE.get"; >- protected final String TEXT_204 = "(), labelRefresher);"; >- protected final String TEXT_205 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IUpdatableEditPart.Refresher labelRefresher = new IUpdatableEditPart.Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshLabel();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IUpdatableEditPart.Refresher fontColorRefresher = new IUpdatableEditPart.Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFontColor();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IUpdatableEditPart.Refresher fontRefresher = new IUpdatableEditPart.Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFont();" + NL + "\t\t}" + NL + "\t};"; >- protected final String TEXT_206 = NL; >- protected final String TEXT_207 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_208 = " createFigure() {" + NL + "\t\t// Parent should assign one using "; >- protected final String TEXT_209 = " method" + NL + "\t\treturn null;" + NL + "\t}"; >- protected final String TEXT_210 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_211 = " createLabel() {"; >- protected final String TEXT_212 = NL + "\t\treturn new "; >- protected final String TEXT_213 = "();"; >- protected final String TEXT_214 = NL + "\t\treturn "; >- protected final String TEXT_215 = ";"; >- protected final String TEXT_216 = NL + "\t\treturn new "; >- protected final String TEXT_217 = "();"; >- protected final String TEXT_218 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_219 = " createFigure() {" + NL + "\t\t"; >- protected final String TEXT_220 = " label = createLabel();"; >- protected final String TEXT_221 = NL + "\t\tdefaultText = label.getText();"; >- protected final String TEXT_222 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >- protected final String TEXT_223 = NL + "\t\treturn label;" + NL + "\t}"; >- protected final String TEXT_224 = NL + NL + "\t/**"; >- protected final String TEXT_225 = NL + "\t * TODO: reimplement, since the figure used by this editpart is not a Label."; >- protected final String TEXT_226 = NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_227 = " getLabel() {" + NL + "\t\treturn ("; >- protected final String TEXT_228 = ") getFigure();" + NL + "\t}" + NL; >- protected final String TEXT_229 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void "; >- protected final String TEXT_230 = "("; >- protected final String TEXT_231 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);"; >- protected final String TEXT_232 = NL + "\t\tdefaultText = figure.getText();"; >- protected final String TEXT_233 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >- protected final String TEXT_234 = NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL; >- protected final String TEXT_235 = NL; >- protected final String TEXT_236 = NL; >- protected final String TEXT_237 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_238 = NL + "}"; >- protected final String TEXT_239 = NL; >+ protected final String TEXT_121 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, VIEW_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelEditText() {" + NL + "\t\t"; >+ protected final String TEXT_122 = " element = "; >+ protected final String TEXT_123 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, EDIT_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String buildTextByPattern("; >+ protected final String TEXT_124 = " element, String pattern) {"; >+ protected final String TEXT_125 = NL + "\t\tif ("; >+ protected final String TEXT_126 = " == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}"; >+ protected final String TEXT_127 = NL + "\t\treturn "; >+ protected final String TEXT_128 = ".format(pattern, new Object[] {"; >+ protected final String TEXT_129 = NL + "\t\t\tnew "; >+ protected final String TEXT_130 = "("; >+ protected final String TEXT_131 = ")"; >+ protected final String TEXT_132 = NL + "\t\t});"; >+ protected final String TEXT_133 = NL + "\t\treturn "; >+ protected final String TEXT_134 = ".format(pattern, new Object[] {"; >+ protected final String TEXT_135 = NL + "\t\t\tnew "; >+ protected final String TEXT_136 = "("; >+ protected final String TEXT_137 = ")"; >+ protected final String TEXT_138 = ","; >+ protected final String TEXT_139 = NL + "\t\t});"; >+ protected final String TEXT_140 = NL + "\t\t//XXX: unexpected model facet." + NL + "\t\treturn defaultText;"; >+ protected final String TEXT_141 = NL + "\t}"; >+ protected final String TEXT_142 = NL; >+ protected final String TEXT_143 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >+ protected final String TEXT_144 = NL + "\t\t"; >+ protected final String TEXT_145 = " style =" + NL + "\t\t\t("; >+ protected final String TEXT_146 = ") "; >+ protected final String TEXT_147 = ".getStyle(" + NL + "\t\t\t\t"; >+ protected final String TEXT_148 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_149 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >+ protected final String TEXT_150 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_151 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_152 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_153 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_154 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >+ protected final String TEXT_155 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >+ protected final String TEXT_156 = "\t" + NL + "\t}"; >+ protected final String TEXT_157 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_158 = " createdFont;"; >+ protected final String TEXT_159 = "\t"; >+ protected final String TEXT_160 = NL; >+ protected final String TEXT_161 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFontColor() {" + NL + "\t\t"; >+ protected final String TEXT_162 = " style = ("; >+ protected final String TEXT_163 = ") "; >+ protected final String TEXT_164 = ".getStyle("; >+ protected final String TEXT_165 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_166 = " toDispose = createdFontColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint fontColor = style.getFontColor();" + NL + "\t\t\tint red = fontColor & 0x000000FF;" + NL + "\t\t\tint green = (fontColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (fontColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_167 = " currentColor = getLabel().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFontColor = new "; >+ protected final String TEXT_168 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdFontColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedFontColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshFontColor()}) currently assigned to the label." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_169 = " createdFontColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_170 = " getLabelIcon() {"; >+ protected final String TEXT_171 = NL + "\t\t"; >+ protected final String TEXT_172 = " element = resolveSemanticElement();" + NL + "\t\t"; >+ protected final String TEXT_173 = " imageDescriptor = "; >+ protected final String TEXT_174 = ".getInstance().getItemImageDescriptor(element);" + NL + "\t\tif (imageDescriptor != null) {" + NL + "\t\t\treturn imageDescriptor.createImage();" + NL + "\t\t}"; >+ protected final String TEXT_175 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_176 = " resolveSemanticElement() {" + NL + "\t\tView view = (View) getModel();" + NL + "\t\treturn (view.getElement() instanceof "; >+ protected final String TEXT_177 = ") ? ("; >+ protected final String TEXT_178 = ") view.getElement() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_179 = " getUpdatableParent() {" + NL + "\t\tfor(EditPart editPart = getParent(); editPart != null; editPart = editPart.getParent()) {" + NL + "\t\t\tif (editPart instanceof "; >+ protected final String TEXT_180 = ") {" + NL + "\t\t\t\treturn ("; >+ protected final String TEXT_181 = ") editPart;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\t"; >+ protected final String TEXT_182 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_183 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_184 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_185 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_186 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_187 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >+ protected final String TEXT_188 = NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_189 = ".eINSTANCE.get"; >+ protected final String TEXT_190 = "(), labelRefresher);"; >+ protected final String TEXT_191 = NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_192 = ".eINSTANCE.get"; >+ protected final String TEXT_193 = "(), labelRefresher);"; >+ protected final String TEXT_194 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tsuper.deactivate();" + NL + "\t\t"; >+ protected final String TEXT_195 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_196 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_197 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_198 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_199 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_200 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >+ protected final String TEXT_201 = NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_202 = ".eINSTANCE.get"; >+ protected final String TEXT_203 = "(), labelRefresher);"; >+ protected final String TEXT_204 = NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_205 = ".eINSTANCE.get"; >+ protected final String TEXT_206 = "(), labelRefresher);"; >+ protected final String TEXT_207 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_208 = ".Refresher labelRefresher = new "; >+ protected final String TEXT_209 = ".Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshLabel();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_210 = ".Refresher fontColorRefresher = new "; >+ protected final String TEXT_211 = ".Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFontColor();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_212 = ".Refresher fontRefresher = new "; >+ protected final String TEXT_213 = ".Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFont();" + NL + "\t\t}" + NL + "\t};"; >+ protected final String TEXT_214 = NL; >+ protected final String TEXT_215 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_216 = " createFigure() {" + NL + "\t\t// Parent should assign one using "; >+ protected final String TEXT_217 = " method" + NL + "\t\treturn null;" + NL + "\t}"; >+ protected final String TEXT_218 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_219 = " createLabel() {"; >+ protected final String TEXT_220 = NL + "\t\treturn new "; >+ protected final String TEXT_221 = "();"; >+ protected final String TEXT_222 = NL + "\t\treturn "; >+ protected final String TEXT_223 = ";"; >+ protected final String TEXT_224 = NL + "\t\treturn new "; >+ protected final String TEXT_225 = "();"; >+ protected final String TEXT_226 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_227 = " createFigure() {" + NL + "\t\t"; >+ protected final String TEXT_228 = " label = createLabel();"; >+ protected final String TEXT_229 = NL + "\t\tdefaultText = label.getText();"; >+ protected final String TEXT_230 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >+ protected final String TEXT_231 = NL + "\t\treturn label;" + NL + "\t}"; >+ protected final String TEXT_232 = NL + NL + "\t/**"; >+ protected final String TEXT_233 = NL + "\t * TODO: reimplement, since the figure used by this editpart is not a Label."; >+ protected final String TEXT_234 = NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_235 = " getLabel() {" + NL + "\t\treturn ("; >+ protected final String TEXT_236 = ") getFigure();" + NL + "\t}" + NL; >+ protected final String TEXT_237 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void "; >+ protected final String TEXT_238 = "("; >+ protected final String TEXT_239 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);"; >+ protected final String TEXT_240 = NL + "\t\tdefaultText = figure.getText();"; >+ protected final String TEXT_241 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >+ protected final String TEXT_242 = NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL; >+ protected final String TEXT_243 = NL; >+ protected final String TEXT_244 = NL; >+ protected final String TEXT_245 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_246 = NL + "}"; >+ protected final String TEXT_247 = NL; > > public String generate(Object argument) > { >@@ -431,166 +439,170 @@ > stringBuffer.append(TEXT_49); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_50); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_51); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_52); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_53); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_54); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >+ stringBuffer.append(resolvedSemanticElement); > stringBuffer.append(TEXT_55); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_56); >- stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_57); >- stringBuffer.append(featureToSet.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_58); >- stringBuffer.append(importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())); >+ stringBuffer.append(featureToSet.getFeatureAccessorName()); > stringBuffer.append(TEXT_59); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); > stringBuffer.append(TEXT_60); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(TEXT_61); > > if (ecoreFeature.isMany()) { > >- stringBuffer.append(TEXT_61); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_62); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_63); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_64); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); > stringBuffer.append(TEXT_65); >- stringBuffer.append(featureToSet.getAccessorName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); > stringBuffer.append(TEXT_66); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >+ stringBuffer.append(featureToSet.getAccessorName()); > stringBuffer.append(TEXT_67); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); > stringBuffer.append(TEXT_68); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >+ stringBuffer.append(TEXT_69); > > } else { > >- stringBuffer.append(TEXT_69); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_70); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >+ stringBuffer.append(TEXT_71); > > } > >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_72); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); > >- stringBuffer.append(TEXT_72); >- stringBuffer.append(metaFeatures.size()); > stringBuffer.append(TEXT_73); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(metaFeatures.size()); > stringBuffer.append(TEXT_74); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_75); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_76); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_77); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_78); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_79); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_80); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(resolvedSemanticElement); > stringBuffer.append(TEXT_81); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_82); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_83); > > boolean haveDeclaredValues = false; > for(int i = 0; i < metaFeatures.size(); i++) { > GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); > EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); > >- stringBuffer.append(TEXT_82); >- if (i == 0) { >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >- stringBuffer.append(TEXT_83); >- } > stringBuffer.append(TEXT_84); >+ if (i == 0) { > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_85); >- stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); >+ } > stringBuffer.append(TEXT_86); >- stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_87); >- stringBuffer.append(importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_88); >- stringBuffer.append(i); >+ stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); > stringBuffer.append(TEXT_89); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); > stringBuffer.append(TEXT_90); >+ stringBuffer.append(i); >+ stringBuffer.append(TEXT_91); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(TEXT_92); > > if (nextEcoreFeature.isMany()) { > >- stringBuffer.append(TEXT_91); >+ stringBuffer.append(TEXT_93); > if (!haveDeclaredValues) { haveDeclaredValues = true; > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); >- stringBuffer.append(TEXT_92); >+ stringBuffer.append(TEXT_94); > } >- stringBuffer.append(TEXT_93); >+ stringBuffer.append(TEXT_95); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); >- stringBuffer.append(TEXT_94); >+ stringBuffer.append(TEXT_96); > stringBuffer.append(nextFeatureToSet.getAccessorName()); >- stringBuffer.append(TEXT_95); >+ stringBuffer.append(TEXT_97); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_96); >+ stringBuffer.append(TEXT_98); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_99); > > } else { > >- stringBuffer.append(TEXT_98); >+ stringBuffer.append(TEXT_100); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_99); >+ stringBuffer.append(TEXT_101); > > } > > > } > >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_102); > > } > >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_103); > > } > >- stringBuffer.append(TEXT_102); >+ stringBuffer.append(TEXT_104); > > if (!isReadOnly) { > >- stringBuffer.append(TEXT_103); >- stringBuffer.append(TEXT_104); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_105); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); > stringBuffer.append(TEXT_106); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_107); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); > stringBuffer.append(TEXT_108); >- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); > stringBuffer.append(TEXT_109); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); > stringBuffer.append(TEXT_110); >- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); > stringBuffer.append(TEXT_111); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); > stringBuffer.append(TEXT_112); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); >+ stringBuffer.append(TEXT_113); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(TEXT_114); > > } > >- stringBuffer.append(TEXT_113); >- stringBuffer.append(TEXT_114); >+ stringBuffer.append(TEXT_115); >+ stringBuffer.append(TEXT_116); > > /*genFeature.getObjectType() throws NPE on primitive types. This is a workaround. */ > HashMap primitiveTypeToWrapperClassName = new HashMap(); >@@ -634,14 +646,10 @@ > } > } > >- stringBuffer.append(TEXT_115); >- stringBuffer.append(viewPattern); >- stringBuffer.append(TEXT_116); >- stringBuffer.append(editPattern); > stringBuffer.append(TEXT_117); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(viewPattern); > stringBuffer.append(TEXT_118); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(editPattern); > stringBuffer.append(TEXT_119); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_120); >@@ -649,76 +657,80 @@ > stringBuffer.append(TEXT_121); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_122); >+ stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(TEXT_123); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(TEXT_124); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; > GenFeature feature = featureLabelModelFacet.getMetaFeature(); > if (!feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_123); >+ stringBuffer.append(TEXT_125); > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); >- stringBuffer.append(TEXT_124); >+ stringBuffer.append(TEXT_126); > > } > >- stringBuffer.append(TEXT_125); >+ stringBuffer.append(TEXT_127); > stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_126); >+ stringBuffer.append(TEXT_128); > > if (feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_127); >+ stringBuffer.append(TEXT_129); > stringBuffer.append(primitiveTypeToWrapperClassName.get(feature.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); >- stringBuffer.append(TEXT_128); >+ stringBuffer.append(TEXT_130); > > } > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); > if (feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_129); >+ stringBuffer.append(TEXT_131); > > } > >- stringBuffer.append(TEXT_130); >+ stringBuffer.append(TEXT_132); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > >- stringBuffer.append(TEXT_131); >+ stringBuffer.append(TEXT_133); > stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_132); >+ stringBuffer.append(TEXT_134); > > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > if (next.isPrimitiveType()) { > >- stringBuffer.append(TEXT_133); >+ stringBuffer.append(TEXT_135); > stringBuffer.append(primitiveTypeToWrapperClassName.get(next.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); >- stringBuffer.append(TEXT_134); >+ stringBuffer.append(TEXT_136); > > } > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", next, underlyingMetaClass, false); > if (next.isPrimitiveType()) { > >- stringBuffer.append(TEXT_135); >+ stringBuffer.append(TEXT_137); > > } > if (it.hasNext()) { >- stringBuffer.append(TEXT_136); >+ stringBuffer.append(TEXT_138); > } > > } > >- stringBuffer.append(TEXT_137); >+ stringBuffer.append(TEXT_139); > > } else { > >- stringBuffer.append(TEXT_138); >+ stringBuffer.append(TEXT_140); > > } > >- stringBuffer.append(TEXT_139); >- stringBuffer.append(TEXT_140); >+ stringBuffer.append(TEXT_141); >+ stringBuffer.append(TEXT_142); > > boolean isFixedFontSetInFigure; > { >@@ -726,98 +738,94 @@ > isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont(); > } > >- stringBuffer.append(TEXT_141); >+ stringBuffer.append(TEXT_143); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_142); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_143); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_144); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_145); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_146); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_147); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_148); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_149); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_150); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_151); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_152); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_153); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >+ stringBuffer.append(TEXT_154); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(TEXT_155); > > } > >- stringBuffer.append(TEXT_154); >+ stringBuffer.append(TEXT_156); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_155); >+ stringBuffer.append(TEXT_157); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_156); >+ stringBuffer.append(TEXT_158); > > } > >- stringBuffer.append(TEXT_157); >- stringBuffer.append(TEXT_158); > stringBuffer.append(TEXT_159); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_160); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_161); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_162); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_163); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_164); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_165); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_166); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_167); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_168); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(TEXT_169); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); >+ stringBuffer.append(TEXT_170); > > if (genLabel.isElementIcon()) { > >- stringBuffer.append(TEXT_169); >+ stringBuffer.append(TEXT_171); > stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_170); >+ stringBuffer.append(TEXT_172); > stringBuffer.append(importManager.getImportedName("org.eclipse.jface.resource.ImageDescriptor")); >- stringBuffer.append(TEXT_171); >+ stringBuffer.append(TEXT_173); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_172); >+ stringBuffer.append(TEXT_174); > > } > >- stringBuffer.append(TEXT_173); >- stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_174); >- stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); > stringBuffer.append(TEXT_175); > stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); > stringBuffer.append(TEXT_176); >- stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); > stringBuffer.append(TEXT_177); >- stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); > stringBuffer.append(TEXT_178); > stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_179); > stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_180); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_181); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_182); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_183); >@@ -825,36 +833,36 @@ > stringBuffer.append(TEXT_184); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_185); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_186); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_187); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > GenFeature feature = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); > >- stringBuffer.append(TEXT_186); >+ stringBuffer.append(TEXT_188); > stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_187); >+ stringBuffer.append(TEXT_189); > stringBuffer.append(feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_188); >+ stringBuffer.append(TEXT_190); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > >- stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_191); > stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_190); >+ stringBuffer.append(TEXT_192); > stringBuffer.append(next.getFeatureAccessorName()); >- stringBuffer.append(TEXT_191); >+ stringBuffer.append(TEXT_193); > > } > } > >- stringBuffer.append(TEXT_192); >- stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_193); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_194); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_195); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_196); >@@ -862,35 +870,51 @@ > stringBuffer.append(TEXT_197); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_198); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_199); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_200); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > GenFeature feature = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); > >- stringBuffer.append(TEXT_199); >+ stringBuffer.append(TEXT_201); > stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_200); >+ stringBuffer.append(TEXT_202); > stringBuffer.append(feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_201); >+ stringBuffer.append(TEXT_203); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > >- stringBuffer.append(TEXT_202); >+ stringBuffer.append(TEXT_204); > stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_203); >+ stringBuffer.append(TEXT_205); > stringBuffer.append(next.getFeatureAccessorName()); >- stringBuffer.append(TEXT_204); >+ stringBuffer.append(TEXT_206); > > } > } > >- stringBuffer.append(TEXT_205); >+ stringBuffer.append(TEXT_207); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_208); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_209); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_210); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_211); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_212); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_213); > > final Viewmap viewmap = genLabel.getViewmap(); > >- stringBuffer.append(TEXT_206); >+ stringBuffer.append(TEXT_214); > > final String figureQualifiedClassName; > if (viewmap instanceof ParentAssignedViewmap) { >@@ -919,64 +943,64 @@ > if (viewmap instanceof ParentAssignedViewmap) { > final ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; > >- stringBuffer.append(TEXT_207); >+ stringBuffer.append(TEXT_215); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_208); >+ stringBuffer.append(TEXT_216); > stringBuffer.append((parentAssignedViewmap.getSetterName() == null ? "setLabel" : parentAssignedViewmap.getSetterName())); >- stringBuffer.append(TEXT_209); >+ stringBuffer.append(TEXT_217); > } else { >- stringBuffer.append(TEXT_210); >+ stringBuffer.append(TEXT_218); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_211); >+ stringBuffer.append(TEXT_219); > > if (viewmap instanceof FigureViewmap) { > >- stringBuffer.append(TEXT_212); >+ stringBuffer.append(TEXT_220); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_213); >+ stringBuffer.append(TEXT_221); > } // instanceof FigureViewmap > else if (viewmap instanceof SnippetViewmap) { >- stringBuffer.append(TEXT_214); >+ stringBuffer.append(TEXT_222); > stringBuffer.append(((SnippetViewmap) viewmap).getBody()); >- stringBuffer.append(TEXT_215); >+ stringBuffer.append(TEXT_223); > } // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter > else if (viewmap instanceof InnerClassViewmap) { > >- stringBuffer.append(TEXT_216); >+ stringBuffer.append(TEXT_224); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_217); >+ stringBuffer.append(TEXT_225); > } >- stringBuffer.append(TEXT_218); >+ stringBuffer.append(TEXT_226); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_219); >+ stringBuffer.append(TEXT_227); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_220); >+ stringBuffer.append(TEXT_228); > > if ("org.eclipse.draw2d.Label".equals(figureQualifiedClassName) || viewmap instanceof InnerClassViewmap) { > >- stringBuffer.append(TEXT_221); >+ stringBuffer.append(TEXT_229); > > } else { > >- stringBuffer.append(TEXT_222); >+ stringBuffer.append(TEXT_230); > > } > >- stringBuffer.append(TEXT_223); >+ stringBuffer.append(TEXT_231); > } /*not parent-assigned*/ >- stringBuffer.append(TEXT_224); >+ stringBuffer.append(TEXT_232); > > if (!"org.eclipse.draw2d.Label".equals(figureQualifiedClassName) && viewmap instanceof InnerClassViewmap==false) { > >- stringBuffer.append(TEXT_225); >+ stringBuffer.append(TEXT_233); > > } > >- stringBuffer.append(TEXT_226); >+ stringBuffer.append(TEXT_234); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); >- stringBuffer.append(TEXT_227); >+ stringBuffer.append(TEXT_235); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); >- stringBuffer.append(TEXT_228); >+ stringBuffer.append(TEXT_236); > > String labelSetterName = "setLabel"; // same assumption in NodeEditPart > String labelFigureClassName = "org.eclipse.draw2d.IFigure"; >@@ -990,43 +1014,43 @@ > } > } // FIXME perhaps, there's no sense to have setLabel for any other viewmap than ParentAssigned? > >- stringBuffer.append(TEXT_229); >+ stringBuffer.append(TEXT_237); > stringBuffer.append(labelSetterName); >- stringBuffer.append(TEXT_230); >+ stringBuffer.append(TEXT_238); > stringBuffer.append(importManager.getImportedName(labelFigureClassName)); >- stringBuffer.append(TEXT_231); >+ stringBuffer.append(TEXT_239); > > if ("org.eclipse.draw2d.Label".equals(labelFigureClassName)) { > >- stringBuffer.append(TEXT_232); >+ stringBuffer.append(TEXT_240); > > } else { > >- stringBuffer.append(TEXT_233); >+ stringBuffer.append(TEXT_241); > > } > >- stringBuffer.append(TEXT_234); >+ stringBuffer.append(TEXT_242); > > if (viewmap instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) viewmap).getClassBody(); > >- stringBuffer.append(TEXT_235); >+ stringBuffer.append(TEXT_243); > stringBuffer.append(classBody); >- stringBuffer.append(TEXT_236); >+ stringBuffer.append(TEXT_244); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_237); >+ stringBuffer.append(TEXT_245); > > } > > > } > >- stringBuffer.append(TEXT_238); >+ stringBuffer.append(TEXT_246); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_239); >+ stringBuffer.append(TEXT_247); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/CompartmentEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/CompartmentEditPartGenerator.java,v >retrieving revision 1.8 >diff -u -r1.8 CompartmentEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/CompartmentEditPartGenerator.java 9 Aug 2006 14:34:54 -0000 1.8 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/CompartmentEditPartGenerator.java 30 Aug 2006 15:22:21 -0000 >@@ -39,273 +39,261 @@ > protected final String TEXT_20 = NL; > protected final String TEXT_21 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; > protected final String TEXT_22 = " extends "; >- protected final String TEXT_23 = " implements IUpdatableEditPart {"; >- protected final String TEXT_24 = NL; >- protected final String TEXT_25 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >- protected final String TEXT_26 = ";"; >- protected final String TEXT_27 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_28 = "(View view) {" + NL + "\t\tsetModel(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_29 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_30 = " getDiagramNode() {" + NL + "\t\treturn ("; >- protected final String TEXT_31 = ") getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {"; >- protected final String TEXT_32 = NL + "\t\tinstallEditPolicy("; >- protected final String TEXT_33 = ".LAYOUT_ROLE, new "; >- protected final String TEXT_34 = "() {" + NL + "\t\t\tprotected Command createChangeConstraintCommand(final "; >- protected final String TEXT_35 = " request, final EditPart child, Object constraint) {" + NL + "\t\t\t\tfinal Node node = (Node) child.getModel();" + NL + "\t\t\t\t"; >- protected final String TEXT_36 = " emfCommand = new "; >- protected final String TEXT_37 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate "; >- protected final String TEXT_38 = " moveDelta;" + NL + "\t\t\t\t\tprivate "; >- protected final String TEXT_39 = " resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof Bounds == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_40 = " original = new "; >- protected final String TEXT_41 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_42 = " referenceFigure = (("; >- protected final String TEXT_43 = ")child).getFigure();" + NL + "\t\t\t\t\t\treferenceFigure.translateToAbsolute(original);" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_44 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(transformed);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute("; >- protected final String TEXT_45 = " move, "; >- protected final String TEXT_46 = " resize) {" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_47 = ".getEditingDomain(node.getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn "; >- protected final String TEXT_48 = ".INSTANCE;" + NL + "\t\t\t}"; >- protected final String TEXT_49 = NL + "\t\tinstallEditPolicy("; >- protected final String TEXT_50 = ".LAYOUT_ROLE, new "; >- protected final String TEXT_51 = "() {" + NL + "\t\t\tprotected Object getConstraintFor("; >- protected final String TEXT_52 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor("; >- protected final String TEXT_53 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\treturn "; >- protected final String TEXT_54 = ".INSTANCE;" + NL + "\t\t\t}"; >- protected final String TEXT_55 = NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {"; >- protected final String TEXT_56 = NL + "\t\t\t\tif (request instanceof "; >- protected final String TEXT_57 = ".CreateRequestEx) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_58 = ".CreateRequestEx requestEx = ("; >- protected final String TEXT_59 = ".CreateRequestEx) request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >- protected final String TEXT_60 = " result = new "; >- protected final String TEXT_61 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >- protected final String TEXT_62 = NL + "\t\t\t\t\t\tcase "; >- protected final String TEXT_63 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >- protected final String TEXT_64 = "Command((View) getModel(), requestEx"; >- protected final String TEXT_65 = ", " + NL + "\t\t\t\t\t\t\t\t("; >- protected final String TEXT_66 = ")getConstraintFor(request)"; >- protected final String TEXT_67 = "));" + NL + "\t\t\t\t\t\t\tbreak;"; >- protected final String TEXT_68 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_69 = ".getEditingDomain(((View) getModel()).getDiagram().getElement()), result);" + NL + "\t\t\t\t}"; >- protected final String TEXT_70 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getTitleName() {" + NL + "\t\treturn \""; >- protected final String TEXT_71 = "\";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_72 = " createFigure() {" + NL + "\t\t"; >- protected final String TEXT_73 = " result = new "; >- protected final String TEXT_74 = "();" + NL + "\t\tresult.setLabel(getTitleName());" + NL + "\t\tresult.setOpaque(false);" + NL + "\t\tresult.setLayoutManager(new "; >- protected final String TEXT_75 = "());" + NL + "\t\t"; >- protected final String TEXT_76 = " scrollPane = new "; >- protected final String TEXT_77 = "();" + NL + "\t\tresult.add(scrollPane);"; >- protected final String TEXT_78 = NL + "\t\t"; >- protected final String TEXT_79 = " viewport = new "; >- protected final String TEXT_80 = "();" + NL + "\t\tcontentPane = new "; >- protected final String TEXT_81 = "();" + NL + "\t\tcontentPane.setLayoutManager(new "; >- protected final String TEXT_82 = "());"; >- protected final String TEXT_83 = NL + "\t\t"; >- protected final String TEXT_84 = " viewport = new "; >- protected final String TEXT_85 = "();" + NL + "\t\tcontentPane = new "; >- protected final String TEXT_86 = "();" + NL + "\t\tcontentPane.setLayoutManager(new "; >- protected final String TEXT_87 = "());"; >- protected final String TEXT_88 = NL + "\t\tviewport.setContents(contentPane);" + NL + "\t\tscrollPane.setViewport(viewport);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_89 = " resolveSemanticElement() {" + NL + "\t\tView view = getDiagramNode();" + NL + "\t\treturn (view.getElement() instanceof "; >- protected final String TEXT_90 = ") ? ("; >- protected final String TEXT_91 = ") view.getElement() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >- protected final String TEXT_92 = NL; >- protected final String TEXT_93 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\tNotationModelRefresher refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_94 = " domainModelEditDomain = "; >- protected final String TEXT_95 = ".getEditingDomain("; >- protected final String TEXT_96 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate NotationModelRefresher notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate NotationModelRefresher getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends "; >- protected final String TEXT_97 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_98 = " filter;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_99 = " editingDomain;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic NotationModelRefresher() {" + NL + "\t\t\tcreateFilter();" + NL + "\t\t}"; >- protected final String TEXT_100 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in "; >- protected final String TEXT_101 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_102 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn "; >- protected final String TEXT_103 = ".NOT_TOUCH;" + NL + "\t\t}"; >- protected final String TEXT_104 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void createFilter() {"; >- protected final String TEXT_105 = NL + "\t\t\tfilter = "; >- protected final String TEXT_106 = ".createFeatureFilter("; >- protected final String TEXT_107 = ".eINSTANCE.get"; >- protected final String TEXT_108 = "());"; >- protected final String TEXT_109 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_110 = ".createFeatureFilter("; >- protected final String TEXT_111 = ".eINSTANCE.get"; >- protected final String TEXT_112 = "()));"; >- protected final String TEXT_113 = NL + "\t\t\tfilter = filter.and("; >- protected final String TEXT_114 = ".createNotifierFilter("; >- protected final String TEXT_115 = ".getElement()));"; >- protected final String TEXT_116 = NL + "\t\t\tfilter = "; >- protected final String TEXT_117 = ".createNotifierFilter("; >- protected final String TEXT_118 = ".getElement());"; >- protected final String TEXT_119 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);"; >- protected final String TEXT_120 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void install("; >- protected final String TEXT_121 = " editingDomain) {" + NL + "\t\t\tif (this.editingDomain != null && !this.editingDomain.equals(editingDomain)) {" + NL + "\t\t\t\tthrow new IllegalStateException(\"Already listening to another editing domain\");" + NL + "\t\t\t}" + NL + "\t\t\tthis.editingDomain = editingDomain;" + NL + "\t\t\tthis.editingDomain.addResourceSetListener(this);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isInstalled() {" + NL + "\t\t\treturn editingDomain != null;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void uninstall() {" + NL + "\t\t\tif (isInstalled()) {" + NL + "\t\t\t\teditingDomain.removeResourceSetListener(this);" + NL + "\t\t\t\teditingDomain = null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isPrecommitOnly() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_122 = " transactionAboutToCommit("; >- protected final String TEXT_123 = " event) {" + NL + "\t\t\treturn getRefreshNotationModelCommand();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_124 = " getFilter() {" + NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t"; >- protected final String TEXT_125 = " command = getRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_126 = " domainModelEditDomain = "; >- protected final String TEXT_127 = ".getEditingDomain("; >- protected final String TEXT_128 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new WrappingCommand(domainModelEditDomain, command));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_129 = " getRefreshNotationModelCommand() {" + NL + "\t\t"; >- protected final String TEXT_130 = " semanticChildren = getSemanticChildren();" + NL + "\t\t"; >- protected final String TEXT_131 = " notationalChildren = "; >- protected final String TEXT_132 = ".getChildren();" + NL + "\t\tfinal "; >- protected final String TEXT_133 = " semanticToNotational = new "; >- protected final String TEXT_134 = "();" + NL + "\t\tfor("; >- protected final String TEXT_135 = " it = notationalChildren.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_136 = " next = ("; >- protected final String TEXT_137 = ") it.next();" + NL + "\t\t\t"; >- protected final String TEXT_138 = " nextSemantic = next.getElement();" + NL + "\t\t\tif (nextSemantic != null) {" + NL + "\t\t\t\tsemanticToNotational.put(nextSemantic, next);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_139 = " parentView = "; >- protected final String TEXT_140 = ";" + NL + "\t\t"; >- protected final String TEXT_141 = " command = new "; >- protected final String TEXT_142 = "();" + NL + "\t\tfor("; >- protected final String TEXT_143 = " it = semanticChildren.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_144 = " next = ("; >- protected final String TEXT_145 = ") it.next();" + NL + "\t\t\t"; >- protected final String TEXT_146 = " currentView = ("; >- protected final String TEXT_147 = ") semanticToNotational.remove(next);" + NL + "\t\t\tint nodeVisualID = "; >- protected final String TEXT_148 = ".INSTANCE.getNodeVisualID(parentView, next);" + NL + "\t\t\tif (currentView == null) {" + NL + "\t\t\t\tif (shouldCreateView(next)) {" + NL + "\t\t\t\t\tcommand.appendIfCanExecute(getCreateNotationalElementCommand(parentView, next, nodeVisualID));" + NL + "\t\t\t\t}" + NL + "\t\t\t} else if (nodeVisualID != "; >- protected final String TEXT_149 = ".getVisualID(currentView)) {" + NL + "\t\t\t\t"; >- protected final String TEXT_150 = " notationalCommand = getCreateNotationalElementCommand(parentView, next, nodeVisualID);" + NL + "\t\t\t\tif (notationalCommand != null) {" + NL + "\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_151 = "(parentView, notationalCommand, currentView));" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tfor("; >- protected final String TEXT_152 = " it = semanticToNotational.values().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_153 = " obsoleteView = ("; >- protected final String TEXT_154 = ") it.next();" + NL + "\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_155 = "(parentView, obsoleteView));" + NL + "\t\t}" + NL + "\t\treturn command.getCommandList().isEmpty() ? null : command;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_156 = " getCreateNotationalElementCommand("; >- protected final String TEXT_157 = " parentView, "; >- protected final String TEXT_158 = " domainElement, int nodeVisualID) {" + NL + "\t\tswitch (nodeVisualID) {"; >- protected final String TEXT_159 = NL + "\t\tcase "; >- protected final String TEXT_160 = ".VISUAL_ID:" + NL + "\t\t\tif (domainElement instanceof "; >- protected final String TEXT_161 = ") {" + NL + "\t\t\t\treturn new Create"; >- protected final String TEXT_162 = "NotationCommand(parentView, domainElement"; >- protected final String TEXT_163 = ", new Rectangle(0, 0, 0, 0)"; >- protected final String TEXT_164 = ");" + NL + "\t\t\t}" + NL + "\t\t\treturn null;"; >- protected final String TEXT_165 = NL + "\t\tdefault:" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_166 = " getSemanticChildren() {"; >- protected final String TEXT_167 = NL; >- protected final String TEXT_168 = NL + "\treturn "; >- protected final String TEXT_169 = ".EMPTY_LIST;"; >- protected final String TEXT_170 = NL + "\t"; >- protected final String TEXT_171 = " result = new "; >- protected final String TEXT_172 = "();"; >- protected final String TEXT_173 = NL + "\t"; >- protected final String TEXT_174 = " viewObject = "; >- protected final String TEXT_175 = ";" + NL + "\t"; >- protected final String TEXT_176 = " modelObject = viewObject.getElement();" + NL + "\t"; >- protected final String TEXT_177 = " nextValue;" + NL + "\tint nodeVID;"; >- protected final String TEXT_178 = NL + "\tfor("; >- protected final String TEXT_179 = " it = "; >- protected final String TEXT_180 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >- protected final String TEXT_181 = ") it.next();"; >- protected final String TEXT_182 = NL + "\tnextValue = ("; >- protected final String TEXT_183 = ")"; >- protected final String TEXT_184 = ";"; >- protected final String TEXT_185 = NL + "\tnodeVID = "; >- protected final String TEXT_186 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);"; >- protected final String TEXT_187 = NL + "\tswitch (nodeVID) {"; >- protected final String TEXT_188 = NL + "\tcase "; >- protected final String TEXT_189 = ".VISUAL_ID: {"; >- protected final String TEXT_190 = NL + "\tif ("; >- protected final String TEXT_191 = ".VISUAL_ID == nodeVID) {"; >- protected final String TEXT_192 = NL + "\t\tresult.add(nextValue);"; >- protected final String TEXT_193 = NL + "\t\tbreak;" + NL + "\t\t}"; >- protected final String TEXT_194 = NL + "\t\t}"; >- protected final String TEXT_195 = NL + "\t}"; >- protected final String TEXT_196 = NL + "\t}"; >- protected final String TEXT_197 = NL + "\treturn result;"; >- protected final String TEXT_198 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t * The generated code always returns "; >- protected final String TEXT_199 = ". " + NL + "\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean shouldCreateView(EObject domainElement) {" + NL + "\t\treturn "; >- protected final String TEXT_200 = ";" + NL + "\t}"; >- protected final String TEXT_201 = NL; >+ protected final String TEXT_23 = " implements "; >+ protected final String TEXT_24 = " {"; >+ protected final String TEXT_25 = NL; >+ protected final String TEXT_26 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >+ protected final String TEXT_27 = ";"; >+ protected final String TEXT_28 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_29 = "(View view) {" + NL + "\t\tsetModel(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_30 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_31 = " getDiagramNode() {" + NL + "\t\treturn ("; >+ protected final String TEXT_32 = ") getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {"; >+ protected final String TEXT_33 = NL + "\t\tinstallEditPolicy("; >+ protected final String TEXT_34 = ".LAYOUT_ROLE, new "; >+ protected final String TEXT_35 = "() {" + NL + "\t\t\tprotected Command createChangeConstraintCommand(final "; >+ protected final String TEXT_36 = " request, final EditPart child, Object constraint) {" + NL + "\t\t\t\tfinal Node node = (Node) child.getModel();" + NL + "\t\t\t\t"; >+ protected final String TEXT_37 = " emfCommand = new "; >+ protected final String TEXT_38 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate "; >+ protected final String TEXT_39 = " moveDelta;" + NL + "\t\t\t\t\tprivate "; >+ protected final String TEXT_40 = " resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof Bounds == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_41 = " original = new "; >+ protected final String TEXT_42 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_43 = " referenceFigure = (("; >+ protected final String TEXT_44 = ")child).getFigure();" + NL + "\t\t\t\t\t\treferenceFigure.translateToAbsolute(original);" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_45 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(transformed);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute("; >+ protected final String TEXT_46 = " move, "; >+ protected final String TEXT_47 = " resize) {" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_48 = "("; >+ protected final String TEXT_49 = ".getEditingDomain(node.getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn "; >+ protected final String TEXT_50 = ".INSTANCE;" + NL + "\t\t\t}"; >+ protected final String TEXT_51 = NL + "\t\tinstallEditPolicy("; >+ protected final String TEXT_52 = ".LAYOUT_ROLE, new "; >+ protected final String TEXT_53 = "() {" + NL + "\t\t\tprotected Object getConstraintFor("; >+ protected final String TEXT_54 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor("; >+ protected final String TEXT_55 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\treturn "; >+ protected final String TEXT_56 = ".INSTANCE;" + NL + "\t\t\t}"; >+ protected final String TEXT_57 = NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {"; >+ protected final String TEXT_58 = NL + "\t\t\t\tif (request instanceof "; >+ protected final String TEXT_59 = ") {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_60 = " requestEx = ("; >+ protected final String TEXT_61 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_62 = " result = new "; >+ protected final String TEXT_63 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >+ protected final String TEXT_64 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_65 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >+ protected final String TEXT_66 = "Command((View) getModel(), requestEx"; >+ protected final String TEXT_67 = ", " + NL + "\t\t\t\t\t\t\t\t("; >+ protected final String TEXT_68 = ")getConstraintFor(request)"; >+ protected final String TEXT_69 = "));" + NL + "\t\t\t\t\t\t\tbreak;"; >+ protected final String TEXT_70 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new "; >+ protected final String TEXT_71 = "("; >+ protected final String TEXT_72 = ".getEditingDomain(((View) getModel()).getDiagram().getElement()), result);" + NL + "\t\t\t\t}"; >+ protected final String TEXT_73 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getTitleName() {" + NL + "\t\treturn \""; >+ protected final String TEXT_74 = "\";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_75 = " createFigure() {" + NL + "\t\t"; >+ protected final String TEXT_76 = " result = new "; >+ protected final String TEXT_77 = "();" + NL + "\t\tresult.setLabel(getTitleName());" + NL + "\t\tresult.setOpaque(false);" + NL + "\t\tresult.setLayoutManager(new "; >+ protected final String TEXT_78 = "());" + NL + "\t\t"; >+ protected final String TEXT_79 = " scrollPane = new "; >+ protected final String TEXT_80 = "();" + NL + "\t\tresult.add(scrollPane);"; >+ protected final String TEXT_81 = NL + "\t\t"; >+ protected final String TEXT_82 = " viewport = new "; >+ protected final String TEXT_83 = "();" + NL + "\t\tcontentPane = new "; >+ protected final String TEXT_84 = "();" + NL + "\t\tcontentPane.setLayoutManager(new "; >+ protected final String TEXT_85 = "());"; >+ protected final String TEXT_86 = NL + "\t\t"; >+ protected final String TEXT_87 = " viewport = new "; >+ protected final String TEXT_88 = "();" + NL + "\t\tcontentPane = new "; >+ protected final String TEXT_89 = "();" + NL + "\t\tcontentPane.setLayoutManager(new "; >+ protected final String TEXT_90 = "());"; >+ protected final String TEXT_91 = NL + "\t\tviewport.setContents(contentPane);" + NL + "\t\tscrollPane.setViewport(viewport);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_92 = " resolveSemanticElement() {" + NL + "\t\tView view = getDiagramNode();" + NL + "\t\treturn (view.getElement() instanceof "; >+ protected final String TEXT_93 = ") ? ("; >+ protected final String TEXT_94 = ") view.getElement() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >+ protected final String TEXT_95 = NL; >+ protected final String TEXT_96 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t"; >+ protected final String TEXT_97 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_98 = " domainModelEditDomain = "; >+ protected final String TEXT_99 = ".getEditingDomain("; >+ protected final String TEXT_100 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_101 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_102 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends "; >+ protected final String TEXT_103 = " {"; >+ protected final String TEXT_104 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in "; >+ protected final String TEXT_105 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_106 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_107 = ".NOT_TOUCH;" + NL + "\t\t}"; >+ protected final String TEXT_108 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_109 = " createFilter() {"; >+ protected final String TEXT_110 = NL + "\t\t\t"; >+ protected final String TEXT_111 = " filter = "; >+ protected final String TEXT_112 = ".createFeatureFilter("; >+ protected final String TEXT_113 = ".eINSTANCE.get"; >+ protected final String TEXT_114 = "());"; >+ protected final String TEXT_115 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_116 = ".createFeatureFilter("; >+ protected final String TEXT_117 = ".eINSTANCE.get"; >+ protected final String TEXT_118 = "()));"; >+ protected final String TEXT_119 = NL + "\t\t\tfilter = filter.and("; >+ protected final String TEXT_120 = ".createNotifierFilter("; >+ protected final String TEXT_121 = ".getElement()));"; >+ protected final String TEXT_122 = NL + "\t\t\t"; >+ protected final String TEXT_123 = " filter = "; >+ protected final String TEXT_124 = ".createNotifierFilter("; >+ protected final String TEXT_125 = ".getElement());"; >+ protected final String TEXT_126 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);"; >+ protected final String TEXT_127 = NL + "\t\t\t"; >+ protected final String TEXT_128 = " filter = getConstrainedChildrenFilter();"; >+ protected final String TEXT_129 = NL + "\t\t\t"; >+ protected final String TEXT_130 = " filter = "; >+ protected final String TEXT_131 = ".NOT_TOUCH;"; >+ protected final String TEXT_132 = NL + "\t\t\treturn filter;"; >+ protected final String TEXT_133 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_134 = " getCreateNotationalElementCommand("; >+ protected final String TEXT_135 = " descriptor) {" + NL + "\t\t\t"; >+ protected final String TEXT_136 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {"; >+ protected final String TEXT_137 = NL + "\t\t\tcase "; >+ protected final String TEXT_138 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof "; >+ protected final String TEXT_139 = ") {" + NL + "\t\t\t\t\treturn new Create"; >+ protected final String TEXT_140 = "NotationCommand(getHost(), domainElement"; >+ protected final String TEXT_141 = ", new Rectangle(0, 0, 0, 0)"; >+ protected final String TEXT_142 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;"; >+ protected final String TEXT_143 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_144 = " getSemanticChildNodes() {"; >+ protected final String TEXT_145 = NL; >+ protected final String TEXT_146 = NL + "\treturn "; >+ protected final String TEXT_147 = ".EMPTY_LIST;"; >+ protected final String TEXT_148 = NL + "\t"; >+ protected final String TEXT_149 = " result = new "; >+ protected final String TEXT_150 = "();"; >+ protected final String TEXT_151 = NL + "\t"; >+ protected final String TEXT_152 = " viewObject = "; >+ protected final String TEXT_153 = ";" + NL + "\t"; >+ protected final String TEXT_154 = " modelObject = viewObject.getElement();" + NL + "\t"; >+ protected final String TEXT_155 = " nextValue;" + NL + "\tint nodeVID;"; >+ protected final String TEXT_156 = NL + "\tfor("; >+ protected final String TEXT_157 = " it = "; >+ protected final String TEXT_158 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >+ protected final String TEXT_159 = ") it.next();"; >+ protected final String TEXT_160 = NL + "\tnextValue = ("; >+ protected final String TEXT_161 = ")"; >+ protected final String TEXT_162 = ";"; >+ protected final String TEXT_163 = NL + "\tnodeVID = "; >+ protected final String TEXT_164 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);"; >+ protected final String TEXT_165 = NL + "\tswitch (nodeVID) {"; >+ protected final String TEXT_166 = NL + "\tcase "; >+ protected final String TEXT_167 = ".VISUAL_ID: {"; >+ protected final String TEXT_168 = NL + "\tif ("; >+ protected final String TEXT_169 = ".VISUAL_ID == nodeVID) {"; >+ protected final String TEXT_170 = NL + "\t\tresult.add(new "; >+ protected final String TEXT_171 = "(nextValue, nodeVID));"; >+ protected final String TEXT_172 = NL + "\t\tbreak;" + NL + "\t\t}"; >+ protected final String TEXT_173 = NL + "\t\t}"; >+ protected final String TEXT_174 = NL + "\t}"; >+ protected final String TEXT_175 = NL + "\t}"; >+ protected final String TEXT_176 = NL + "\treturn result;"; >+ protected final String TEXT_177 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns "; >+ protected final String TEXT_178 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView("; >+ protected final String TEXT_179 = " descriptor) {" + NL + "\t\t\treturn "; >+ protected final String TEXT_180 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_181 = " getHost() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_182 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t"; >+ protected final String TEXT_183 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_184 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_185 = " domainModelEditDomain = "; >+ protected final String TEXT_186 = ".getEditingDomain("; >+ protected final String TEXT_187 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new "; >+ protected final String TEXT_188 = "(domainModelEditDomain, command));" + NL + "\t}" + NL; >+ protected final String TEXT_189 = NL; >+ protected final String TEXT_190 = NL; >+ protected final String TEXT_191 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_192 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_193 = " feature, "; >+ protected final String TEXT_194 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >+ protected final String TEXT_195 = NL; >+ protected final String TEXT_196 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_197 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_198 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >+ protected final String TEXT_199 = NL; >+ protected final String TEXT_200 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_201 = ".eINSTANCE.getView_Visible(), visibilityRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "//XXX:\t\trefreshBackgroundColor();" + NL + "//XXX:\t\trefreshForegroundColor();" + NL + "//XXX:\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = ((View)getModel()).isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL; > protected final String TEXT_202 = NL; > protected final String TEXT_203 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_204 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_205 = " feature, "; >- protected final String TEXT_206 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >- protected final String TEXT_207 = NL; >- protected final String TEXT_208 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_209 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_210 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >- protected final String TEXT_211 = NL; >- protected final String TEXT_212 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_213 = ".eINSTANCE.getView_Visible(), visibilityRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "//XXX:\t\trefreshBackgroundColor();" + NL + "//XXX:\t\trefreshForegroundColor();" + NL + "//XXX:\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = ((View)getModel()).isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL; >- protected final String TEXT_214 = NL; >- protected final String TEXT_215 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_216 = "static "; >- protected final String TEXT_217 = "class Create"; >- protected final String TEXT_218 = "NotationCommand extends "; >- protected final String TEXT_219 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create"; >- protected final String TEXT_220 = "NotationCommand("; >- protected final String TEXT_221 = " parent, " + NL + "\t\t\t\t"; >- protected final String TEXT_222 = " domainElement"; >- protected final String TEXT_223 = ", "; >- protected final String TEXT_224 = " constraint"; >- protected final String TEXT_225 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = "; >- protected final String TEXT_226 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t"; >- protected final String TEXT_227 = ".decorateView(createdNode);"; >- protected final String TEXT_228 = NL + "\t\t\t"; >- protected final String TEXT_229 = " bounds = "; >- protected final String TEXT_230 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);"; >- protected final String TEXT_231 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, "; >- protected final String TEXT_232 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, "; >- protected final String TEXT_233 = "));"; >- protected final String TEXT_234 = NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_235 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_236 = "static "; >- protected final String TEXT_237 = "class Create"; >- protected final String TEXT_238 = "Command extends "; >- protected final String TEXT_239 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create"; >- protected final String TEXT_240 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >- protected final String TEXT_241 = "Command("; >- protected final String TEXT_242 = " parent, "; >- protected final String TEXT_243 = ".CreateRequestEx request"; >- protected final String TEXT_244 = ", "; >- protected final String TEXT_245 = " constraint"; >- protected final String TEXT_246 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_247 = " domainModelEditDomain = "; >- protected final String TEXT_248 = ".getEditingDomain(parent.getDiagram().getElement());"; >- protected final String TEXT_249 = NL + "\t\t\t"; >- protected final String TEXT_250 = " createdDomainElement = "; >- protected final String TEXT_251 = ".eINSTANCE.create(" + NL + "\t\t\t\t"; >- protected final String TEXT_252 = ".eINSTANCE.get"; >- protected final String TEXT_253 = "());"; >- protected final String TEXT_254 = NL + "\t\t\t"; >- protected final String TEXT_255 = " createdDomainElement = "; >- protected final String TEXT_256 = ".eINSTANCE.create"; >- protected final String TEXT_257 = "();"; >- protected final String TEXT_258 = NL + "\t\t\t"; >- protected final String TEXT_259 = NL + "\t\t\t"; >- protected final String TEXT_260 = "."; >- protected final String TEXT_261 = ".initializeElement("; >- protected final String TEXT_262 = "("; >- protected final String TEXT_263 = ") "; >- protected final String TEXT_264 = "createdDomainElement);"; >- protected final String TEXT_265 = NL + "\t\t\t"; >- protected final String TEXT_266 = " compoundCommand = new "; >- protected final String TEXT_267 = "();" + NL + "\t\t\tcompoundCommand.append("; >- protected final String TEXT_268 = ".create(domainModelEditDomain, "; >- protected final String TEXT_269 = ", " + NL + "\t\t\t\t"; >- protected final String TEXT_270 = ".eINSTANCE.get"; >- protected final String TEXT_271 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append("; >- protected final String TEXT_272 = ".create(domainModelEditDomain, "; >- protected final String TEXT_273 = ", " + NL + "\t\t\t\t"; >- protected final String TEXT_274 = ".eINSTANCE.get"; >- protected final String TEXT_275 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;"; >- protected final String TEXT_276 = NL + "\t\t\tthis.domainModelAddCommand = "; >- protected final String TEXT_277 = ".create(domainModelEditDomain, "; >- protected final String TEXT_278 = ", " + NL + "\t\t\t\t"; >- protected final String TEXT_279 = ".eINSTANCE.get"; >- protected final String TEXT_280 = "(), createdDomainElement);"; >- protected final String TEXT_281 = NL + "\t\t\tthis.notationAddCommand = new Create"; >- protected final String TEXT_282 = "NotationCommand(parent, "; >- protected final String TEXT_283 = "("; >- protected final String TEXT_284 = ") "; >- protected final String TEXT_285 = "createdDomainElement"; >- protected final String TEXT_286 = ", constraint"; >- protected final String TEXT_287 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >- protected final String TEXT_288 = NL + "}" + NL; >- protected final String TEXT_289 = NL; >+ protected final String TEXT_204 = "static "; >+ protected final String TEXT_205 = "class Create"; >+ protected final String TEXT_206 = "NotationCommand extends "; >+ protected final String TEXT_207 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create"; >+ protected final String TEXT_208 = "NotationCommand("; >+ protected final String TEXT_209 = " parent, " + NL + "\t\t\t\t"; >+ protected final String TEXT_210 = " domainElement"; >+ protected final String TEXT_211 = ", "; >+ protected final String TEXT_212 = " constraint"; >+ protected final String TEXT_213 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = "; >+ protected final String TEXT_214 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t"; >+ protected final String TEXT_215 = ".decorateView(createdNode);"; >+ protected final String TEXT_216 = NL + "\t\t\t"; >+ protected final String TEXT_217 = " bounds = "; >+ protected final String TEXT_218 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);"; >+ protected final String TEXT_219 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, "; >+ protected final String TEXT_220 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, "; >+ protected final String TEXT_221 = "));"; >+ protected final String TEXT_222 = NL + "\t\t}" + NL + "\t}" + NL; >+ protected final String TEXT_223 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_224 = "static "; >+ protected final String TEXT_225 = "class Create"; >+ protected final String TEXT_226 = "Command extends "; >+ protected final String TEXT_227 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create"; >+ protected final String TEXT_228 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >+ protected final String TEXT_229 = "Command("; >+ protected final String TEXT_230 = " parent, "; >+ protected final String TEXT_231 = " request"; >+ protected final String TEXT_232 = ", "; >+ protected final String TEXT_233 = " constraint"; >+ protected final String TEXT_234 = ") {" + NL + "\t\t\t"; >+ protected final String TEXT_235 = " domainModelEditDomain = "; >+ protected final String TEXT_236 = ".getEditingDomain(parent.getDiagram().getElement());"; >+ protected final String TEXT_237 = NL + "\t\t\t"; >+ protected final String TEXT_238 = " createdDomainElement = "; >+ protected final String TEXT_239 = ".eINSTANCE.create(" + NL + "\t\t\t\t"; >+ protected final String TEXT_240 = ".eINSTANCE.get"; >+ protected final String TEXT_241 = "());"; >+ protected final String TEXT_242 = NL + "\t\t\t"; >+ protected final String TEXT_243 = " createdDomainElement = "; >+ protected final String TEXT_244 = ".eINSTANCE.create"; >+ protected final String TEXT_245 = "();"; >+ protected final String TEXT_246 = NL + "\t\t\t"; >+ protected final String TEXT_247 = NL + "\t\t\t"; >+ protected final String TEXT_248 = "."; >+ protected final String TEXT_249 = ".initializeElement("; >+ protected final String TEXT_250 = "("; >+ protected final String TEXT_251 = ") "; >+ protected final String TEXT_252 = "createdDomainElement);"; >+ protected final String TEXT_253 = NL + "\t\t\t"; >+ protected final String TEXT_254 = " compoundCommand = new "; >+ protected final String TEXT_255 = "();" + NL + "\t\t\tcompoundCommand.append("; >+ protected final String TEXT_256 = ".create(domainModelEditDomain, "; >+ protected final String TEXT_257 = ", " + NL + "\t\t\t\t"; >+ protected final String TEXT_258 = ".eINSTANCE.get"; >+ protected final String TEXT_259 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append("; >+ protected final String TEXT_260 = ".create(domainModelEditDomain, "; >+ protected final String TEXT_261 = ", " + NL + "\t\t\t\t"; >+ protected final String TEXT_262 = ".eINSTANCE.get"; >+ protected final String TEXT_263 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;"; >+ protected final String TEXT_264 = NL + "\t\t\tthis.domainModelAddCommand = "; >+ protected final String TEXT_265 = ".create(domainModelEditDomain, "; >+ protected final String TEXT_266 = ", " + NL + "\t\t\t\t"; >+ protected final String TEXT_267 = ".eINSTANCE.get"; >+ protected final String TEXT_268 = "(), createdDomainElement);"; >+ protected final String TEXT_269 = NL + "\t\t\tthis.notationAddCommand = new Create"; >+ protected final String TEXT_270 = "NotationCommand(parent, "; >+ protected final String TEXT_271 = "("; >+ protected final String TEXT_272 = ") "; >+ protected final String TEXT_273 = "createdDomainElement"; >+ protected final String TEXT_274 = ", constraint"; >+ protected final String TEXT_275 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >+ protected final String TEXT_276 = NL + "}" + NL; >+ protected final String TEXT_277 = NL; > > public String generate(Object argument) > { >@@ -416,169 +404,177 @@ > stringBuffer.append(TEXT_22); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")); > stringBuffer.append(TEXT_23); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_24); > { > GenCommonBase genCommonBase = genCompartment; >- stringBuffer.append(TEXT_24); > stringBuffer.append(TEXT_25); >- stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_26); >- } >+ stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_27); >- stringBuffer.append(genCompartment.getEditPartClassName()); >+ } > stringBuffer.append(TEXT_28); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(genCompartment.getEditPartClassName()); > stringBuffer.append(TEXT_29); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_30); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_31); >- if (!genCompartment.isListLayout()) { >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_32); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >+ if (!genCompartment.isListLayout()) { > stringBuffer.append(TEXT_33); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.XYLayoutEditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_34); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.XYLayoutEditPolicy")); > stringBuffer.append(TEXT_35); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest")); > stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_37); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); > stringBuffer.append(TEXT_38); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); > stringBuffer.append(TEXT_39); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); > stringBuffer.append(TEXT_40); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_41); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_42); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_43); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); > stringBuffer.append(TEXT_44); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_45); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); > stringBuffer.append(TEXT_46); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); > stringBuffer.append(TEXT_47); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_48); >- } else { >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_49); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_50); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy")); >+ } else { > stringBuffer.append(TEXT_51); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_52); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy")); > stringBuffer.append(TEXT_53); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_54); >- } >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); > stringBuffer.append(TEXT_55); >- if (null != genDiagram.getPalette()) { >-final Palette palette = genDiagram.getPalette(); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_56); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ } > stringBuffer.append(TEXT_57); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ if (null != genDiagram.getPalette()) { >+final Palette palette = genDiagram.getPalette(); > stringBuffer.append(TEXT_58); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_59); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_60); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_61); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_62); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_63); > > for(Iterator it = genCompartment.getChildNodes().iterator(); it.hasNext(); ) { > GenChildNode next = (GenChildNode)it.next(); > >- stringBuffer.append(TEXT_62); >+ stringBuffer.append(TEXT_64); > stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_65); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_64); >+ stringBuffer.append(TEXT_66); > if (!genCompartment.isListLayout()) { >- stringBuffer.append(TEXT_65); >+ stringBuffer.append(TEXT_67); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_66); >+ stringBuffer.append(TEXT_68); > } >- stringBuffer.append(TEXT_67); >+ stringBuffer.append(TEXT_69); > > } > >- stringBuffer.append(TEXT_68); >+ stringBuffer.append(TEXT_70); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_71); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_69); >+ stringBuffer.append(TEXT_72); > }/*when there's palette*/ >- stringBuffer.append(TEXT_70); >+ stringBuffer.append(TEXT_73); > stringBuffer.append(genCompartment.getTitle()); >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_74); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_72); >+ stringBuffer.append(TEXT_75); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LabeledContainer")); >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_76); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LabeledContainer")); >- stringBuffer.append(TEXT_74); >+ stringBuffer.append(TEXT_77); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.StackLayout")); >- stringBuffer.append(TEXT_75); >+ stringBuffer.append(TEXT_78); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ScrollPane")); >- stringBuffer.append(TEXT_76); >+ stringBuffer.append(TEXT_79); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ScrollPane")); >- stringBuffer.append(TEXT_77); >+ stringBuffer.append(TEXT_80); > if (genCompartment.isListLayout()) { >- stringBuffer.append(TEXT_78); >+ stringBuffer.append(TEXT_81); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport")); >- stringBuffer.append(TEXT_79); >+ stringBuffer.append(TEXT_82); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport")); >- stringBuffer.append(TEXT_80); >+ stringBuffer.append(TEXT_83); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); >- stringBuffer.append(TEXT_81); >+ stringBuffer.append(TEXT_84); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout")); >- stringBuffer.append(TEXT_82); >+ stringBuffer.append(TEXT_85); > } else { >- stringBuffer.append(TEXT_83); >+ stringBuffer.append(TEXT_86); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport")); >- stringBuffer.append(TEXT_84); >+ stringBuffer.append(TEXT_87); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformViewport")); >- stringBuffer.append(TEXT_85); >+ stringBuffer.append(TEXT_88); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayer")); >- stringBuffer.append(TEXT_86); >+ stringBuffer.append(TEXT_89); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout")); >- stringBuffer.append(TEXT_87); >+ stringBuffer.append(TEXT_90); > } >- stringBuffer.append(TEXT_88); >+ stringBuffer.append(TEXT_91); > stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_89); >+ stringBuffer.append(TEXT_92); > stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_90); >+ stringBuffer.append(TEXT_93); > stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_91); >+ stringBuffer.append(TEXT_94); > > { > String _getViewCode = "getDiagramNode()"; > String _getDiagramCode = _getViewCode + ".getDiagram()"; > boolean isListLayout = genCompartment.isListLayout(); > >- stringBuffer.append(TEXT_92); >- stringBuffer.append(TEXT_93); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_94); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_95); >- stringBuffer.append(_getDiagramCode); > stringBuffer.append(TEXT_96); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetListenerImpl")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); > stringBuffer.append(TEXT_97); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_98); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_98); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_99); >+ stringBuffer.append(_getDiagramCode); >+ stringBuffer.append(TEXT_100); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_101); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_102); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_103); > > boolean hasConstraintsInChildren = false; > for (Iterator it = childNodes.iterator(); it.hasNext(); ) { >@@ -593,17 +589,19 @@ > > if (hasConstraintsInChildren) { > >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_104); > stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName()); >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_105); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_102); >+ stringBuffer.append(TEXT_106); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_103); >+ stringBuffer.append(TEXT_107); > > } > >- stringBuffer.append(TEXT_104); >+ stringBuffer.append(TEXT_108); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_109); > > { > boolean hasDeclaredFilter = false; >@@ -622,23 +620,25 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_105); >+ stringBuffer.append(TEXT_110); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_106); >+ stringBuffer.append(TEXT_111); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_112); > stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_107); >+ stringBuffer.append(TEXT_113); > stringBuffer.append(childMetaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_108); >+ stringBuffer.append(TEXT_114); > > } else { > >- stringBuffer.append(TEXT_109); >+ stringBuffer.append(TEXT_115); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_110); >+ stringBuffer.append(TEXT_116); > stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_111); >+ stringBuffer.append(TEXT_117); > stringBuffer.append(childMetaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_112); >+ stringBuffer.append(TEXT_118); > > } > } //for >@@ -646,107 +646,61 @@ > > if (hasDeclaredFilter) { > >- stringBuffer.append(TEXT_113); >+ stringBuffer.append(TEXT_119); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_114); >+ stringBuffer.append(TEXT_120); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_115); >+ stringBuffer.append(TEXT_121); > > } else { >+ hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_116); >+ stringBuffer.append(TEXT_122); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_117); >+ stringBuffer.append(TEXT_123); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_124); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_118); >+ stringBuffer.append(TEXT_125); > > } >-} //local declaration of hasDeclaredFilter > > >-if (hasConstraintsInChildren) { >+ if (hasConstraintsInChildren) { >+ if (hasDeclaredFilter) { >+ hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_119); >+ stringBuffer.append(TEXT_126); > >-} >+ } else { > >- stringBuffer.append(TEXT_120); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_121); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_122); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetChangeEvent")); >- stringBuffer.append(TEXT_123); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_124); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_125); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_126); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_127); >- stringBuffer.append(_getDiagramCode); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); > stringBuffer.append(TEXT_128); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ >+ } >+ } >+ if (!hasDeclaredFilter) { >+ > stringBuffer.append(TEXT_129); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); > stringBuffer.append(TEXT_130); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); > stringBuffer.append(TEXT_131); >- stringBuffer.append(_getViewCode); >+ >+ } >+ > stringBuffer.append(TEXT_132); >- stringBuffer.append(importManager.getImportedName("java.util.Map")); >+ >+} //local declaration of hasDeclaredFilter >+ > stringBuffer.append(TEXT_133); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); > stringBuffer.append(TEXT_134); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); > stringBuffer.append(TEXT_135); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_136); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_137); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_138); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_139); >- stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_140); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_141); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_142); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_143); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_144); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_145); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_146); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_147); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_148); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_149); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")); >- stringBuffer.append(TEXT_150); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReplaceNotationalElementCommand")); >- stringBuffer.append(TEXT_151); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_152); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_153); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_154); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalElementCommand")); >- stringBuffer.append(TEXT_155); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")); >- stringBuffer.append(TEXT_156); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_157); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_158); >+ stringBuffer.append(TEXT_136); > > for (Iterator it = childNodes.iterator(); it.hasNext(); ) { > GenNode nextNode = (GenNode) it.next(); >@@ -756,39 +710,39 @@ > } > String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName()); > >- stringBuffer.append(TEXT_159); >+ stringBuffer.append(TEXT_137); > stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_160); >+ stringBuffer.append(TEXT_138); > stringBuffer.append(childNodeInterfaceName); >- stringBuffer.append(TEXT_161); >+ stringBuffer.append(TEXT_139); > stringBuffer.append(nextNode.getDomainMetaClass().getName()); > stringBuffer.append(nextNode.getVisualID()); >- stringBuffer.append(TEXT_162); >+ stringBuffer.append(TEXT_140); > if (!isListLayout) { >- stringBuffer.append(TEXT_163); >+ stringBuffer.append(TEXT_141); > } >- stringBuffer.append(TEXT_164); >+ stringBuffer.append(TEXT_142); > > } > >- stringBuffer.append(TEXT_165); >+ stringBuffer.append(TEXT_143); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_166); >- stringBuffer.append(TEXT_167); >+ stringBuffer.append(TEXT_144); >+ stringBuffer.append(TEXT_145); > > if (childNodes.size() == 0) { > >- stringBuffer.append(TEXT_168); >+ stringBuffer.append(TEXT_146); > stringBuffer.append(importManager.getImportedName("java.util.Collections")); >- stringBuffer.append(TEXT_169); >+ stringBuffer.append(TEXT_147); > > } else { > >- stringBuffer.append(TEXT_170); >+ stringBuffer.append(TEXT_148); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_171); >+ stringBuffer.append(TEXT_149); > stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_172); >+ stringBuffer.append(TEXT_150); > > Map genFeature2genNodeMap = new LinkedHashMap(); > for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) { >@@ -806,15 +760,15 @@ > Set entrySet = genFeature2genNodeMap.entrySet(); > if (entrySet.size() > 0) { > >- stringBuffer.append(TEXT_173); >+ stringBuffer.append(TEXT_151); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_174); >+ stringBuffer.append(TEXT_152); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_175); >+ stringBuffer.append(TEXT_153); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_176); >+ stringBuffer.append(TEXT_154); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_177); >+ stringBuffer.append(TEXT_155); > > } > for (Iterator entries = entrySet.iterator(); entries.hasNext();) { >@@ -823,105 +777,125 @@ > Collection genNodesCollection = (Collection) nextEntry.getValue(); > if (childMetaFeature.isListType()) { > >- stringBuffer.append(TEXT_178); >+ stringBuffer.append(TEXT_156); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_179); >+ stringBuffer.append(TEXT_157); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true); >- stringBuffer.append(TEXT_180); >+ stringBuffer.append(TEXT_158); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_181); >+ stringBuffer.append(TEXT_159); > > } else { > >- stringBuffer.append(TEXT_182); >+ stringBuffer.append(TEXT_160); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_183); >+ stringBuffer.append(TEXT_161); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false); >- stringBuffer.append(TEXT_184); >+ stringBuffer.append(TEXT_162); > > } > >- stringBuffer.append(TEXT_185); >+ stringBuffer.append(TEXT_163); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_186); >+ stringBuffer.append(TEXT_164); > > boolean generateSwitch = genNodesCollection.size() != 1; > if (generateSwitch) { > >- stringBuffer.append(TEXT_187); >+ stringBuffer.append(TEXT_165); > > } > for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) { > GenNode nextNode = (GenNode) genNodesIterator.next(); > if (generateSwitch) { > >- stringBuffer.append(TEXT_188); >+ stringBuffer.append(TEXT_166); > stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_167); > > } else { > >- stringBuffer.append(TEXT_190); >+ stringBuffer.append(TEXT_168); > stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_191); >+ stringBuffer.append(TEXT_169); > > } > >- stringBuffer.append(TEXT_192); >+ stringBuffer.append(TEXT_170); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_171); > > if (generateSwitch) { > >- stringBuffer.append(TEXT_193); >+ stringBuffer.append(TEXT_172); > > } else { > >- stringBuffer.append(TEXT_194); >+ stringBuffer.append(TEXT_173); > > } > } > if (generateSwitch) { > >- stringBuffer.append(TEXT_195); >+ stringBuffer.append(TEXT_174); > > } > if (childMetaFeature.isListType()) { > >- stringBuffer.append(TEXT_196); >+ stringBuffer.append(TEXT_175); > > } > } > >- stringBuffer.append(TEXT_197); >+ stringBuffer.append(TEXT_176); > > } > >- stringBuffer.append(TEXT_198); >+ stringBuffer.append(TEXT_177); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_199); >+ stringBuffer.append(TEXT_178); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_179); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_200); >+ stringBuffer.append(TEXT_180); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_181); >+ stringBuffer.append(_getViewCode); >+ stringBuffer.append(TEXT_182); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher")); >+ stringBuffer.append(TEXT_183); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(TEXT_184); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_185); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(TEXT_186); >+ stringBuffer.append(_getDiagramCode); >+ stringBuffer.append(TEXT_187); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_188); > > } > >- stringBuffer.append(TEXT_201); >- stringBuffer.append(TEXT_202); >- stringBuffer.append(TEXT_203); >+ stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_190); >+ stringBuffer.append(TEXT_191); > stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_204); >+ stringBuffer.append(TEXT_192); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_205); >+ stringBuffer.append(TEXT_193); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_206); >- stringBuffer.append(TEXT_207); >- stringBuffer.append(TEXT_208); >+ stringBuffer.append(TEXT_194); >+ stringBuffer.append(TEXT_195); >+ stringBuffer.append(TEXT_196); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_209); >+ stringBuffer.append(TEXT_197); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_210); >- stringBuffer.append(TEXT_211); >- stringBuffer.append(TEXT_212); >+ stringBuffer.append(TEXT_198); >+ stringBuffer.append(TEXT_199); >+ stringBuffer.append(TEXT_200); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_213); >+ stringBuffer.append(TEXT_201); > > for(Iterator it = genCompartment.getChildNodes().iterator(); it.hasNext(); ) { > GenChildNode next = (GenChildNode)it.next(); >@@ -929,42 +903,42 @@ > boolean isListLayout = genCompartment.isListLayout(); > String resolvedSemanticElement = "resolveSemanticElement()"; > >- stringBuffer.append(TEXT_214); >- stringBuffer.append(TEXT_215); >+ stringBuffer.append(TEXT_202); >+ stringBuffer.append(TEXT_203); > if (isStatic) { >- stringBuffer.append(TEXT_216); >+ stringBuffer.append(TEXT_204); > } >- stringBuffer.append(TEXT_217); >+ stringBuffer.append(TEXT_205); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_218); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")); >- stringBuffer.append(TEXT_219); >+ stringBuffer.append(TEXT_206); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand")); >+ stringBuffer.append(TEXT_207); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_220); >+ stringBuffer.append(TEXT_208); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_221); >+ stringBuffer.append(TEXT_209); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_222); >+ stringBuffer.append(TEXT_210); > if (!isListLayout) { >- stringBuffer.append(TEXT_223); >+ stringBuffer.append(TEXT_211); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_224); >+ stringBuffer.append(TEXT_212); > } >- stringBuffer.append(TEXT_225); >+ stringBuffer.append(TEXT_213); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_226); >+ stringBuffer.append(TEXT_214); > stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_227); >+ stringBuffer.append(TEXT_215); > > if (!isListLayout) { > >- stringBuffer.append(TEXT_228); >+ stringBuffer.append(TEXT_216); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); >- stringBuffer.append(TEXT_229); >+ stringBuffer.append(TEXT_217); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_230); >+ stringBuffer.append(TEXT_218); > > int defaultWidth = 40; > int defaultHeight = 40; >@@ -974,152 +948,152 @@ > defaultHeight = defSizeAttrs.getHeight(); > } > >- stringBuffer.append(TEXT_231); >+ stringBuffer.append(TEXT_219); > stringBuffer.append(defaultWidth); >- stringBuffer.append(TEXT_232); >+ stringBuffer.append(TEXT_220); > stringBuffer.append(defaultHeight); >- stringBuffer.append(TEXT_233); >+ stringBuffer.append(TEXT_221); > > } > >- stringBuffer.append(TEXT_234); >+ stringBuffer.append(TEXT_222); > > if (genDiagram.getPalette() != null) { > >- stringBuffer.append(TEXT_235); >+ stringBuffer.append(TEXT_223); > if (isStatic) { >- stringBuffer.append(TEXT_236); >+ stringBuffer.append(TEXT_224); > } >- stringBuffer.append(TEXT_237); >+ stringBuffer.append(TEXT_225); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_238); >+ stringBuffer.append(TEXT_226); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_239); >+ stringBuffer.append(TEXT_227); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_240); >+ stringBuffer.append(TEXT_228); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_241); >+ stringBuffer.append(TEXT_229); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_242); >- stringBuffer.append(importManager.getImportedName(genDiagram.getPalette().getFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_243); >+ stringBuffer.append(TEXT_230); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); >+ stringBuffer.append(TEXT_231); > if (!isListLayout) { >- stringBuffer.append(TEXT_244); >+ stringBuffer.append(TEXT_232); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_245); >+ stringBuffer.append(TEXT_233); > } >- stringBuffer.append(TEXT_246); >+ stringBuffer.append(TEXT_234); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_247); >+ stringBuffer.append(TEXT_235); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_248); >+ stringBuffer.append(TEXT_236); > > if (next.getDomainMetaClass().isMapEntry()) { > /*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/ > >- stringBuffer.append(TEXT_249); >+ stringBuffer.append(TEXT_237); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_250); >+ stringBuffer.append(TEXT_238); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName())); >- stringBuffer.append(TEXT_251); >+ stringBuffer.append(TEXT_239); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_252); >+ stringBuffer.append(TEXT_240); > stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_253); >+ stringBuffer.append(TEXT_241); > > } else { > >- stringBuffer.append(TEXT_254); >+ stringBuffer.append(TEXT_242); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_255); >+ stringBuffer.append(TEXT_243); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName())); >- stringBuffer.append(TEXT_256); >+ stringBuffer.append(TEXT_244); > stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_257); >+ stringBuffer.append(TEXT_245); > > } > >- stringBuffer.append(TEXT_258); >+ stringBuffer.append(TEXT_246); > /*XXX: Class name DomainElementInitializer should be user-customizable*/ >- stringBuffer.append(TEXT_259); >+ stringBuffer.append(TEXT_247); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); >- stringBuffer.append(TEXT_260); >+ stringBuffer.append(TEXT_248); > stringBuffer.append(next.getUniqueIdentifier()); >- stringBuffer.append(TEXT_261); >+ stringBuffer.append(TEXT_249); > if (next.getDomainMetaClass().isExternalInterface()) { >- stringBuffer.append(TEXT_262); >+ stringBuffer.append(TEXT_250); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_263); >+ stringBuffer.append(TEXT_251); > } >- stringBuffer.append(TEXT_264); >+ stringBuffer.append(TEXT_252); > > TypeModelFacet facet = next.getModelFacet(); > GenFeature childFeature = facet.getChildMetaFeature(); > GenFeature containmentFeature = facet.getContainmentMetaFeature(); > if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { > >- stringBuffer.append(TEXT_265); >+ stringBuffer.append(TEXT_253); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_266); >+ stringBuffer.append(TEXT_254); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_267); >+ stringBuffer.append(TEXT_255); > stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_268); >+ stringBuffer.append(TEXT_256); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_269); >+ stringBuffer.append(TEXT_257); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_270); >+ stringBuffer.append(TEXT_258); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_271); >+ stringBuffer.append(TEXT_259); > stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_272); >+ stringBuffer.append(TEXT_260); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_273); >+ stringBuffer.append(TEXT_261); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_274); >+ stringBuffer.append(TEXT_262); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_275); >+ stringBuffer.append(TEXT_263); > > } else { > >- stringBuffer.append(TEXT_276); >+ stringBuffer.append(TEXT_264); > stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_277); >+ stringBuffer.append(TEXT_265); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_278); >+ stringBuffer.append(TEXT_266); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_279); >+ stringBuffer.append(TEXT_267); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_280); >+ stringBuffer.append(TEXT_268); > > } > >- stringBuffer.append(TEXT_281); >+ stringBuffer.append(TEXT_269); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_282); >+ stringBuffer.append(TEXT_270); > if (next.getDomainMetaClass().isExternalInterface()) { >- stringBuffer.append(TEXT_283); >+ stringBuffer.append(TEXT_271); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_284); >+ stringBuffer.append(TEXT_272); > } >- stringBuffer.append(TEXT_285); >+ stringBuffer.append(TEXT_273); > if(!isListLayout) { >- stringBuffer.append(TEXT_286); >+ stringBuffer.append(TEXT_274); > } >- stringBuffer.append(TEXT_287); >+ stringBuffer.append(TEXT_275); > > } > > > } > >- stringBuffer.append(TEXT_288); >+ stringBuffer.append(TEXT_276); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_289); >+ stringBuffer.append(TEXT_277); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/DiagramEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/DiagramEditPartGenerator.java,v >retrieving revision 1.8 >diff -u -r1.8 DiagramEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/DiagramEditPartGenerator.java 9 Aug 2006 14:34:54 -0000 1.8 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/DiagramEditPartGenerator.java 30 Aug 2006 15:22:22 -0000 >@@ -36,290 +36,290 @@ > protected final String TEXT_17 = NL; > protected final String TEXT_18 = NL; > protected final String TEXT_19 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; >- protected final String TEXT_20 = " extends AbstractGraphicalEditPart implements IUpdatableEditPart {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String MODEL_ID = \""; >- protected final String TEXT_21 = "\";" + NL; >- protected final String TEXT_22 = NL; >- protected final String TEXT_23 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >- protected final String TEXT_24 = ";"; >- protected final String TEXT_25 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_26 = "("; >- protected final String TEXT_27 = " model) {" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_28 = " getDiagram() {" + NL + "\t\treturn ("; >- protected final String TEXT_29 = ") getModel();" + NL + "\t}" + NL; >- protected final String TEXT_30 = NL; >- protected final String TEXT_31 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >- protected final String TEXT_32 = " view = ("; >- protected final String TEXT_33 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >- protected final String TEXT_34 = " view = ("; >- protected final String TEXT_35 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addNotify() {" + NL + "\t\tgetDiagram().eAdapters().add(updateManager);" + NL + "\t\tgetDiagram().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t\tsuper.addNotify();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\tinstallEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());" + NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutEditPolicy() {" + NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {"; >- protected final String TEXT_36 = NL + "\t\t\t\tif (request instanceof "; >- protected final String TEXT_37 = ".CreateRequestEx) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_38 = ".CreateRequestEx requestEx = ("; >- protected final String TEXT_39 = ".CreateRequestEx) request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >- protected final String TEXT_40 = " result = new "; >- protected final String TEXT_41 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >- protected final String TEXT_42 = NL + "\t\t\t\t\t\tcase "; >- protected final String TEXT_43 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >- protected final String TEXT_44 = "Command(getDiagram(), requestEx, ("; >- protected final String TEXT_45 = ")getConstraintFor(request)));" + NL + "\t\t\t\t\t\t\tbreak;"; >- protected final String TEXT_46 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_47 = ".getEditingDomain(getDiagram().getElement()), result);" + NL + "\t\t\t\t}"; >- protected final String TEXT_48 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(final ChangeBoundsRequest request, EditPart child, Object constraint) {" + NL + "\t\t\t\tfinal Node node = (Node) child.getModel();" + NL + "\t\t\t\t"; >- protected final String TEXT_49 = " emfCommand = new "; >- protected final String TEXT_50 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate Point moveDelta;" + NL + "\t\t\t\t\tprivate Dimension resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof Bounds == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_51 = " original = new "; >- protected final String TEXT_52 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_53 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(Point move, Dimension resize) {" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new WrappingCommand("; >- protected final String TEXT_54 = ".getEditingDomain(getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();"; >- protected final String TEXT_55 = NL + "\t\tinstallLinkNotationModelRefresher();"; >- protected final String TEXT_56 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {" + NL + "\t\tIFigure f = new FreeformLayer();" + NL + "\t\tf.setBorder(new MarginBorder(5));" + NL + "\t\tf.setLayoutManager(new FreeformLayout());" + NL + "\t\treturn f;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {" + NL + "\t\tif ("; >- protected final String TEXT_57 = ".class == key) {" + NL + "\t\t\treturn new "; >- protected final String TEXT_58 = "(this);" + NL + "\t\t}"; >- protected final String TEXT_59 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn getDiagram().getVisibleChildren();" + NL + "\t}" + NL; >- protected final String TEXT_60 = NL; >- protected final String TEXT_61 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_62 = "static "; >- protected final String TEXT_63 = "class Create"; >- protected final String TEXT_64 = "NotationCommand extends "; >- protected final String TEXT_65 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create"; >- protected final String TEXT_66 = "NotationCommand("; >- protected final String TEXT_67 = " parent, " + NL + "\t\t\t\t"; >- protected final String TEXT_68 = " domainElement"; >- protected final String TEXT_69 = ", "; >- protected final String TEXT_70 = " constraint"; >- protected final String TEXT_71 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = "; >- protected final String TEXT_72 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t"; >- protected final String TEXT_73 = ".decorateView(createdNode);"; >- protected final String TEXT_74 = NL + "\t\t\t"; >- protected final String TEXT_75 = " bounds = "; >- protected final String TEXT_76 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);"; >- protected final String TEXT_77 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, "; >- protected final String TEXT_78 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, "; >- protected final String TEXT_79 = "));"; >- protected final String TEXT_80 = NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_81 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_82 = "static "; >- protected final String TEXT_83 = "class Create"; >- protected final String TEXT_84 = "Command extends "; >- protected final String TEXT_85 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create"; >- protected final String TEXT_86 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >- protected final String TEXT_87 = "Command("; >- protected final String TEXT_88 = " parent, "; >- protected final String TEXT_89 = ".CreateRequestEx request"; >- protected final String TEXT_90 = ", "; >- protected final String TEXT_91 = " constraint"; >- protected final String TEXT_92 = ") {" + NL + "\t\t\t"; >- protected final String TEXT_93 = " domainModelEditDomain = "; >- protected final String TEXT_94 = ".getEditingDomain(parent.getDiagram().getElement());"; >- protected final String TEXT_95 = NL + "\t\t\t"; >- protected final String TEXT_96 = " createdDomainElement = "; >- protected final String TEXT_97 = ".eINSTANCE.create(" + NL + "\t\t\t\t"; >- protected final String TEXT_98 = ".eINSTANCE.get"; >- protected final String TEXT_99 = "());"; >- protected final String TEXT_100 = NL + "\t\t\t"; >- protected final String TEXT_101 = " createdDomainElement = "; >- protected final String TEXT_102 = ".eINSTANCE.create"; >- protected final String TEXT_103 = "();"; >- protected final String TEXT_104 = NL + "\t\t\t"; >- protected final String TEXT_105 = NL + "\t\t\t"; >- protected final String TEXT_106 = "."; >- protected final String TEXT_107 = ".initializeElement("; >- protected final String TEXT_108 = "("; >- protected final String TEXT_109 = ") "; >- protected final String TEXT_110 = "createdDomainElement);"; >- protected final String TEXT_111 = NL + "\t\t\t"; >- protected final String TEXT_112 = " compoundCommand = new "; >- protected final String TEXT_113 = "();" + NL + "\t\t\tcompoundCommand.append("; >- protected final String TEXT_114 = ".create(domainModelEditDomain, "; >- protected final String TEXT_115 = ", " + NL + "\t\t\t\t"; >- protected final String TEXT_116 = ".eINSTANCE.get"; >- protected final String TEXT_117 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append("; >- protected final String TEXT_118 = ".create(domainModelEditDomain, "; >- protected final String TEXT_119 = ", " + NL + "\t\t\t\t"; >- protected final String TEXT_120 = ".eINSTANCE.get"; >- protected final String TEXT_121 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;"; >- protected final String TEXT_122 = NL + "\t\t\tthis.domainModelAddCommand = "; >- protected final String TEXT_123 = ".create(domainModelEditDomain, "; >- protected final String TEXT_124 = ", " + NL + "\t\t\t\t"; >- protected final String TEXT_125 = ".eINSTANCE.get"; >- protected final String TEXT_126 = "(), createdDomainElement);"; >- protected final String TEXT_127 = NL + "\t\t\tthis.notationAddCommand = new Create"; >- protected final String TEXT_128 = "NotationCommand(parent, "; >- protected final String TEXT_129 = "("; >- protected final String TEXT_130 = ") "; >- protected final String TEXT_131 = "createdDomainElement"; >- protected final String TEXT_132 = ", constraint"; >- protected final String TEXT_133 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >- protected final String TEXT_134 = NL; >- protected final String TEXT_135 = NL; >- protected final String TEXT_136 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_137 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_138 = " feature, "; >- protected final String TEXT_139 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >- protected final String TEXT_140 = NL; >- protected final String TEXT_141 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_142 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_143 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class UpdateManager extends "; >- protected final String TEXT_144 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_145 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_146 = " affectedEditParts = findAffectedParts(msg);" + NL + "\t\t\tfor("; >- protected final String TEXT_147 = " it = affectedEditParts.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\tIUpdatableEditPart next = (IUpdatableEditPart) it.next();" + NL + "\t\t\t\tIUpdatableEditPart.Refresher refresher = next.getRefresher(("; >- protected final String TEXT_148 = ")msg.getFeature(), msg);" + NL + "\t\t\t\tif (refresher != null) {" + NL + "\t\t\t\t\trefresher.refresh();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_149 = "/*<IUpdatableEditPart>*/ findAffectedParts("; >- protected final String TEXT_150 = " msg) {" + NL + "\t\t\tObject notifier = msg.getNotifier();" + NL + "\t\t\tif (notifier instanceof "; >- protected final String TEXT_151 = ") {" + NL + "\t\t\t\t"; >- protected final String TEXT_152 = " view = getView((EObject) notifier);" + NL + "\t\t\t\tif (view != null) {" + NL + "\t\t\t\t\tEditPart affectedEditPart = (EditPart) getViewer().getEditPartRegistry().get(view);" + NL + "\t\t\t\t\tif (affectedEditPart != null) {" + NL + "\t\t\t\t\t\treturn "; >- protected final String TEXT_153 = ".singleton(affectedEditPart);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn "; >- protected final String TEXT_154 = ".EMPTY_LIST;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_155 = " getView(EObject offspring) {" + NL + "\t\t\twhile (offspring != null && offspring instanceof View == false) {" + NL + "\t\t\t\toffspring = offspring.eContainer();" + NL + "\t\t\t}" + NL + "\t\t\treturn ("; >- protected final String TEXT_156 = ") offspring;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tif (!getDiagram().eAdapters().contains(updateManager)) {" + NL + "\t\t\tgetDiagram().eAdapters().add(updateManager);" + NL + "\t\t}" + NL + "\t\tif (!getDiagram().getElement().eAdapters().contains(domainModelRefresher)) {" + NL + "\t\t\tgetDiagram().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t\t}" + NL + "\t\tinstallNotationModelRefresher();"; >- protected final String TEXT_157 = NL + "\t\tinstallLinkNotationModelRefresher();"; >- protected final String TEXT_158 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {"; >- protected final String TEXT_159 = NL + "\t\tuninstallLinkNotationModelRefresher();"; >- protected final String TEXT_160 = NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tgetDiagram().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tgetDiagram().eAdapters().remove(updateManager);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >- protected final String TEXT_161 = NL; >- protected final String TEXT_162 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\tNotationModelRefresher refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_163 = " domainModelEditDomain = "; >- protected final String TEXT_164 = ".getEditingDomain("; >- protected final String TEXT_165 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate NotationModelRefresher notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate NotationModelRefresher getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends "; >- protected final String TEXT_166 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_167 = " filter;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_168 = " editingDomain;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic NotationModelRefresher() {" + NL + "\t\t\tcreateFilter();" + NL + "\t\t}"; >- protected final String TEXT_169 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in "; >- protected final String TEXT_170 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_171 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn "; >- protected final String TEXT_172 = ".NOT_TOUCH;" + NL + "\t\t}"; >- protected final String TEXT_173 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void createFilter() {"; >- protected final String TEXT_174 = NL + "\t\t\tfilter = "; >- protected final String TEXT_175 = ".createFeatureFilter("; >- protected final String TEXT_176 = ".eINSTANCE.get"; >- protected final String TEXT_177 = "());"; >- protected final String TEXT_178 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_179 = ".createFeatureFilter("; >- protected final String TEXT_180 = ".eINSTANCE.get"; >- protected final String TEXT_181 = "()));"; >- protected final String TEXT_182 = NL + "\t\t\tfilter = filter.and("; >- protected final String TEXT_183 = ".createNotifierFilter("; >- protected final String TEXT_184 = ".getElement()));"; >- protected final String TEXT_185 = NL + "\t\t\tfilter = "; >- protected final String TEXT_186 = ".createNotifierFilter("; >- protected final String TEXT_187 = ".getElement());"; >- protected final String TEXT_188 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);"; >- protected final String TEXT_189 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void install("; >- protected final String TEXT_190 = " editingDomain) {" + NL + "\t\t\tif (this.editingDomain != null && !this.editingDomain.equals(editingDomain)) {" + NL + "\t\t\t\tthrow new IllegalStateException(\"Already listening to another editing domain\");" + NL + "\t\t\t}" + NL + "\t\t\tthis.editingDomain = editingDomain;" + NL + "\t\t\tthis.editingDomain.addResourceSetListener(this);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isInstalled() {" + NL + "\t\t\treturn editingDomain != null;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void uninstall() {" + NL + "\t\t\tif (isInstalled()) {" + NL + "\t\t\t\teditingDomain.removeResourceSetListener(this);" + NL + "\t\t\t\teditingDomain = null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isPrecommitOnly() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_191 = " transactionAboutToCommit("; >- protected final String TEXT_192 = " event) {" + NL + "\t\t\treturn getRefreshNotationModelCommand();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_193 = " getFilter() {" + NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t"; >- protected final String TEXT_194 = " command = getRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_195 = " domainModelEditDomain = "; >- protected final String TEXT_196 = ".getEditingDomain("; >- protected final String TEXT_197 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new WrappingCommand(domainModelEditDomain, command));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_198 = " getRefreshNotationModelCommand() {" + NL + "\t\t"; >- protected final String TEXT_199 = " semanticChildren = getSemanticChildren();" + NL + "\t\t"; >- protected final String TEXT_200 = " notationalChildren = "; >- protected final String TEXT_201 = ".getChildren();" + NL + "\t\tfinal "; >- protected final String TEXT_202 = " semanticToNotational = new "; >- protected final String TEXT_203 = "();" + NL + "\t\tfor("; >- protected final String TEXT_204 = " it = notationalChildren.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_205 = " next = ("; >- protected final String TEXT_206 = ") it.next();" + NL + "\t\t\t"; >- protected final String TEXT_207 = " nextSemantic = next.getElement();" + NL + "\t\t\tif (nextSemantic != null) {" + NL + "\t\t\t\tsemanticToNotational.put(nextSemantic, next);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_208 = " parentView = "; >- protected final String TEXT_209 = ";" + NL + "\t\t"; >- protected final String TEXT_210 = " command = new "; >- protected final String TEXT_211 = "();" + NL + "\t\tfor("; >- protected final String TEXT_212 = " it = semanticChildren.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_213 = " next = ("; >- protected final String TEXT_214 = ") it.next();" + NL + "\t\t\t"; >- protected final String TEXT_215 = " currentView = ("; >- protected final String TEXT_216 = ") semanticToNotational.remove(next);" + NL + "\t\t\tint nodeVisualID = "; >- protected final String TEXT_217 = ".INSTANCE.getNodeVisualID(parentView, next);" + NL + "\t\t\tif (currentView == null) {" + NL + "\t\t\t\tif (shouldCreateView(next)) {" + NL + "\t\t\t\t\tcommand.appendIfCanExecute(getCreateNotationalElementCommand(parentView, next, nodeVisualID));" + NL + "\t\t\t\t}" + NL + "\t\t\t} else if (nodeVisualID != "; >- protected final String TEXT_218 = ".getVisualID(currentView)) {" + NL + "\t\t\t\t"; >- protected final String TEXT_219 = " notationalCommand = getCreateNotationalElementCommand(parentView, next, nodeVisualID);" + NL + "\t\t\t\tif (notationalCommand != null) {" + NL + "\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_220 = "(parentView, notationalCommand, currentView));" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tfor("; >- protected final String TEXT_221 = " it = semanticToNotational.values().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_222 = " obsoleteView = ("; >- protected final String TEXT_223 = ") it.next();" + NL + "\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_224 = "(parentView, obsoleteView));" + NL + "\t\t}" + NL + "\t\treturn command.getCommandList().isEmpty() ? null : command;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_225 = " getCreateNotationalElementCommand("; >- protected final String TEXT_226 = " parentView, "; >- protected final String TEXT_227 = " domainElement, int nodeVisualID) {" + NL + "\t\tswitch (nodeVisualID) {"; >- protected final String TEXT_228 = NL + "\t\tcase "; >- protected final String TEXT_229 = ".VISUAL_ID:" + NL + "\t\t\tif (domainElement instanceof "; >- protected final String TEXT_230 = ") {" + NL + "\t\t\t\treturn new Create"; >- protected final String TEXT_231 = "NotationCommand(parentView, domainElement"; >- protected final String TEXT_232 = ", new Rectangle(0, 0, 0, 0)"; >- protected final String TEXT_233 = ");" + NL + "\t\t\t}" + NL + "\t\t\treturn null;"; >- protected final String TEXT_234 = NL + "\t\tdefault:" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_235 = " getSemanticChildren() {"; >- protected final String TEXT_236 = NL; >- protected final String TEXT_237 = NL + "\treturn "; >- protected final String TEXT_238 = ".EMPTY_LIST;"; >- protected final String TEXT_239 = NL + "\t"; >- protected final String TEXT_240 = " result = new "; >- protected final String TEXT_241 = "();"; >- protected final String TEXT_242 = NL + "\t"; >- protected final String TEXT_243 = " viewObject = "; >- protected final String TEXT_244 = ";" + NL + "\t"; >- protected final String TEXT_245 = " modelObject = viewObject.getElement();" + NL + "\t"; >- protected final String TEXT_246 = " nextValue;" + NL + "\tint nodeVID;"; >- protected final String TEXT_247 = NL + "\tfor("; >- protected final String TEXT_248 = " it = "; >- protected final String TEXT_249 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >- protected final String TEXT_250 = ") it.next();"; >- protected final String TEXT_251 = NL + "\tnextValue = ("; >- protected final String TEXT_252 = ")"; >- protected final String TEXT_253 = ";"; >- protected final String TEXT_254 = NL + "\tnodeVID = "; >- protected final String TEXT_255 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);"; >- protected final String TEXT_256 = NL + "\tswitch (nodeVID) {"; >- protected final String TEXT_257 = NL + "\tcase "; >- protected final String TEXT_258 = ".VISUAL_ID: {"; >- protected final String TEXT_259 = NL + "\tif ("; >- protected final String TEXT_260 = ".VISUAL_ID == nodeVID) {"; >- protected final String TEXT_261 = NL + "\t\tresult.add(nextValue);"; >- protected final String TEXT_262 = NL + "\t\tbreak;" + NL + "\t\t}"; >- protected final String TEXT_263 = NL + "\t\t}"; >- protected final String TEXT_264 = NL + "\t}"; >- protected final String TEXT_265 = NL + "\t}"; >- protected final String TEXT_266 = NL + "\treturn result;"; >- protected final String TEXT_267 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t * The generated code always returns "; >- protected final String TEXT_268 = ". " + NL + "\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean shouldCreateView(EObject domainElement) {" + NL + "\t\treturn "; >- protected final String TEXT_269 = ";" + NL + "\t}" + NL; >- protected final String TEXT_270 = NL; >- protected final String TEXT_271 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_272 = " domainModelEditDomain = "; >- protected final String TEXT_273 = ".getEditingDomain("; >- protected final String TEXT_274 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends "; >- protected final String TEXT_275 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_276 = " filter;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_277 = " editingDomain;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher() {" + NL + "\t\t\tcreateFilter();" + NL + "\t\t}"; >- protected final String TEXT_278 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in "; >- protected final String TEXT_279 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_280 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn "; >- protected final String TEXT_281 = ".NOT_TOUCH;" + NL + "\t\t}"; >- protected final String TEXT_282 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_283 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn "; >- protected final String TEXT_284 = ".createEventTypeFilter("; >- protected final String TEXT_285 = ".SET).or(" + NL + "\t\t\t\t"; >- protected final String TEXT_286 = ".createEventTypeFilter("; >- protected final String TEXT_287 = ".UNSET).or(" + NL + "\t\t\t\t"; >- protected final String TEXT_288 = ".createEventTypeFilter("; >- protected final String TEXT_289 = ".REMOVE).or(" + NL + "\t\t\t\t"; >- protected final String TEXT_290 = ".createEventTypeFilter("; >- protected final String TEXT_291 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}"; >- protected final String TEXT_292 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate void createFilter() {"; >- protected final String TEXT_293 = NL; >- protected final String TEXT_294 = NL + "\t\t\tfilter = "; >- protected final String TEXT_295 = ".createFeatureFilter("; >- protected final String TEXT_296 = ".eINSTANCE.get"; >- protected final String TEXT_297 = "());"; >- protected final String TEXT_298 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_299 = ".createFeatureFilter("; >- protected final String TEXT_300 = ".eINSTANCE.get"; >- protected final String TEXT_301 = "()));"; >- protected final String TEXT_302 = NL; >- protected final String TEXT_303 = NL + "\t\t\tfilter = "; >+ protected final String TEXT_20 = " extends AbstractGraphicalEditPart implements "; >+ protected final String TEXT_21 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String MODEL_ID = \""; >+ protected final String TEXT_22 = "\";" + NL; >+ protected final String TEXT_23 = NL; >+ protected final String TEXT_24 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >+ protected final String TEXT_25 = ";"; >+ protected final String TEXT_26 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_27 = "("; >+ protected final String TEXT_28 = " model) {" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_29 = " getDiagram() {" + NL + "\t\treturn ("; >+ protected final String TEXT_30 = ") getModel();" + NL + "\t}" + NL; >+ protected final String TEXT_31 = NL; >+ protected final String TEXT_32 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >+ protected final String TEXT_33 = " view = ("; >+ protected final String TEXT_34 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >+ protected final String TEXT_35 = " view = ("; >+ protected final String TEXT_36 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addNotify() {" + NL + "\t\tgetDiagram().eAdapters().add(getUpdateManager());" + NL + "\t\tgetDiagram().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t\tsuper.addNotify();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\tinstallEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());" + NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutEditPolicy() {" + NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {"; >+ protected final String TEXT_37 = NL + "\t\t\t\tif (request instanceof "; >+ protected final String TEXT_38 = ") {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_39 = " requestEx = ("; >+ protected final String TEXT_40 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_41 = " result = new "; >+ protected final String TEXT_42 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {"; >+ protected final String TEXT_43 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_44 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create"; >+ protected final String TEXT_45 = "Command(getDiagram(), requestEx, ("; >+ protected final String TEXT_46 = ")getConstraintFor(request)));" + NL + "\t\t\t\t\t\t\tbreak;"; >+ protected final String TEXT_47 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new "; >+ protected final String TEXT_48 = "("; >+ protected final String TEXT_49 = ".getEditingDomain(getDiagram().getElement()), result);" + NL + "\t\t\t\t}"; >+ protected final String TEXT_50 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(final ChangeBoundsRequest request, EditPart child, Object constraint) {" + NL + "\t\t\t\tfinal Node node = (Node) child.getModel();" + NL + "\t\t\t\t"; >+ protected final String TEXT_51 = " emfCommand = new "; >+ protected final String TEXT_52 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate Point moveDelta;" + NL + "\t\t\t\t\tprivate Dimension resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof Bounds == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_53 = " original = new "; >+ protected final String TEXT_54 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_55 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(Point move, Dimension resize) {" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_56 = "("; >+ protected final String TEXT_57 = ".getEditingDomain(getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();"; >+ protected final String TEXT_58 = NL + "\t\tinstallLinkNotationModelRefresher();"; >+ protected final String TEXT_59 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {" + NL + "\t\tIFigure f = new FreeformLayer();" + NL + "\t\tf.setBorder(new MarginBorder(5));" + NL + "\t\tf.setLayoutManager(new FreeformLayout());" + NL + "\t\treturn f;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {" + NL + "\t\tif ("; >+ protected final String TEXT_60 = ".class == key) {" + NL + "\t\t\treturn new "; >+ protected final String TEXT_61 = "(this);" + NL + "\t\t}"; >+ protected final String TEXT_62 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn getDiagram().getVisibleChildren();" + NL + "\t}" + NL; >+ protected final String TEXT_63 = NL; >+ protected final String TEXT_64 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_65 = "static "; >+ protected final String TEXT_66 = "class Create"; >+ protected final String TEXT_67 = "NotationCommand extends "; >+ protected final String TEXT_68 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create"; >+ protected final String TEXT_69 = "NotationCommand("; >+ protected final String TEXT_70 = " parent, " + NL + "\t\t\t\t"; >+ protected final String TEXT_71 = " domainElement"; >+ protected final String TEXT_72 = ", "; >+ protected final String TEXT_73 = " constraint"; >+ protected final String TEXT_74 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = "; >+ protected final String TEXT_75 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t"; >+ protected final String TEXT_76 = ".decorateView(createdNode);"; >+ protected final String TEXT_77 = NL + "\t\t\t"; >+ protected final String TEXT_78 = " bounds = "; >+ protected final String TEXT_79 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);"; >+ protected final String TEXT_80 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, "; >+ protected final String TEXT_81 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, "; >+ protected final String TEXT_82 = "));"; >+ protected final String TEXT_83 = NL + "\t\t}" + NL + "\t}" + NL; >+ protected final String TEXT_84 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_85 = "static "; >+ protected final String TEXT_86 = "class Create"; >+ protected final String TEXT_87 = "Command extends "; >+ protected final String TEXT_88 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create"; >+ protected final String TEXT_89 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >+ protected final String TEXT_90 = "Command("; >+ protected final String TEXT_91 = " parent, "; >+ protected final String TEXT_92 = " request"; >+ protected final String TEXT_93 = ", "; >+ protected final String TEXT_94 = " constraint"; >+ protected final String TEXT_95 = ") {" + NL + "\t\t\t"; >+ protected final String TEXT_96 = " domainModelEditDomain = "; >+ protected final String TEXT_97 = ".getEditingDomain(parent.getDiagram().getElement());"; >+ protected final String TEXT_98 = NL + "\t\t\t"; >+ protected final String TEXT_99 = " createdDomainElement = "; >+ protected final String TEXT_100 = ".eINSTANCE.create(" + NL + "\t\t\t\t"; >+ protected final String TEXT_101 = ".eINSTANCE.get"; >+ protected final String TEXT_102 = "());"; >+ protected final String TEXT_103 = NL + "\t\t\t"; >+ protected final String TEXT_104 = " createdDomainElement = "; >+ protected final String TEXT_105 = ".eINSTANCE.create"; >+ protected final String TEXT_106 = "();"; >+ protected final String TEXT_107 = NL + "\t\t\t"; >+ protected final String TEXT_108 = NL + "\t\t\t"; >+ protected final String TEXT_109 = "."; >+ protected final String TEXT_110 = ".initializeElement("; >+ protected final String TEXT_111 = "("; >+ protected final String TEXT_112 = ") "; >+ protected final String TEXT_113 = "createdDomainElement);"; >+ protected final String TEXT_114 = NL + "\t\t\t"; >+ protected final String TEXT_115 = " compoundCommand = new "; >+ protected final String TEXT_116 = "();" + NL + "\t\t\tcompoundCommand.append("; >+ protected final String TEXT_117 = ".create(domainModelEditDomain, "; >+ protected final String TEXT_118 = ", " + NL + "\t\t\t\t"; >+ protected final String TEXT_119 = ".eINSTANCE.get"; >+ protected final String TEXT_120 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append("; >+ protected final String TEXT_121 = ".create(domainModelEditDomain, "; >+ protected final String TEXT_122 = ", " + NL + "\t\t\t\t"; >+ protected final String TEXT_123 = ".eINSTANCE.get"; >+ protected final String TEXT_124 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;"; >+ protected final String TEXT_125 = NL + "\t\t\tthis.domainModelAddCommand = "; >+ protected final String TEXT_126 = ".create(domainModelEditDomain, "; >+ protected final String TEXT_127 = ", " + NL + "\t\t\t\t"; >+ protected final String TEXT_128 = ".eINSTANCE.get"; >+ protected final String TEXT_129 = "(), createdDomainElement);"; >+ protected final String TEXT_130 = NL + "\t\t\tthis.notationAddCommand = new Create"; >+ protected final String TEXT_131 = "NotationCommand(parent, "; >+ protected final String TEXT_132 = "("; >+ protected final String TEXT_133 = ") "; >+ protected final String TEXT_134 = "createdDomainElement"; >+ protected final String TEXT_135 = ", constraint"; >+ protected final String TEXT_136 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >+ protected final String TEXT_137 = NL; >+ protected final String TEXT_138 = NL; >+ protected final String TEXT_139 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_140 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_141 = " feature, "; >+ protected final String TEXT_142 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >+ protected final String TEXT_143 = NL; >+ protected final String TEXT_144 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_145 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_146 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tif (!getDiagram().eAdapters().contains(getUpdateManager())) {" + NL + "\t\t\tgetDiagram().eAdapters().add(getUpdateManager());" + NL + "\t\t}" + NL + "\t\tif (!getDiagram().getElement().eAdapters().contains(domainModelRefresher)) {" + NL + "\t\t\tgetDiagram().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t\t}" + NL + "\t\tinstallNotationModelRefresher();"; >+ protected final String TEXT_147 = NL + "\t\tinstallLinkNotationModelRefresher();"; >+ protected final String TEXT_148 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {"; >+ protected final String TEXT_149 = NL + "\t\tuninstallLinkNotationModelRefresher();"; >+ protected final String TEXT_150 = NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tgetDiagram().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tgetDiagram().eAdapters().remove(getUpdateManager());" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >+ protected final String TEXT_151 = NL; >+ protected final String TEXT_152 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t"; >+ protected final String TEXT_153 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_154 = " domainModelEditDomain = "; >+ protected final String TEXT_155 = ".getEditingDomain("; >+ protected final String TEXT_156 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_157 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_158 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends "; >+ protected final String TEXT_159 = " {"; >+ protected final String TEXT_160 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in "; >+ protected final String TEXT_161 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_162 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_163 = ".NOT_TOUCH;" + NL + "\t\t}"; >+ protected final String TEXT_164 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_165 = " createFilter() {"; >+ protected final String TEXT_166 = NL + "\t\t\t"; >+ protected final String TEXT_167 = " filter = "; >+ protected final String TEXT_168 = ".createFeatureFilter("; >+ protected final String TEXT_169 = ".eINSTANCE.get"; >+ protected final String TEXT_170 = "());"; >+ protected final String TEXT_171 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_172 = ".createFeatureFilter("; >+ protected final String TEXT_173 = ".eINSTANCE.get"; >+ protected final String TEXT_174 = "()));"; >+ protected final String TEXT_175 = NL + "\t\t\tfilter = filter.and("; >+ protected final String TEXT_176 = ".createNotifierFilter("; >+ protected final String TEXT_177 = ".getElement()));"; >+ protected final String TEXT_178 = NL + "\t\t\t"; >+ protected final String TEXT_179 = " filter = "; >+ protected final String TEXT_180 = ".createNotifierFilter("; >+ protected final String TEXT_181 = ".getElement());"; >+ protected final String TEXT_182 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);"; >+ protected final String TEXT_183 = NL + "\t\t\t"; >+ protected final String TEXT_184 = " filter = getConstrainedChildrenFilter();"; >+ protected final String TEXT_185 = NL + "\t\t\t"; >+ protected final String TEXT_186 = " filter = "; >+ protected final String TEXT_187 = ".NOT_TOUCH;"; >+ protected final String TEXT_188 = NL + "\t\t\treturn filter;"; >+ protected final String TEXT_189 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_190 = " getCreateNotationalElementCommand("; >+ protected final String TEXT_191 = " descriptor) {" + NL + "\t\t\t"; >+ protected final String TEXT_192 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {"; >+ protected final String TEXT_193 = NL + "\t\t\tcase "; >+ protected final String TEXT_194 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof "; >+ protected final String TEXT_195 = ") {" + NL + "\t\t\t\t\treturn new Create"; >+ protected final String TEXT_196 = "NotationCommand(getHost(), domainElement"; >+ protected final String TEXT_197 = ", new Rectangle(0, 0, 0, 0)"; >+ protected final String TEXT_198 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;"; >+ protected final String TEXT_199 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_200 = " getSemanticChildNodes() {"; >+ protected final String TEXT_201 = NL; >+ protected final String TEXT_202 = NL + "\treturn "; >+ protected final String TEXT_203 = ".EMPTY_LIST;"; >+ protected final String TEXT_204 = NL + "\t"; >+ protected final String TEXT_205 = " result = new "; >+ protected final String TEXT_206 = "();"; >+ protected final String TEXT_207 = NL + "\t"; >+ protected final String TEXT_208 = " viewObject = "; >+ protected final String TEXT_209 = ";" + NL + "\t"; >+ protected final String TEXT_210 = " modelObject = viewObject.getElement();" + NL + "\t"; >+ protected final String TEXT_211 = " nextValue;" + NL + "\tint nodeVID;"; >+ protected final String TEXT_212 = NL + "\tfor("; >+ protected final String TEXT_213 = " it = "; >+ protected final String TEXT_214 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >+ protected final String TEXT_215 = ") it.next();"; >+ protected final String TEXT_216 = NL + "\tnextValue = ("; >+ protected final String TEXT_217 = ")"; >+ protected final String TEXT_218 = ";"; >+ protected final String TEXT_219 = NL + "\tnodeVID = "; >+ protected final String TEXT_220 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);"; >+ protected final String TEXT_221 = NL + "\tswitch (nodeVID) {"; >+ protected final String TEXT_222 = NL + "\tcase "; >+ protected final String TEXT_223 = ".VISUAL_ID: {"; >+ protected final String TEXT_224 = NL + "\tif ("; >+ protected final String TEXT_225 = ".VISUAL_ID == nodeVID) {"; >+ protected final String TEXT_226 = NL + "\t\tresult.add(new "; >+ protected final String TEXT_227 = "(nextValue, nodeVID));"; >+ protected final String TEXT_228 = NL + "\t\tbreak;" + NL + "\t\t}"; >+ protected final String TEXT_229 = NL + "\t\t}"; >+ protected final String TEXT_230 = NL + "\t}"; >+ protected final String TEXT_231 = NL + "\t}"; >+ protected final String TEXT_232 = NL + "\treturn result;"; >+ protected final String TEXT_233 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns "; >+ protected final String TEXT_234 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView("; >+ protected final String TEXT_235 = " descriptor) {" + NL + "\t\t\treturn "; >+ protected final String TEXT_236 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_237 = " getHost() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_238 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t"; >+ protected final String TEXT_239 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_240 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_241 = " domainModelEditDomain = "; >+ protected final String TEXT_242 = ".getEditingDomain("; >+ protected final String TEXT_243 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new "; >+ protected final String TEXT_244 = "(domainModelEditDomain, command));" + NL + "\t}" + NL + NL; >+ protected final String TEXT_245 = NL; >+ protected final String TEXT_246 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_247 = " domainModelEditDomain = "; >+ protected final String TEXT_248 = ".getEditingDomain("; >+ protected final String TEXT_249 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * Service to find a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_250 = " viewService;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_251 = " getViewService() {" + NL + "\t\tif (viewService == null) {" + NL + "\t\t\tviewService = new "; >+ protected final String TEXT_252 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn viewService;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher(getViewService());" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends "; >+ protected final String TEXT_253 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher("; >+ protected final String TEXT_254 = " viewService) {" + NL + "\t\t\tsuper(viewService);" + NL + "\t\t}"; >+ protected final String TEXT_255 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in "; >+ protected final String TEXT_256 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_257 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_258 = ".NOT_TOUCH;" + NL + "\t\t}"; >+ protected final String TEXT_259 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >+ protected final String TEXT_260 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_261 = ".createEventTypeFilter("; >+ protected final String TEXT_262 = ".SET).or(" + NL + "\t\t\t\t"; >+ protected final String TEXT_263 = ".createEventTypeFilter("; >+ protected final String TEXT_264 = ".UNSET).or(" + NL + "\t\t\t\t"; >+ protected final String TEXT_265 = ".createEventTypeFilter("; >+ protected final String TEXT_266 = ".REMOVE).or(" + NL + "\t\t\t\t"; >+ protected final String TEXT_267 = ".createEventTypeFilter("; >+ protected final String TEXT_268 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}"; >+ protected final String TEXT_269 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_270 = " createFilter() {"; >+ protected final String TEXT_271 = NL; >+ protected final String TEXT_272 = NL + "\t\t\t"; >+ protected final String TEXT_273 = " filter = "; >+ protected final String TEXT_274 = ".createFeatureFilter("; >+ protected final String TEXT_275 = ".eINSTANCE.get"; >+ protected final String TEXT_276 = "());"; >+ protected final String TEXT_277 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_278 = ".createFeatureFilter("; >+ protected final String TEXT_279 = ".eINSTANCE.get"; >+ protected final String TEXT_280 = "()));"; >+ protected final String TEXT_281 = NL; >+ protected final String TEXT_282 = NL + "\t\t\t"; >+ protected final String TEXT_283 = " filter = "; >+ protected final String TEXT_284 = ".createFeatureFilter("; >+ protected final String TEXT_285 = ".eINSTANCE.get"; >+ protected final String TEXT_286 = "());"; >+ protected final String TEXT_287 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_288 = ".createFeatureFilter("; >+ protected final String TEXT_289 = ".eINSTANCE.get"; >+ protected final String TEXT_290 = "()));"; >+ protected final String TEXT_291 = NL; >+ protected final String TEXT_292 = NL + "\t\t\t"; >+ protected final String TEXT_293 = " filter = "; >+ protected final String TEXT_294 = ".createFeatureFilter("; >+ protected final String TEXT_295 = ".eINSTANCE.get"; >+ protected final String TEXT_296 = "());"; >+ protected final String TEXT_297 = NL + "\t\t\tfilter = filter.or("; >+ protected final String TEXT_298 = ".createFeatureFilter("; >+ protected final String TEXT_299 = ".eINSTANCE.get"; >+ protected final String TEXT_300 = "()));"; >+ protected final String TEXT_301 = NL; >+ protected final String TEXT_302 = NL + "\t\t\t"; >+ protected final String TEXT_303 = " filter = "; > protected final String TEXT_304 = ".createFeatureFilter("; > protected final String TEXT_305 = ".eINSTANCE.get"; > protected final String TEXT_306 = "());"; >@@ -327,225 +327,138 @@ > protected final String TEXT_308 = ".createFeatureFilter("; > protected final String TEXT_309 = ".eINSTANCE.get"; > protected final String TEXT_310 = "()));"; >- protected final String TEXT_311 = NL; >- protected final String TEXT_312 = NL + "\t\t\tfilter = "; >- protected final String TEXT_313 = ".createFeatureFilter("; >- protected final String TEXT_314 = ".eINSTANCE.get"; >- protected final String TEXT_315 = "());"; >- protected final String TEXT_316 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_317 = ".createFeatureFilter("; >- protected final String TEXT_318 = ".eINSTANCE.get"; >- protected final String TEXT_319 = "()));"; >- protected final String TEXT_320 = NL; >- protected final String TEXT_321 = NL + "\t\t\tfilter = "; >- protected final String TEXT_322 = ".createFeatureFilter("; >- protected final String TEXT_323 = ".eINSTANCE.get"; >- protected final String TEXT_324 = "());"; >- protected final String TEXT_325 = NL + "\t\t\tfilter = filter.or("; >- protected final String TEXT_326 = ".createFeatureFilter("; >- protected final String TEXT_327 = ".eINSTANCE.get"; >- protected final String TEXT_328 = "()));"; >- protected final String TEXT_329 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);"; >- protected final String TEXT_330 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter();"; >- protected final String TEXT_331 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());"; >- protected final String TEXT_332 = NL + "\t\t\tfilter = createUncontainedLinksFilter();"; >- protected final String TEXT_333 = NL + "\t\t\tfilter = "; >- protected final String TEXT_334 = ".ANY.negated();"; >- protected final String TEXT_335 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void install("; >- protected final String TEXT_336 = " editingDomain) {" + NL + "\t\t\tif (this.editingDomain != null && !this.editingDomain.equals(editingDomain)) {" + NL + "\t\t\t\tthrow new IllegalStateException(\"Already listening to another editing domain\");" + NL + "\t\t\t}" + NL + "\t\t\tthis.editingDomain = editingDomain;" + NL + "\t\t\tthis.editingDomain.addResourceSetListener(this);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isInstalled() {" + NL + "\t\t\treturn editingDomain != null;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void uninstall() {" + NL + "\t\t\tif (isInstalled()) {" + NL + "\t\t\t\teditingDomain.removeResourceSetListener(this);" + NL + "\t\t\t\teditingDomain = null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean isPrecommitOnly() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_337 = " transactionAboutToCommit("; >- protected final String TEXT_338 = " event) {" + NL + "\t\t\treturn getRefreshLinkNotationModelCommand();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_339 = " getFilter() {" + NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t"; >- protected final String TEXT_340 = " command = getRefreshLinkNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_341 = " domainModelEditDomain = "; >- protected final String TEXT_342 = ".getEditingDomain("; >- protected final String TEXT_343 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new WrappingCommand(domainModelEditDomain, command));" + NL + "\t}" + NL; >- protected final String TEXT_344 = NL; >- protected final String TEXT_345 = NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private static class LinkDescriptor {" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate "; >- protected final String TEXT_346 = " mySource;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate "; >- protected final String TEXT_347 = " myDestination;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate "; >- protected final String TEXT_348 = " myLinkElement;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate int myVisualID;" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor("; >- protected final String TEXT_349 = " source, "; >- protected final String TEXT_350 = " destination, "; >- protected final String TEXT_351 = " linkElement, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = linkElement;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate LinkDescriptor("; >- protected final String TEXT_352 = " source, "; >- protected final String TEXT_353 = " destination, int linkVID) {" + NL + "\t\tmySource = source;" + NL + "\t\tmyDestination = destination;" + NL + "\t\tmyVisualID = linkVID;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected "; >- protected final String TEXT_354 = " getSource() {" + NL + "\t\treturn mySource;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected "; >- protected final String TEXT_355 = " getDestination() {" + NL + "\t\treturn myDestination;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected "; >- protected final String TEXT_356 = " getLinkElement() {" + NL + "\t\treturn myLinkElement;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected int getVisualID() {" + NL + "\t\treturn myVisualID;" + NL + "\t}" + NL + "}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_357 = " getRefreshLinkNotationModelCommand() {" + NL + "\t\t"; >- protected final String TEXT_358 = "/*<LinkDescriptor>*/ semanticChildLinks = getSemanticChildLinks();" + NL + "\t\t"; >- protected final String TEXT_359 = "/*<Edge>*/ notationalChildLinks = getNotationalChildLinks();" + NL + "\t\tfinal "; >- protected final String TEXT_360 = " semanticToNotationalTypeBasedLinks = new "; >- protected final String TEXT_361 = "();" + NL + "\t\tfinal "; >- protected final String TEXT_362 = "/*<EObject, List<Edge>>*/ semanticToNotationalFeatureBasedLinks = new "; >- protected final String TEXT_363 = "();" + NL + "\t\tfor("; >- protected final String TEXT_364 = " it = notationalChildLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_365 = " next = ("; >- protected final String TEXT_366 = ") it.next();" + NL + "\t\t\t"; >- protected final String TEXT_367 = " nextSemantic = next.getElement();" + NL + "\t\t\tif (nextSemantic != null) {" + NL + "\t\t\t\tsemanticToNotationalTypeBasedLinks.put(nextSemantic, next);" + NL + "\t\t\t} else {" + NL + "\t\t\t\t"; >- protected final String TEXT_368 = " featureBasedLinksForSource = ("; >- protected final String TEXT_369 = ") semanticToNotationalFeatureBasedLinks.get(next.getSource().getElement());" + NL + "\t\t\t\tif (featureBasedLinksForSource == null) {" + NL + "\t\t\t\t\tfeatureBasedLinksForSource = new "; >- protected final String TEXT_370 = "();" + NL + "\t\t\t\t\tsemanticToNotationalFeatureBasedLinks.put(next.getSource().getElement(), featureBasedLinksForSource);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tfeatureBasedLinksForSource.add(next);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_371 = " parentView = "; >- protected final String TEXT_372 = ";" + NL + "\t\t"; >- protected final String TEXT_373 = " command = new "; >- protected final String TEXT_374 = "();" + NL + "\t\tfor("; >- protected final String TEXT_375 = " it = semanticChildLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\tLinkDescriptor next = (LinkDescriptor) it.next();" + NL + "\t\t\t"; >- protected final String TEXT_376 = " nextLinkElement = next.getLinkElement();" + NL + "\t\t\t"; >- protected final String TEXT_377 = " currentEdge;" + NL + "\t\t\tif (nextLinkElement != null) {" + NL + "\t\t\t\tcurrentEdge = ("; >- protected final String TEXT_378 = ") semanticToNotationalTypeBasedLinks.remove(nextLinkElement);" + NL + "\t\t\t} else {" + NL + "\t\t\t\t"; >- protected final String TEXT_379 = " featureBasedLinksForSource = ("; >- protected final String TEXT_380 = ") semanticToNotationalFeatureBasedLinks.get(next.getSource());" + NL + "\t\t\t\tif (featureBasedLinksForSource == null || featureBasedLinksForSource.isEmpty()) {" + NL + "\t\t\t\t\tcurrentEdge = null;" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\tcurrentEdge = ("; >- protected final String TEXT_381 = ") featureBasedLinksForSource.remove(0);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tint linkVisualID = next.getVisualID();" + NL + "\t\t\tif (currentEdge == null) {" + NL + "\t\t\t\tif (nextLinkElement == null || shouldCreateEdge(nextLinkElement)) {" + NL + "\t\t\t\t\tcommand.appendIfCanExecute(getCreateNotationalEdgeCommand(parentView, next));" + NL + "\t\t\t\t}" + NL + "\t\t\t} else {" + NL + "\t\t\t\tboolean changedSource = currentEdge.getSource().getElement() != next.getSource();" + NL + "\t\t\t\tboolean changedTarget = currentEdge.getTarget().getElement() != next.getDestination();" + NL + "\t\t\t\tboolean changedVID = linkVisualID != "; >- protected final String TEXT_382 = ".getVisualID(currentEdge);" + NL + "\t\t\t\tif (!changedSource && !changedTarget) {" + NL + "\t\t\t\t\tif (changedVID) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_383 = " notationalCommand = getCreateNotationalEdgeCommand(parentView, next);" + NL + "\t\t\t\t\t\tif (notationalCommand != null) {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_384 = "(parentView, notationalCommand, currentEdge));" + NL + "\t\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_385 = "(parentView, currentEdge));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t} else {" + NL + "\t\t\t\t\tif (changedVID) {" + NL + "\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_386 = "(parentView, currentEdge));" + NL + "\t\t\t\t\t\tcommand.appendIfCanExecute(getCreateNotationalEdgeCommand(parentView, next));" + NL + "\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_387 = " newSourceView = findView(next.getSource());" + NL + "\t\t\t\t\t\tif (changedSource && newSourceView != null) {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_388 = "(currentEdge, newSourceView));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_389 = " newTargetView = findView(next.getDestination());" + NL + "\t\t\t\t\t\tif (changedTarget && newTargetView != null) {" + NL + "\t\t\t\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_390 = "(currentEdge, newTargetView));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tfor("; >- protected final String TEXT_391 = " it = semanticToNotationalTypeBasedLinks.values().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_392 = " obsoleteView = ("; >- protected final String TEXT_393 = ") it.next();" + NL + "\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_394 = "(parentView, obsoleteView));" + NL + "\t\t}" + NL + "\t\tfor("; >- protected final String TEXT_395 = " it = semanticToNotationalFeatureBasedLinks.values().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_396 = " obsoleteViews = ("; >- protected final String TEXT_397 = ") it.next();" + NL + "\t\t\tfor("; >- protected final String TEXT_398 = " obsoleteViewsIt = obsoleteViews.iterator(); obsoleteViewsIt.hasNext(); ) {" + NL + "\t\t\t\t"; >- protected final String TEXT_399 = " obsoleteView = ("; >- protected final String TEXT_400 = ") obsoleteViewsIt.next();" + NL + "\t\t\t\tcommand.appendIfCanExecute(new "; >- protected final String TEXT_401 = "(parentView, obsoleteView));" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn command.getCommandList().isEmpty() ? null : command;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Finds a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_402 = " findView("; >- protected final String TEXT_403 = " modelElement) {" + NL + "\t\tif (modelElement == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_404 = " editPart = ("; >- protected final String TEXT_405 = ") getViewer().getEditPartRegistry().get(modelElement);" + NL + "\t\tif (editPart != null && editPart.getModel() instanceof "; >- protected final String TEXT_406 = ") {" + NL + "\t\t\treturn ("; >- protected final String TEXT_407 = ") editPart.getModel();" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_408 = " parentView = findView(modelElement.eContainer());" + NL + "\t\tif (parentView != null) {" + NL + "\t\t\t"; >- protected final String TEXT_409 = " result = findNode(parentView, modelElement);" + NL + "\t\t\tif (result != null) {" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn findEdge(modelElement);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * Finds a notational node that corresponds to the given underlying domain element in a subtree starting from the given parent element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_410 = " findNode("; >- protected final String TEXT_411 = " parentView, "; >- protected final String TEXT_412 = " modelElement) {" + NL + "\t\tfor("; >- protected final String TEXT_413 = " it = parentView.getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_414 = " next = ("; >- protected final String TEXT_415 = ") it.next();" + NL + "\t\t\tif (!next.isSetElement() || next.getElement() == parentView) {" + NL + "\t\t\t\t"; >- protected final String TEXT_416 = " result = findNode(next, modelElement);" + NL + "\t\t\t\tif (result != null) {" + NL + "\t\t\t\t\treturn result;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tif (next.isSetElement() && next.getElement() == modelElement) {" + NL + "\t\t\t\treturn next;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Finds a notational edge that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_417 = " findEdge("; >- protected final String TEXT_418 = " modelElement) {" + NL + "\t\tfor("; >- protected final String TEXT_419 = " it = "; >- protected final String TEXT_420 = ".getEdges().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_421 = " next = ("; >- protected final String TEXT_422 = ") it.next();" + NL + "\t\t\tif (next.isSetElement() && next.getElement() == modelElement) {" + NL + "\t\t\t\treturn next;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_423 = " getCreateNotationalEdgeCommand("; >- protected final String TEXT_424 = " parentView, LinkDescriptor linkDescriptor) {" + NL + "\t\t"; >- protected final String TEXT_425 = " sourceView = findView(linkDescriptor.getSource());" + NL + "\t\t"; >- protected final String TEXT_426 = " targetView = findView(linkDescriptor.getDestination());" + NL + "\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t"; >- protected final String TEXT_427 = " createdEdge = "; >- protected final String TEXT_428 = ".eINSTANCE.createEdge();" + NL + "\t\tswitch (linkDescriptor.getVisualID()) {"; >- protected final String TEXT_429 = NL + "\t\tcase "; >- protected final String TEXT_430 = ".VISUAL_ID:" + NL + "\t\t\tif (linkDescriptor.getLinkElement() instanceof "; >- protected final String TEXT_431 = ") {" + NL + "\t\t\t\tcreatedEdge.setElement(linkDescriptor.getLinkElement());" + NL + "\t\t\t\t"; >- protected final String TEXT_432 = ".decorateView(createdEdge);" + NL + "\t\t\t}" + NL + "\t\t\tbreak;"; >- protected final String TEXT_433 = NL + "\t\tcase "; >- protected final String TEXT_434 = ".VISUAL_ID:" + NL + "\t\t\tif (linkDescriptor.getLinkElement() == null) {" + NL + "\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t"; >- protected final String TEXT_435 = ".decorateView(createdEdge);" + NL + "\t\t\t}" + NL + "\t\t\tbreak;"; >- protected final String TEXT_436 = NL + "\t\t}" + NL + "\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn new "; >- protected final String TEXT_437 = "(parentView, createdEdge, sourceView, targetView);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_438 = " getSemanticChildLinks() {"; >- protected final String TEXT_439 = NL; >- protected final String TEXT_440 = "\t"; >- protected final String TEXT_441 = " result = new "; >- protected final String TEXT_442 = "();"; >- protected final String TEXT_443 = NL + "\t"; >- protected final String TEXT_444 = " modelObject = "; >- protected final String TEXT_445 = ".getElement();" + NL + "\t"; >- protected final String TEXT_446 = " nextValue;"; >- protected final String TEXT_447 = NL + "\tint linkVID;"; >- protected final String TEXT_448 = NL + "\tfor("; >- protected final String TEXT_449 = " it = "; >- protected final String TEXT_450 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >- protected final String TEXT_451 = ") it.next();"; >- protected final String TEXT_452 = NL + "\tnextValue = ("; >- protected final String TEXT_453 = ")"; >- protected final String TEXT_454 = ";"; >- protected final String TEXT_455 = NL + "\tlinkVID = "; >- protected final String TEXT_456 = ".INSTANCE.getLinkWithClassVisualID(nextValue);"; >- protected final String TEXT_457 = NL + "\tswitch (linkVID) {"; >- protected final String TEXT_458 = NL + "\tcase "; >- protected final String TEXT_459 = ".VISUAL_ID: {"; >- protected final String TEXT_460 = NL + "\tif ("; >- protected final String TEXT_461 = ".VISUAL_ID == linkVID) {"; >- protected final String TEXT_462 = NL + "\t\t"; >- protected final String TEXT_463 = " source = ("; >- protected final String TEXT_464 = ")"; >- protected final String TEXT_465 = ";"; >- protected final String TEXT_466 = NL + "\t\t"; >- protected final String TEXT_467 = " source = "; >- protected final String TEXT_468 = ".getElement();"; >- protected final String TEXT_469 = NL + "\t\t"; >- protected final String TEXT_470 = " target = ("; >- protected final String TEXT_471 = ")"; >- protected final String TEXT_472 = ";"; >- protected final String TEXT_473 = NL + "\t\t"; >- protected final String TEXT_474 = " target = "; >- protected final String TEXT_475 = ".getElement();"; >- protected final String TEXT_476 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new LinkDescriptor(source, target, nextValue, linkVID));" + NL + "\t\t}"; >- protected final String TEXT_477 = NL + "\t\tbreak;" + NL + "\t}"; >- protected final String TEXT_478 = NL + "\t}"; >- protected final String TEXT_479 = NL + "\t}"; >- protected final String TEXT_480 = NL + "\t}"; >- protected final String TEXT_481 = NL + "\tfor("; >- protected final String TEXT_482 = " it = "; >- protected final String TEXT_483 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >- protected final String TEXT_484 = ") it.next();"; >- protected final String TEXT_485 = NL + "\tnextValue = ("; >- protected final String TEXT_486 = ")"; >- protected final String TEXT_487 = ";"; >- protected final String TEXT_488 = NL + "\tif (nextValue != null) {"; >- protected final String TEXT_489 = NL + "\t\tresult.add(new LinkDescriptor(modelObject, nextValue, null, "; >- protected final String TEXT_490 = ".VISUAL_ID));"; >- protected final String TEXT_491 = NL + "\t}"; >- protected final String TEXT_492 = NL + "\t}"; >- protected final String TEXT_493 = NL + "\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_494 = " getNotationalChildLinks() {" + NL + "\t\t"; >- protected final String TEXT_495 = " result = new "; >- protected final String TEXT_496 = "();" + NL + "\t\t"; >- protected final String TEXT_497 = " allLinks = "; >- protected final String TEXT_498 = ".getEdges();" + NL + "\t\tfor("; >- protected final String TEXT_499 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; >- protected final String TEXT_500 = " next = ("; >- protected final String TEXT_501 = ") it.next();"; >- protected final String TEXT_502 = NL + "\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\tresult.add(next);" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_503 = " source = next.getSource();" + NL + "\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\tresult.add(next);" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_504 = " target = next.getTarget();" + NL + "\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\tresult.add(next);" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}"; >- protected final String TEXT_505 = NL + "\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\tif (next.getSource() == "; >- protected final String TEXT_506 = ") {" + NL + "\t\t\t\t\tint linkVID = "; >- protected final String TEXT_507 = ".getVisualID(next);" + NL + "\t\t\t\t\tswitch (linkVID) {"; >- protected final String TEXT_508 = NL + "\t\t\t\t\tcase "; >- protected final String TEXT_509 = ".VISUAL_ID:"; >- protected final String TEXT_510 = NL + "\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}"; >- protected final String TEXT_511 = NL + "\t\t\t} else {"; >- protected final String TEXT_512 = NL + "\t\t\t}"; >- protected final String TEXT_513 = NL + "\t\t\tif (next.isSetElement() && next.getElement() != null) {"; >- protected final String TEXT_514 = NL + "\t\t\t\tif (next.getElement().eContainer() == "; >- protected final String TEXT_515 = ".getElement()) {" + NL + "\t\t\t\t\tint linkVID = "; >- protected final String TEXT_516 = ".getVisualID(next);" + NL + "\t\t\t\t\tswitch (linkVID) {"; >- protected final String TEXT_517 = NL + "\t\t\t\t\tcase "; >- protected final String TEXT_518 = ".VISUAL_ID:"; >- protected final String TEXT_519 = NL + "\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}"; >- protected final String TEXT_520 = NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t * The generated code always returns "; >- protected final String TEXT_521 = ". " + NL + "\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean shouldCreateEdge(EObject domainElement) {" + NL + "\t\treturn "; >- protected final String TEXT_522 = ";" + NL + "\t}"; >- protected final String TEXT_523 = NL; >- protected final String TEXT_524 = NL; >- protected final String TEXT_525 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >- protected final String TEXT_526 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_527 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >- protected final String TEXT_528 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate UpdateManager updateManager = new UpdateManager();" + NL + "}"; >- protected final String TEXT_529 = NL; >+ protected final String TEXT_311 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);"; >+ protected final String TEXT_312 = NL + "\t\t\t"; >+ protected final String TEXT_313 = " filter = getConstrainedChildLinksFilter();"; >+ protected final String TEXT_314 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());"; >+ protected final String TEXT_315 = NL + "\t\t\t"; >+ protected final String TEXT_316 = " filter = createUncontainedLinksFilter();"; >+ protected final String TEXT_317 = NL + "\t\t\t"; >+ protected final String TEXT_318 = " filter = "; >+ protected final String TEXT_319 = ".NOT_TOUCH;"; >+ protected final String TEXT_320 = NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t \t * @generated" + NL + "\t \t */" + NL + "\t\tprotected "; >+ protected final String TEXT_321 = " getCreateNotationalElementCommand("; >+ protected final String TEXT_322 = " descriptor) {" + NL + "\t\t\t"; >+ protected final String TEXT_323 = " linkDescriptor = ("; >+ protected final String TEXT_324 = ") descriptor;" + NL + "\t\t\t"; >+ protected final String TEXT_325 = " sourceView = getViewService().findView(linkDescriptor.getSource());" + NL + "\t\t\t"; >+ protected final String TEXT_326 = " targetView = getViewService().findView(linkDescriptor.getDestination());" + NL + "\t\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_327 = " createdEdge = "; >+ protected final String TEXT_328 = ".eINSTANCE.createEdge();" + NL + "\t\t\tswitch (linkDescriptor.getVisualID()) {"; >+ protected final String TEXT_329 = NL + "\t\t\tcase "; >+ protected final String TEXT_330 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() instanceof "; >+ protected final String TEXT_331 = ") {" + NL + "\t\t\t\t\tcreatedEdge.setElement(linkDescriptor.getElement());" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_332 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;"; >+ protected final String TEXT_333 = NL + "\t\t\tcase "; >+ protected final String TEXT_334 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() == null) {" + NL + "\t\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_335 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;"; >+ protected final String TEXT_336 = NL + "\t\t\t}" + NL + "\t\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn new "; >+ protected final String TEXT_337 = "(getHost().getDiagram(), createdEdge, sourceView, targetView);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_338 = " getSemanticChildLinks() {"; >+ protected final String TEXT_339 = NL; >+ protected final String TEXT_340 = "\t"; >+ protected final String TEXT_341 = " result = new "; >+ protected final String TEXT_342 = "();"; >+ protected final String TEXT_343 = NL + "\t"; >+ protected final String TEXT_344 = " modelObject = "; >+ protected final String TEXT_345 = ".getElement();" + NL + "\t"; >+ protected final String TEXT_346 = " nextValue;"; >+ protected final String TEXT_347 = NL + "\tint linkVID;"; >+ protected final String TEXT_348 = NL + "\tfor("; >+ protected final String TEXT_349 = " it = "; >+ protected final String TEXT_350 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >+ protected final String TEXT_351 = ") it.next();"; >+ protected final String TEXT_352 = NL + "\tnextValue = ("; >+ protected final String TEXT_353 = ")"; >+ protected final String TEXT_354 = ";"; >+ protected final String TEXT_355 = NL + "\tlinkVID = "; >+ protected final String TEXT_356 = ".INSTANCE.getLinkWithClassVisualID(nextValue);"; >+ protected final String TEXT_357 = NL + "\tswitch (linkVID) {"; >+ protected final String TEXT_358 = NL + "\tcase "; >+ protected final String TEXT_359 = ".VISUAL_ID: {"; >+ protected final String TEXT_360 = NL + "\tif ("; >+ protected final String TEXT_361 = ".VISUAL_ID == linkVID) {"; >+ protected final String TEXT_362 = NL + "\t\t"; >+ protected final String TEXT_363 = " source = ("; >+ protected final String TEXT_364 = ")"; >+ protected final String TEXT_365 = ";"; >+ protected final String TEXT_366 = NL + "\t\t"; >+ protected final String TEXT_367 = " source = "; >+ protected final String TEXT_368 = ".getElement();"; >+ protected final String TEXT_369 = NL + "\t\t"; >+ protected final String TEXT_370 = " target = ("; >+ protected final String TEXT_371 = ")"; >+ protected final String TEXT_372 = ";"; >+ protected final String TEXT_373 = NL + "\t\t"; >+ protected final String TEXT_374 = " target = "; >+ protected final String TEXT_375 = ".getElement();"; >+ protected final String TEXT_376 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new "; >+ protected final String TEXT_377 = "(source, target, nextValue, linkVID));" + NL + "\t\t}"; >+ protected final String TEXT_378 = NL + "\t\tbreak;" + NL + "\t}"; >+ protected final String TEXT_379 = NL + "\t}"; >+ protected final String TEXT_380 = NL + "\t}"; >+ protected final String TEXT_381 = NL + "\t}"; >+ protected final String TEXT_382 = NL + "\tfor("; >+ protected final String TEXT_383 = " it = "; >+ protected final String TEXT_384 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = ("; >+ protected final String TEXT_385 = ") it.next();"; >+ protected final String TEXT_386 = NL + "\tnextValue = ("; >+ protected final String TEXT_387 = ")"; >+ protected final String TEXT_388 = ";"; >+ protected final String TEXT_389 = NL + "\tif (nextValue != null) {"; >+ protected final String TEXT_390 = NL + "\t\tresult.add(new "; >+ protected final String TEXT_391 = "(modelObject, nextValue, null, "; >+ protected final String TEXT_392 = ".VISUAL_ID));"; >+ protected final String TEXT_393 = NL + "\t}"; >+ protected final String TEXT_394 = NL + "\t}"; >+ protected final String TEXT_395 = NL + "\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_396 = " getNotationalChildLinks() {" + NL + "\t\t\t"; >+ protected final String TEXT_397 = " result = new "; >+ protected final String TEXT_398 = "();" + NL + "\t\t\t"; >+ protected final String TEXT_399 = " allLinks = "; >+ protected final String TEXT_400 = ".getEdges();" + NL + "\t\t\tfor("; >+ protected final String TEXT_401 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_402 = " next = ("; >+ protected final String TEXT_403 = ") it.next();"; >+ protected final String TEXT_404 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_405 = " source = next.getSource();" + NL + "\t\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t"; >+ protected final String TEXT_406 = " target = next.getTarget();" + NL + "\t\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}"; >+ protected final String TEXT_407 = NL + "\t\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\t\tif (next.getSource() == "; >+ protected final String TEXT_408 = ") {" + NL + "\t\t\t\t\t\tint linkVID = "; >+ protected final String TEXT_409 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {"; >+ protected final String TEXT_410 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_411 = ".VISUAL_ID:"; >+ protected final String TEXT_412 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}"; >+ protected final String TEXT_413 = NL + "\t\t\t\t} else {"; >+ protected final String TEXT_414 = NL + "\t\t\t\t}"; >+ protected final String TEXT_415 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null) {"; >+ protected final String TEXT_416 = NL + "\t\t\t\t\tif (next.getElement().eContainer() == "; >+ protected final String TEXT_417 = ".getElement()) {" + NL + "\t\t\t\t\t\tint linkVID = "; >+ protected final String TEXT_418 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {"; >+ protected final String TEXT_419 = NL + "\t\t\t\t\t\tcase "; >+ protected final String TEXT_420 = ".VISUAL_ID:"; >+ protected final String TEXT_421 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}"; >+ protected final String TEXT_422 = NL + "\t\t\t}" + NL + "\t\t\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t\t * The generated code always returns "; >+ protected final String TEXT_423 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView("; >+ protected final String TEXT_424 = " descriptor) {" + NL + "\t\t\treturn "; >+ protected final String TEXT_425 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_426 = " getHost() {" + NL + "\t\t\treturn "; >+ protected final String TEXT_427 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t"; >+ protected final String TEXT_428 = " linkRefresher = getLinkNotationModelRefresher();" + NL + "\t\tif (!linkRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_429 = " command = linkRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t"; >+ protected final String TEXT_430 = " domainModelEditDomain = "; >+ protected final String TEXT_431 = ".getEditingDomain("; >+ protected final String TEXT_432 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new "; >+ protected final String TEXT_433 = "(domainModelEditDomain, command));" + NL + "\t}"; >+ protected final String TEXT_434 = NL; >+ protected final String TEXT_435 = NL; >+ protected final String TEXT_436 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_437 = " domainModelRefresher = new "; >+ protected final String TEXT_438 = "(this);" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_439 = " updateManager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_440 = " getUpdateManager() {" + NL + "\t\tif (updateManager == null) {" + NL + "\t\t\tupdateManager = new "; >+ protected final String TEXT_441 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn updateManager;" + NL + "\t}" + NL + "}"; >+ protected final String TEXT_442 = NL; > > public String generate(Object argument) > { >@@ -555,7 +468,6 @@ > final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; > importManager.registerInnerClass("NotationModelRefresher"); //from notationModelRefresher.jetinc > importManager.registerInnerClass("LinkNotationModelRefresher"); //from linkNotationModelRefresher.jetinc >-importManager.registerInnerClass("LinkDescriptor"); //from linkNotationModelRefresher.jetinc > List childNodes = genDiagram.getTopLevelNodes(); > > stringBuffer.append(TEXT_1); >@@ -723,27 +635,27 @@ > stringBuffer.append(TEXT_19); > stringBuffer.append(genDiagram.getEditPartClassName()); > stringBuffer.append(TEXT_20); >- stringBuffer.append(genDiagram.getEditorGen().getModelID()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); > stringBuffer.append(TEXT_21); >+ stringBuffer.append(genDiagram.getEditorGen().getModelID()); >+ stringBuffer.append(TEXT_22); > { > GenCommonBase genCommonBase = genDiagram; >- stringBuffer.append(TEXT_22); > stringBuffer.append(TEXT_23); >- stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_24); >- } >+ stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_25); >- stringBuffer.append(genDiagram.getEditPartClassName()); >+ } > stringBuffer.append(TEXT_26); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); >+ stringBuffer.append(genDiagram.getEditPartClassName()); > stringBuffer.append(TEXT_27); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); > stringBuffer.append(TEXT_28); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); > stringBuffer.append(TEXT_29); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); > stringBuffer.append(TEXT_30); > stringBuffer.append(TEXT_31); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_32); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_33); >@@ -751,66 +663,72 @@ > stringBuffer.append(TEXT_34); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_35); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_36); > if (null != genDiagram.getPalette()) { > final Palette palette = genDiagram.getPalette(); >- stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); > stringBuffer.append(TEXT_37); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_38); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_39); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); > stringBuffer.append(TEXT_40); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_41); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_42); > > for(Iterator it = childNodes.iterator(); it.hasNext(); ) { > GenTopLevelNode next = (GenTopLevelNode)it.next(); > >- stringBuffer.append(TEXT_42); >- stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_43); >+ stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName())); >+ stringBuffer.append(TEXT_44); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_44); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_45); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(TEXT_46); > > } > >- stringBuffer.append(TEXT_46); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_47); >- }/*when there's palette*/ >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_48); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_49); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >+ }/*when there's palette*/ > stringBuffer.append(TEXT_50); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_51); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); > stringBuffer.append(TEXT_52); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_53); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_54); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(TEXT_55); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_56); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(TEXT_57); > > //link notation model refresher should always be installed for the diagram edit part, because it tracks the uncontained links > //if (myHelper.containsLinks()) { > >- stringBuffer.append(TEXT_55); >+ stringBuffer.append(TEXT_58); > > //} > >- stringBuffer.append(TEXT_56); >+ stringBuffer.append(TEXT_59); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.SnapToHelper")); >- stringBuffer.append(TEXT_57); >+ stringBuffer.append(TEXT_60); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.SnapToGrid")); >- stringBuffer.append(TEXT_58); >+ stringBuffer.append(TEXT_61); > /*@ include file="adapters/propertySource.javajetinc"*/ >- stringBuffer.append(TEXT_59); >+ stringBuffer.append(TEXT_62); > > for(Iterator it = childNodes.iterator(); it.hasNext(); ) { > GenTopLevelNode next = (GenTopLevelNode)it.next(); >@@ -818,42 +736,42 @@ > boolean isListLayout = false; > String resolvedSemanticElement = "parent.getElement()"; > >- stringBuffer.append(TEXT_60); >- stringBuffer.append(TEXT_61); >+ stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_64); > if (isStatic) { >- stringBuffer.append(TEXT_62); >+ stringBuffer.append(TEXT_65); > } >- stringBuffer.append(TEXT_63); >+ stringBuffer.append(TEXT_66); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_64); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")); >- stringBuffer.append(TEXT_65); >+ stringBuffer.append(TEXT_67); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand")); >+ stringBuffer.append(TEXT_68); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_66); >+ stringBuffer.append(TEXT_69); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_67); >+ stringBuffer.append(TEXT_70); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_68); >+ stringBuffer.append(TEXT_71); > if (!isListLayout) { >- stringBuffer.append(TEXT_69); >+ stringBuffer.append(TEXT_72); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_70); >+ stringBuffer.append(TEXT_73); > } >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_74); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_72); >+ stringBuffer.append(TEXT_75); > stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_76); > > if (!isListLayout) { > >- stringBuffer.append(TEXT_74); >+ stringBuffer.append(TEXT_77); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); >- stringBuffer.append(TEXT_75); >+ stringBuffer.append(TEXT_78); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_76); >+ stringBuffer.append(TEXT_79); > > int defaultWidth = 40; > int defaultHeight = 40; >@@ -863,208 +781,182 @@ > defaultHeight = defSizeAttrs.getHeight(); > } > >- stringBuffer.append(TEXT_77); >+ stringBuffer.append(TEXT_80); > stringBuffer.append(defaultWidth); >- stringBuffer.append(TEXT_78); >+ stringBuffer.append(TEXT_81); > stringBuffer.append(defaultHeight); >- stringBuffer.append(TEXT_79); >+ stringBuffer.append(TEXT_82); > > } > >- stringBuffer.append(TEXT_80); >+ stringBuffer.append(TEXT_83); > > if (genDiagram.getPalette() != null) { > >- stringBuffer.append(TEXT_81); >+ stringBuffer.append(TEXT_84); > if (isStatic) { >- stringBuffer.append(TEXT_82); >+ stringBuffer.append(TEXT_85); > } >- stringBuffer.append(TEXT_83); >+ stringBuffer.append(TEXT_86); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_84); >+ stringBuffer.append(TEXT_87); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_85); >+ stringBuffer.append(TEXT_88); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_86); >+ stringBuffer.append(TEXT_89); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_87); >+ stringBuffer.append(TEXT_90); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_88); >- stringBuffer.append(importManager.getImportedName(genDiagram.getPalette().getFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_89); >+ stringBuffer.append(TEXT_91); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")); >+ stringBuffer.append(TEXT_92); > if (!isListLayout) { >- stringBuffer.append(TEXT_90); >+ stringBuffer.append(TEXT_93); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_91); >+ stringBuffer.append(TEXT_94); > } >- stringBuffer.append(TEXT_92); >+ stringBuffer.append(TEXT_95); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_93); >+ stringBuffer.append(TEXT_96); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_94); >+ stringBuffer.append(TEXT_97); > > if (next.getDomainMetaClass().isMapEntry()) { > /*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/ > >- stringBuffer.append(TEXT_95); >+ stringBuffer.append(TEXT_98); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_96); >+ stringBuffer.append(TEXT_99); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName())); >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_100); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_98); >+ stringBuffer.append(TEXT_101); > stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_99); >+ stringBuffer.append(TEXT_102); > > } else { > >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_103); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_104); > stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName())); >- stringBuffer.append(TEXT_102); >+ stringBuffer.append(TEXT_105); > stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName()); >- stringBuffer.append(TEXT_103); >+ stringBuffer.append(TEXT_106); > > } > >- stringBuffer.append(TEXT_104); >+ stringBuffer.append(TEXT_107); > /*XXX: Class name DomainElementInitializer should be user-customizable*/ >- stringBuffer.append(TEXT_105); >+ stringBuffer.append(TEXT_108); > stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); >- stringBuffer.append(TEXT_106); >+ stringBuffer.append(TEXT_109); > stringBuffer.append(next.getUniqueIdentifier()); >- stringBuffer.append(TEXT_107); >+ stringBuffer.append(TEXT_110); > if (next.getDomainMetaClass().isExternalInterface()) { >- stringBuffer.append(TEXT_108); >+ stringBuffer.append(TEXT_111); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_109); >+ stringBuffer.append(TEXT_112); > } >- stringBuffer.append(TEXT_110); >+ stringBuffer.append(TEXT_113); > > TypeModelFacet facet = next.getModelFacet(); > GenFeature childFeature = facet.getChildMetaFeature(); > GenFeature containmentFeature = facet.getContainmentMetaFeature(); > if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { > >- stringBuffer.append(TEXT_111); >+ stringBuffer.append(TEXT_114); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_112); >+ stringBuffer.append(TEXT_115); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_113); >+ stringBuffer.append(TEXT_116); > stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_114); >+ stringBuffer.append(TEXT_117); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_115); >+ stringBuffer.append(TEXT_118); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_116); >+ stringBuffer.append(TEXT_119); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_117); >+ stringBuffer.append(TEXT_120); > stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_118); >+ stringBuffer.append(TEXT_121); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_119); >+ stringBuffer.append(TEXT_122); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_120); >+ stringBuffer.append(TEXT_123); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_121); >+ stringBuffer.append(TEXT_124); > > } else { > >- stringBuffer.append(TEXT_122); >+ stringBuffer.append(TEXT_125); > stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_123); >+ stringBuffer.append(TEXT_126); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_124); >+ stringBuffer.append(TEXT_127); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_125); >+ stringBuffer.append(TEXT_128); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_126); >+ stringBuffer.append(TEXT_129); > > } > >- stringBuffer.append(TEXT_127); >+ stringBuffer.append(TEXT_130); > stringBuffer.append(next.getDomainMetaClass().getName()); > stringBuffer.append(next.getVisualID()); >- stringBuffer.append(TEXT_128); >+ stringBuffer.append(TEXT_131); > if (next.getDomainMetaClass().isExternalInterface()) { >- stringBuffer.append(TEXT_129); >+ stringBuffer.append(TEXT_132); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_130); >+ stringBuffer.append(TEXT_133); > } >- stringBuffer.append(TEXT_131); >+ stringBuffer.append(TEXT_134); > if(!isListLayout) { >- stringBuffer.append(TEXT_132); >+ stringBuffer.append(TEXT_135); > } >- stringBuffer.append(TEXT_133); >+ stringBuffer.append(TEXT_136); > > } > > > } > >- stringBuffer.append(TEXT_134); >- stringBuffer.append(TEXT_135); >- stringBuffer.append(TEXT_136); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_137); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_138); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_139); >+ stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_140); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_141); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_142); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_143); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.util.EContentAdapter")); > stringBuffer.append(TEXT_144); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_145); >- stringBuffer.append(importManager.getImportedName("java.util.Collection")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_146); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_147); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_148); >- stringBuffer.append(importManager.getImportedName("java.util.Collection")); >- stringBuffer.append(TEXT_149); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_150); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_151); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_152); >- stringBuffer.append(importManager.getImportedName("java.util.Collections")); >- stringBuffer.append(TEXT_153); >- stringBuffer.append(importManager.getImportedName("java.util.Collections")); >- stringBuffer.append(TEXT_154); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_155); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_156); > > //link notation model refresher should always be installed for the diagram edit part, because it tracks the uncontained links > //if (myHelper.containsLinks()) { > >- stringBuffer.append(TEXT_157); >+ stringBuffer.append(TEXT_147); > > //} > >- stringBuffer.append(TEXT_158); >+ stringBuffer.append(TEXT_148); > > //link notation model refresher should always be installed/uninstalled for the diagram edit part, because it tracks the uncontained links > //if (myHelper.containsLinks()) { > >- stringBuffer.append(TEXT_159); >+ stringBuffer.append(TEXT_149); > > //} > >- stringBuffer.append(TEXT_160); >+ stringBuffer.append(TEXT_150); > > { > String _getDiagramCode = "getDiagram()"; >@@ -1072,20 +964,22 @@ > boolean isListLayout = false; > final boolean _includeUncontainedLinks = true; > >- stringBuffer.append(TEXT_161); >- stringBuffer.append(TEXT_162); >+ stringBuffer.append(TEXT_151); >+ stringBuffer.append(TEXT_152); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_153); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_163); >+ stringBuffer.append(TEXT_154); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_164); >+ stringBuffer.append(TEXT_155); > stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_165); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetListenerImpl")); >- stringBuffer.append(TEXT_166); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_167); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_168); >+ stringBuffer.append(TEXT_156); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_157); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_158); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher")); >+ stringBuffer.append(TEXT_159); > > boolean hasConstraintsInChildren = false; > for (Iterator it = childNodes.iterator(); it.hasNext(); ) { >@@ -1100,17 +994,19 @@ > > if (hasConstraintsInChildren) { > >- stringBuffer.append(TEXT_169); >+ stringBuffer.append(TEXT_160); > stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName()); >- stringBuffer.append(TEXT_170); >+ stringBuffer.append(TEXT_161); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_171); >+ stringBuffer.append(TEXT_162); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_172); >+ stringBuffer.append(TEXT_163); > > } > >- stringBuffer.append(TEXT_173); >+ stringBuffer.append(TEXT_164); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_165); > > { > boolean hasDeclaredFilter = false; >@@ -1129,23 +1025,25 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_174); >+ stringBuffer.append(TEXT_166); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_175); >+ stringBuffer.append(TEXT_167); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_168); > stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_176); >+ stringBuffer.append(TEXT_169); > stringBuffer.append(childMetaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_177); >+ stringBuffer.append(TEXT_170); > > } else { > >- stringBuffer.append(TEXT_178); >+ stringBuffer.append(TEXT_171); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_179); >+ stringBuffer.append(TEXT_172); > stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_180); >+ stringBuffer.append(TEXT_173); > stringBuffer.append(childMetaFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_181); >+ stringBuffer.append(TEXT_174); > > } > } //for >@@ -1153,107 +1051,61 @@ > > if (hasDeclaredFilter) { > >- stringBuffer.append(TEXT_182); >+ stringBuffer.append(TEXT_175); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_183); >+ stringBuffer.append(TEXT_176); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_184); >+ stringBuffer.append(TEXT_177); > > } else { >+ hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_185); >+ stringBuffer.append(TEXT_178); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_186); >+ stringBuffer.append(TEXT_179); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_180); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_187); >+ stringBuffer.append(TEXT_181); > > } >-} //local declaration of hasDeclaredFilter > > >-if (hasConstraintsInChildren) { >+ if (hasConstraintsInChildren) { >+ if (hasDeclaredFilter) { >+ hasDeclaredFilter = true; >+ >+ stringBuffer.append(TEXT_182); >+ >+ } else { >+ >+ stringBuffer.append(TEXT_183); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_184); >+ >+ } >+ } >+ if (!hasDeclaredFilter) { >+ >+ stringBuffer.append(TEXT_185); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_186); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_187); >+ >+ } > > stringBuffer.append(TEXT_188); > >-} >+} //local declaration of hasDeclaredFilter > > stringBuffer.append(TEXT_189); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); > stringBuffer.append(TEXT_190); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); > stringBuffer.append(TEXT_191); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetChangeEvent")); >- stringBuffer.append(TEXT_192); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_193); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_194); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_195); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_196); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_197); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_198); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_199); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_200); >- stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_201); >- stringBuffer.append(importManager.getImportedName("java.util.Map")); >- stringBuffer.append(TEXT_202); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_203); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_204); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_205); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_206); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_207); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_208); >- stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_209); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_210); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_211); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_212); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_213); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_214); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_215); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_216); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_217); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_218); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")); >- stringBuffer.append(TEXT_219); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReplaceNotationalElementCommand")); >- stringBuffer.append(TEXT_220); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_221); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_222); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_223); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalElementCommand")); >- stringBuffer.append(TEXT_224); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalElementCommand")); >- stringBuffer.append(TEXT_225); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_226); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_227); >+ stringBuffer.append(TEXT_192); > > for (Iterator it = childNodes.iterator(); it.hasNext(); ) { > GenNode nextNode = (GenNode) it.next(); >@@ -1263,39 +1115,39 @@ > } > String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName()); > >- stringBuffer.append(TEXT_228); >+ stringBuffer.append(TEXT_193); > stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_229); >+ stringBuffer.append(TEXT_194); > stringBuffer.append(childNodeInterfaceName); >- stringBuffer.append(TEXT_230); >+ stringBuffer.append(TEXT_195); > stringBuffer.append(nextNode.getDomainMetaClass().getName()); > stringBuffer.append(nextNode.getVisualID()); >- stringBuffer.append(TEXT_231); >+ stringBuffer.append(TEXT_196); > if (!isListLayout) { >- stringBuffer.append(TEXT_232); >+ stringBuffer.append(TEXT_197); > } >- stringBuffer.append(TEXT_233); >+ stringBuffer.append(TEXT_198); > > } > >- stringBuffer.append(TEXT_234); >+ stringBuffer.append(TEXT_199); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_235); >- stringBuffer.append(TEXT_236); >+ stringBuffer.append(TEXT_200); >+ stringBuffer.append(TEXT_201); > > if (childNodes.size() == 0) { > >- stringBuffer.append(TEXT_237); >+ stringBuffer.append(TEXT_202); > stringBuffer.append(importManager.getImportedName("java.util.Collections")); >- stringBuffer.append(TEXT_238); >+ stringBuffer.append(TEXT_203); > > } else { > >- stringBuffer.append(TEXT_239); >+ stringBuffer.append(TEXT_204); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_240); >+ stringBuffer.append(TEXT_205); > stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_241); >+ stringBuffer.append(TEXT_206); > > Map genFeature2genNodeMap = new LinkedHashMap(); > for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) { >@@ -1313,15 +1165,15 @@ > Set entrySet = genFeature2genNodeMap.entrySet(); > if (entrySet.size() > 0) { > >- stringBuffer.append(TEXT_242); >+ stringBuffer.append(TEXT_207); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_243); >+ stringBuffer.append(TEXT_208); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_244); >+ stringBuffer.append(TEXT_209); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_245); >+ stringBuffer.append(TEXT_210); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_246); >+ stringBuffer.append(TEXT_211); > > } > for (Iterator entries = entrySet.iterator(); entries.hasNext();) { >@@ -1330,100 +1182,124 @@ > Collection genNodesCollection = (Collection) nextEntry.getValue(); > if (childMetaFeature.isListType()) { > >- stringBuffer.append(TEXT_247); >+ stringBuffer.append(TEXT_212); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_248); >+ stringBuffer.append(TEXT_213); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true); >- stringBuffer.append(TEXT_249); >+ stringBuffer.append(TEXT_214); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_250); >+ stringBuffer.append(TEXT_215); > > } else { > >- stringBuffer.append(TEXT_251); >+ stringBuffer.append(TEXT_216); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_252); >+ stringBuffer.append(TEXT_217); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false); >- stringBuffer.append(TEXT_253); >+ stringBuffer.append(TEXT_218); > > } > >- stringBuffer.append(TEXT_254); >+ stringBuffer.append(TEXT_219); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_255); >+ stringBuffer.append(TEXT_220); > > boolean generateSwitch = genNodesCollection.size() != 1; > if (generateSwitch) { > >- stringBuffer.append(TEXT_256); >+ stringBuffer.append(TEXT_221); > > } > for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) { > GenNode nextNode = (GenNode) genNodesIterator.next(); > if (generateSwitch) { > >- stringBuffer.append(TEXT_257); >+ stringBuffer.append(TEXT_222); > stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_258); >+ stringBuffer.append(TEXT_223); > > } else { > >- stringBuffer.append(TEXT_259); >+ stringBuffer.append(TEXT_224); > stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_260); >+ stringBuffer.append(TEXT_225); > > } > >- stringBuffer.append(TEXT_261); >+ stringBuffer.append(TEXT_226); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_227); > > if (generateSwitch) { > >- stringBuffer.append(TEXT_262); >+ stringBuffer.append(TEXT_228); > > } else { > >- stringBuffer.append(TEXT_263); >+ stringBuffer.append(TEXT_229); > > } > } > if (generateSwitch) { > >- stringBuffer.append(TEXT_264); >+ stringBuffer.append(TEXT_230); > > } > if (childMetaFeature.isListType()) { > >- stringBuffer.append(TEXT_265); >+ stringBuffer.append(TEXT_231); > > } > } > >- stringBuffer.append(TEXT_266); >+ stringBuffer.append(TEXT_232); > > } > >- stringBuffer.append(TEXT_267); >+ stringBuffer.append(TEXT_233); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_268); >+ stringBuffer.append(TEXT_234); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_235); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_269); >- stringBuffer.append(TEXT_270); >+ stringBuffer.append(TEXT_236); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_237); >+ stringBuffer.append(_getViewCode); >+ stringBuffer.append(TEXT_238); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher")); >+ stringBuffer.append(TEXT_239); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(TEXT_240); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_241); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(TEXT_242); >+ stringBuffer.append(_getDiagramCode); >+ stringBuffer.append(TEXT_243); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_244); >+ stringBuffer.append(TEXT_245); > > if (myHelper.containsLinks() || _includeUncontainedLinks) { > >- stringBuffer.append(TEXT_271); >+ stringBuffer.append(TEXT_246); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_272); >+ stringBuffer.append(TEXT_247); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_273); >+ stringBuffer.append(TEXT_248); > stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_274); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetListenerImpl")); >- stringBuffer.append(TEXT_275); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_276); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_277); >+ stringBuffer.append(TEXT_249); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); >+ stringBuffer.append(TEXT_250); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); >+ stringBuffer.append(TEXT_251); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService")); >+ stringBuffer.append(TEXT_252); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher")); >+ stringBuffer.append(TEXT_253); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); >+ stringBuffer.append(TEXT_254); > > boolean hasConstraintsInContainedLinks = false; > for (Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { >@@ -1436,40 +1312,42 @@ > } > if (hasConstraintsInContainedLinks) { > >- stringBuffer.append(TEXT_278); >+ stringBuffer.append(TEXT_255); > stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName()); >- stringBuffer.append(TEXT_279); >+ stringBuffer.append(TEXT_256); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_280); >+ stringBuffer.append(TEXT_257); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_281); >+ stringBuffer.append(TEXT_258); > > } > if (_includeUncontainedLinks) { > >- stringBuffer.append(TEXT_282); >+ stringBuffer.append(TEXT_259); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_283); >+ stringBuffer.append(TEXT_260); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_284); >+ stringBuffer.append(TEXT_261); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_285); >+ stringBuffer.append(TEXT_262); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_286); >+ stringBuffer.append(TEXT_263); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_287); >+ stringBuffer.append(TEXT_264); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_288); >+ stringBuffer.append(TEXT_265); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_289); >+ stringBuffer.append(TEXT_266); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_290); >+ stringBuffer.append(TEXT_267); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_291); >+ stringBuffer.append(TEXT_268); > > } > >- stringBuffer.append(TEXT_292); >+ stringBuffer.append(TEXT_269); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_270); > > { > boolean hasDeclaredFilter = false; >@@ -1482,7 +1360,7 @@ > } > GenFeature _feature = modelFacet.getChildMetaFeature(); > >- stringBuffer.append(TEXT_293); >+ stringBuffer.append(TEXT_271); > > /* > * input: >@@ -1496,30 +1374,32 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_294); >+ stringBuffer.append(TEXT_272); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_295); >+ stringBuffer.append(TEXT_273); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_274); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_296); >+ stringBuffer.append(TEXT_275); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_297); >+ stringBuffer.append(TEXT_276); > > } else { > >- stringBuffer.append(TEXT_298); >+ stringBuffer.append(TEXT_277); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_299); >+ stringBuffer.append(TEXT_278); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_300); >+ stringBuffer.append(TEXT_279); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_301); >+ stringBuffer.append(TEXT_280); > > } > > > _feature = modelFacet.getSourceMetaFeature(); > >- stringBuffer.append(TEXT_302); >+ stringBuffer.append(TEXT_281); > > /* > * input: >@@ -1533,70 +1413,32 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_303); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_304); >- stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_305); >- stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_306); >- >- } else { >- >- stringBuffer.append(TEXT_307); >+ stringBuffer.append(TEXT_282); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_308); >- stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_309); >- stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_310); >- >- } >- >- >- _feature = modelFacet.getTargetMetaFeature(); >- >- stringBuffer.append(TEXT_311); >- >- /* >- * input: >- * _feature: GenFeature >- * genAffectingFeatures : Set >- */ >- if (_feature == null || genAffectingFeatures.contains(_feature)) { >- continue; >- } >- genAffectingFeatures.add(_feature); >- if (!hasDeclaredFilter) { >- hasDeclaredFilter = true; >- >- stringBuffer.append(TEXT_312); >+ stringBuffer.append(TEXT_283); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_313); >+ stringBuffer.append(TEXT_284); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_314); >+ stringBuffer.append(TEXT_285); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_315); >+ stringBuffer.append(TEXT_286); > > } else { > >- stringBuffer.append(TEXT_316); >+ stringBuffer.append(TEXT_287); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_317); >+ stringBuffer.append(TEXT_288); > stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_318); >+ stringBuffer.append(TEXT_289); > stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_319); >+ stringBuffer.append(TEXT_290); > > } > > >- } >- for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { >- GenLink nextLink = (GenLink) it.next(); >- GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature(); >+ _feature = modelFacet.getTargetMetaFeature(); > >- stringBuffer.append(TEXT_320); >+ stringBuffer.append(TEXT_291); > > /* > * input: >@@ -1610,247 +1452,128 @@ > if (!hasDeclaredFilter) { > hasDeclaredFilter = true; > >- stringBuffer.append(TEXT_321); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_322); >- stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_323); >- stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_324); >- >- } else { >- >- stringBuffer.append(TEXT_325); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_326); >- stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_327); >- stringBuffer.append(_feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_328); >- >- } >- >- >- } >- if (hasConstraintsInContainedLinks) { >- if (hasDeclaredFilter) { >- >- stringBuffer.append(TEXT_329); >- >- } else { >- hasDeclaredFilter = true; >- >- stringBuffer.append(TEXT_330); >- >- } >- } >- if (_includeUncontainedLinks) { >- if (hasDeclaredFilter) { >- >- stringBuffer.append(TEXT_331); >- >- } else { >- hasDeclaredFilter = true; >- >- stringBuffer.append(TEXT_332); >- >- } >- } >- if (!hasDeclaredFilter) { >- >- stringBuffer.append(TEXT_333); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_334); >- >- } >- } //local declaration of hasDeclaredFilter >- >- stringBuffer.append(TEXT_335); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_336); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_337); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.ResourceSetChangeEvent")); >- stringBuffer.append(TEXT_338); >+ stringBuffer.append(TEXT_292); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >- stringBuffer.append(TEXT_339); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_340); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_341); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_342); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_343); >- stringBuffer.append(TEXT_344); >- /*inner class*/ >- stringBuffer.append(TEXT_345); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_346); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_347); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_348); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_349); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_350); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_351); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_352); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_353); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_354); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_355); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_356); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_357); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_358); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_359); >- stringBuffer.append(importManager.getImportedName("java.util.Map")); >- stringBuffer.append(TEXT_360); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_361); >- stringBuffer.append(importManager.getImportedName("java.util.Map")); >- stringBuffer.append(TEXT_362); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >- stringBuffer.append(TEXT_363); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_364); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_365); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_366); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_367); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_368); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_369); >- stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_370); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_371); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_372); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_373); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_374); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_375); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_376); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_377); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_378); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_379); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_380); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_381); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_382); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")); >- stringBuffer.append(TEXT_383); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReplaceNotationalElementCommand")); >- stringBuffer.append(TEXT_384); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_385); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_386); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_387); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeSourceCommand")); >- stringBuffer.append(TEXT_388); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_389); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".ReconnectNotationalEdgeTargetCommand")); >- stringBuffer.append(TEXT_390); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_391); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_392); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_393); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_394); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_395); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_396); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_397); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_398); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_399); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_400); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".RemoveNotationalEdgeCommand")); >- stringBuffer.append(TEXT_401); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_402); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_403); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_404); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_405); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_406); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_407); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_408); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_409); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_410); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_411); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_412); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_413); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_414); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_415); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_416); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_417); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_418); >- stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_419); >- stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_420); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_421); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_422); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")); >- stringBuffer.append(TEXT_423); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_424); >+ stringBuffer.append(TEXT_293); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_294); >+ stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(TEXT_295); >+ stringBuffer.append(_feature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_296); >+ >+ } else { >+ >+ stringBuffer.append(TEXT_297); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_298); >+ stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(TEXT_299); >+ stringBuffer.append(_feature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_300); >+ >+ } >+ >+ >+ } >+ for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { >+ GenLink nextLink = (GenLink) it.next(); >+ GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature(); >+ >+ stringBuffer.append(TEXT_301); >+ >+ /* >+ * input: >+ * _feature: GenFeature >+ * genAffectingFeatures : Set >+ */ >+ if (_feature == null || genAffectingFeatures.contains(_feature)) { >+ continue; >+ } >+ genAffectingFeatures.add(_feature); >+ if (!hasDeclaredFilter) { >+ hasDeclaredFilter = true; >+ >+ stringBuffer.append(TEXT_302); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_303); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_304); >+ stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(TEXT_305); >+ stringBuffer.append(_feature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_306); >+ >+ } else { >+ >+ stringBuffer.append(TEXT_307); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_308); >+ stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(TEXT_309); >+ stringBuffer.append(_feature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_310); >+ >+ } >+ >+ >+ } >+ if (hasConstraintsInContainedLinks) { >+ if (hasDeclaredFilter) { >+ >+ stringBuffer.append(TEXT_311); >+ >+ } else { >+ hasDeclaredFilter = true; >+ >+ stringBuffer.append(TEXT_312); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_313); >+ >+ } >+ } >+ if (_includeUncontainedLinks) { >+ if (hasDeclaredFilter) { >+ >+ stringBuffer.append(TEXT_314); >+ >+ } else { >+ hasDeclaredFilter = true; >+ >+ stringBuffer.append(TEXT_315); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_316); >+ >+ } >+ } >+ if (!hasDeclaredFilter) { >+ >+ stringBuffer.append(TEXT_317); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_318); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter")); >+ stringBuffer.append(TEXT_319); >+ >+ } >+ } //local declaration of hasDeclaredFilter >+ >+ stringBuffer.append(TEXT_320); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); >+ stringBuffer.append(TEXT_321); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_322); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); >+ stringBuffer.append(TEXT_323); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); >+ stringBuffer.append(TEXT_324); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_425); >+ stringBuffer.append(TEXT_325); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_426); >+ stringBuffer.append(TEXT_326); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_427); >+ stringBuffer.append(TEXT_327); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_428); >+ stringBuffer.append(TEXT_328); > > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); >@@ -1859,37 +1582,37 @@ > continue; > } > >- stringBuffer.append(TEXT_429); >+ stringBuffer.append(TEXT_329); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_430); >+ stringBuffer.append(TEXT_330); > stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_431); >+ stringBuffer.append(TEXT_331); > stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_432); >+ stringBuffer.append(TEXT_332); > > } > for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > >- stringBuffer.append(TEXT_433); >+ stringBuffer.append(TEXT_333); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_434); >+ stringBuffer.append(TEXT_334); > stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())); >- stringBuffer.append(TEXT_435); >+ stringBuffer.append(TEXT_335); > > } > >- stringBuffer.append(TEXT_436); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditCommandsPackageName() + ".CreateNotationalEdgeCommand")); >- stringBuffer.append(TEXT_437); >+ stringBuffer.append(TEXT_336); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand")); >+ stringBuffer.append(TEXT_337); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_438); >- stringBuffer.append(TEXT_439); >- stringBuffer.append(TEXT_440); >+ stringBuffer.append(TEXT_338); >+ stringBuffer.append(TEXT_339); >+ stringBuffer.append(TEXT_340); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_441); >+ stringBuffer.append(TEXT_341); > stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_442); >+ stringBuffer.append(TEXT_342); > > Map genFeature2genLinkMap = new LinkedHashMap(); > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { >@@ -1912,18 +1635,18 @@ > } > if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) { > >- stringBuffer.append(TEXT_443); >+ stringBuffer.append(TEXT_343); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_444); >+ stringBuffer.append(TEXT_344); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_445); >+ stringBuffer.append(TEXT_345); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_446); >+ stringBuffer.append(TEXT_346); > > } > if (!genFeature2genLinkMap.isEmpty()) { > >- stringBuffer.append(TEXT_447); >+ stringBuffer.append(TEXT_347); > > } > for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) { >@@ -1932,32 +1655,32 @@ > Collection genLinksCollection = (Collection) nextEntry.getValue(); > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_448); >+ stringBuffer.append(TEXT_348); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_449); >+ stringBuffer.append(TEXT_349); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true); >- stringBuffer.append(TEXT_450); >+ stringBuffer.append(TEXT_350); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_451); >+ stringBuffer.append(TEXT_351); > > } else { > >- stringBuffer.append(TEXT_452); >+ stringBuffer.append(TEXT_352); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_453); >+ stringBuffer.append(TEXT_353); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false); >- stringBuffer.append(TEXT_454); >+ stringBuffer.append(TEXT_354); > > } > >- stringBuffer.append(TEXT_455); >+ stringBuffer.append(TEXT_355); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_456); >+ stringBuffer.append(TEXT_356); > > boolean generateSwitch = genLinksCollection.size() != 1; > if (generateSwitch) { > >- stringBuffer.append(TEXT_457); >+ stringBuffer.append(TEXT_357); > > } > for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { >@@ -1965,65 +1688,67 @@ > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet(); > if (generateSwitch) { > >- stringBuffer.append(TEXT_458); >+ stringBuffer.append(TEXT_358); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_459); >+ stringBuffer.append(TEXT_359); > > } else { > >- stringBuffer.append(TEXT_460); >+ stringBuffer.append(TEXT_360); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_461); >+ stringBuffer.append(TEXT_361); > > } > if (modelFacet.getSourceMetaFeature() != null) { > >- stringBuffer.append(TEXT_462); >+ stringBuffer.append(TEXT_362); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_463); >+ stringBuffer.append(TEXT_363); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_464); >+ stringBuffer.append(TEXT_364); > myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false); >- stringBuffer.append(TEXT_465); >+ stringBuffer.append(TEXT_365); > > } else { > >- stringBuffer.append(TEXT_466); >+ stringBuffer.append(TEXT_366); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_467); >+ stringBuffer.append(TEXT_367); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_468); >+ stringBuffer.append(TEXT_368); > > } > if (modelFacet.getTargetMetaFeature() != null) { > >- stringBuffer.append(TEXT_469); >+ stringBuffer.append(TEXT_369); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_470); >+ stringBuffer.append(TEXT_370); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_471); >+ stringBuffer.append(TEXT_371); > myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false); >- stringBuffer.append(TEXT_472); >+ stringBuffer.append(TEXT_372); > > } else { > >- stringBuffer.append(TEXT_473); >+ stringBuffer.append(TEXT_373); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_474); >+ stringBuffer.append(TEXT_374); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_475); >+ stringBuffer.append(TEXT_375); > > } > >- stringBuffer.append(TEXT_476); >+ stringBuffer.append(TEXT_376); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); >+ stringBuffer.append(TEXT_377); > > if (generateSwitch) { > >- stringBuffer.append(TEXT_477); >+ stringBuffer.append(TEXT_378); > > } else { > >- stringBuffer.append(TEXT_478); >+ stringBuffer.append(TEXT_379); > > } > >@@ -2031,12 +1756,12 @@ > } //iterate over genLinksCollection > if (generateSwitch) { > >- stringBuffer.append(TEXT_479); >+ stringBuffer.append(TEXT_380); > > } > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_480); >+ stringBuffer.append(TEXT_381); > > } > } >@@ -2046,153 +1771,172 @@ > Collection genLinksCollection = (Collection) nextEntry.getValue(); > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_481); >+ stringBuffer.append(TEXT_382); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_482); >+ stringBuffer.append(TEXT_383); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true); >- stringBuffer.append(TEXT_483); >+ stringBuffer.append(TEXT_384); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_484); >+ stringBuffer.append(TEXT_385); > > } else { > >- stringBuffer.append(TEXT_485); >+ stringBuffer.append(TEXT_386); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); >- stringBuffer.append(TEXT_486); >+ stringBuffer.append(TEXT_387); > myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false); >- stringBuffer.append(TEXT_487); >+ stringBuffer.append(TEXT_388); > > } > >- stringBuffer.append(TEXT_488); >+ stringBuffer.append(TEXT_389); > > for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { > GenLink nextLink = (GenLink) genLinksIterator.next(); > >- stringBuffer.append(TEXT_489); >+ stringBuffer.append(TEXT_390); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); >+ stringBuffer.append(TEXT_391); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_490); >+ stringBuffer.append(TEXT_392); > > } > >- stringBuffer.append(TEXT_491); >+ stringBuffer.append(TEXT_393); > > if (metaFeature.isListType()) { > >- stringBuffer.append(TEXT_492); >+ stringBuffer.append(TEXT_394); > > } > } > >- stringBuffer.append(TEXT_493); >+ stringBuffer.append(TEXT_395); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_494); >+ stringBuffer.append(TEXT_396); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_495); >+ stringBuffer.append(TEXT_397); > stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); >- stringBuffer.append(TEXT_496); >+ stringBuffer.append(TEXT_398); > stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_497); >+ stringBuffer.append(TEXT_399); > stringBuffer.append(_getDiagramCode); >- stringBuffer.append(TEXT_498); >+ stringBuffer.append(TEXT_400); > stringBuffer.append(importManager.getImportedName("java.util.Iterator")); >- stringBuffer.append(TEXT_499); >+ stringBuffer.append(TEXT_401); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_500); >+ stringBuffer.append(TEXT_402); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_501); >+ stringBuffer.append(TEXT_403); > > if (_includeUncontainedLinks) { > >- stringBuffer.append(TEXT_502); >+ stringBuffer.append(TEXT_404); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_503); >+ stringBuffer.append(TEXT_405); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_504); >+ stringBuffer.append(TEXT_406); > > } >- >- > if (myHelper.containsFeatureModelFacetLinks()) { > >- stringBuffer.append(TEXT_505); >+ stringBuffer.append(TEXT_407); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_506); >+ stringBuffer.append(TEXT_408); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_507); >+ stringBuffer.append(TEXT_409); > > for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > >- stringBuffer.append(TEXT_508); >+ stringBuffer.append(TEXT_410); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_509); >+ stringBuffer.append(TEXT_411); > > } > >- stringBuffer.append(TEXT_510); >+ stringBuffer.append(TEXT_412); > > if (myHelper.containsTypeModelFacetLinks()) { > >- stringBuffer.append(TEXT_511); >+ stringBuffer.append(TEXT_413); > > } else { > >- stringBuffer.append(TEXT_512); >+ stringBuffer.append(TEXT_414); > > } > } >- >- >- > if (myHelper.containsTypeModelFacetLinks()) { > if (!myHelper.containsFeatureModelFacetLinks()) { > >- stringBuffer.append(TEXT_513); >+ stringBuffer.append(TEXT_415); > > } > >- stringBuffer.append(TEXT_514); >+ stringBuffer.append(TEXT_416); > stringBuffer.append(_getViewCode); >- stringBuffer.append(TEXT_515); >+ stringBuffer.append(TEXT_417); > stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >- stringBuffer.append(TEXT_516); >+ stringBuffer.append(TEXT_418); > > for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) { > GenLink nextLink = (GenLink) it.next(); > >- stringBuffer.append(TEXT_517); >+ stringBuffer.append(TEXT_419); > stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_518); >+ stringBuffer.append(TEXT_420); > > } > >- stringBuffer.append(TEXT_519); >+ stringBuffer.append(TEXT_421); > > } > >- stringBuffer.append(TEXT_520); >+ stringBuffer.append(TEXT_422); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_521); >+ stringBuffer.append(TEXT_423); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); >+ stringBuffer.append(TEXT_424); > stringBuffer.append(genDiagram.isSynchronized()); >- stringBuffer.append(TEXT_522); >+ stringBuffer.append(TEXT_425); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_426); >+ stringBuffer.append(_getViewCode); >+ stringBuffer.append(TEXT_427); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher")); >+ stringBuffer.append(TEXT_428); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(TEXT_429); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(TEXT_430); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(TEXT_431); >+ stringBuffer.append(_getDiagramCode); >+ stringBuffer.append(TEXT_432); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_433); > > } > > > } > >- stringBuffer.append(TEXT_523); >- stringBuffer.append(TEXT_524); >- stringBuffer.append(TEXT_525); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); >- stringBuffer.append(TEXT_526); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >- stringBuffer.append(TEXT_527); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >- stringBuffer.append(TEXT_528); >+ stringBuffer.append(TEXT_434); >+ stringBuffer.append(TEXT_435); >+ stringBuffer.append(TEXT_436); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); >+ stringBuffer.append(TEXT_437); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); >+ stringBuffer.append(TEXT_438); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager")); >+ stringBuffer.append(TEXT_439); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager")); >+ stringBuffer.append(TEXT_440); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager")); >+ stringBuffer.append(TEXT_441); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_529); >+ stringBuffer.append(TEXT_442); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/WrappingCommandGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/WrappingCommandGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/parts/WrappingCommandGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/WrappingCommandGenerator.java 22 May 2006 18:22:10 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,53 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.parts; >- >-import org.eclipse.gmf.codegen.gmfgen.*; >-import org.eclipse.gmf.common.codegen.*; >- >-public class WrappingCommandGenerator >-{ >- protected static String nl; >- public static synchronized WrappingCommandGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- WrappingCommandGenerator result = new WrappingCommandGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = NL + "/**" + NL + " * Wraps a EMF command into a GEF command. The undelying EMF command will be executed within a transaction provided by the specified editing domain." + NL + " * @generated" + NL + " */" + NL + "public class WrappingCommand extends Command {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final IUndoableOperation operation;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected WrappingCommand(IUndoableOperation operation) {" + NL + "\t\tthis.operation = operation;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic WrappingCommand(TransactionalEditingDomain editingDomain, org.eclipse.emf.common.command.Command emfCommand) {" + NL + "\t\tthis.operation = new EMFCommandOperation(editingDomain, emfCommand);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void execute() {" + NL + "\t\ttry {" + NL + "\t\t\toperation.execute(new NullProgressMonitor(), null);" + NL + "\t\t} catch (ExecutionException e) {" + NL + "\t\t\t"; >- protected final String TEXT_2 = ".getInstance().logError(\"exception occurred while executing operation\", e);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canExecute() {" + NL + "\t\treturn operation.canExecute();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void undo() {" + NL + "\t\ttry {" + NL + "\t\t\toperation.undo(new NullProgressMonitor(), null);" + NL + "\t\t} catch (ExecutionException e) {" + NL + "\t\t\t"; >- protected final String TEXT_3 = ".getInstance().logError(\"exception occurred while undoing operation\", e);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean canUndo() {" + NL + "\t\treturn operation.canUndo();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void redo() {" + NL + "\t\ttry {" + NL + "\t\t\toperation.redo(new NullProgressMonitor(), null);" + NL + "\t\t} catch (ExecutionException e) {" + NL + "\t\t\t"; >- protected final String TEXT_4 = ".getInstance().logError(\"exception occurred while redoing operation\", e);" + NL + "\t\t}" + NL + "\t}" + NL + "}"; >- protected final String TEXT_5 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- >-GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-final GenPlugin genPlugin = genDiagram.getEditorGen().getPlugin(); >- >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.addImport("org.eclipse.core.commands.ExecutionException"); >-importManager.addImport("org.eclipse.core.commands.operations.IUndoableOperation"); >-importManager.addImport("org.eclipse.core.runtime.NullProgressMonitor"); >-importManager.addImport("org.eclipse.emf.transaction.TransactionalEditingDomain"); >-importManager.addImport("org.eclipse.emf.workspace.EMFCommandOperation"); >-importManager.addImport("org.eclipse.gef.commands.Command"); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_1); >- stringBuffer.append(importManager.getImportedName(genPlugin.getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_2); >- stringBuffer.append(importManager.getImportedName(genPlugin.getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName(genPlugin.getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_4); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_5); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkLabelEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkLabelEditPartGenerator.java,v >retrieving revision 1.10 >diff -u -r1.10 LinkLabelEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkLabelEditPartGenerator.java 4 Aug 2006 17:05:48 -0000 1.10 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkLabelEditPartGenerator.java 30 Aug 2006 15:22:22 -0000 >@@ -69,215 +69,223 @@ > protected final String TEXT_49 = ".getDiagram().getElement());"; > protected final String TEXT_50 = NL + "\t\t\t\t\t\tif (parseResult.length != 1) {" + NL + "\t\t\t\t\t\t\treturn "; > protected final String TEXT_51 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_52 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]);" + NL + "\t\t\t\t\t\treturn new WrappingCommand(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_53 = " createDomainModelCommand("; >- protected final String TEXT_54 = " editingDomain, Object value) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_55 = " element = "; >- protected final String TEXT_56 = ";" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_57 = " feature = ("; >- protected final String TEXT_58 = ") "; >- protected final String TEXT_59 = ".eINSTANCE.get"; >- protected final String TEXT_60 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >- protected final String TEXT_61 = ".parseValue(feature, value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_62 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >- protected final String TEXT_63 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_64 = " result = new "; >- protected final String TEXT_65 = "();" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_66 = " values = new "; >- protected final String TEXT_67 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >- protected final String TEXT_68 = "());" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_69 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_70 = ".create(editingDomain, element, feature, valueToSet));" + NL + "\t\t\t\t\t\treturn result;"; >- protected final String TEXT_71 = NL + "\t\t\t\t\t\treturn "; >- protected final String TEXT_72 = ".create(editingDomain, element, feature, valueToSet);"; >- protected final String TEXT_73 = NL + "\t\t\t\t\t}"; >- protected final String TEXT_74 = NL + "\t\t\t\t\t\tif (parseResult.length != "; >- protected final String TEXT_75 = ") {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_76 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_77 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult);" + NL + "\t\t\t\t\t\treturn new WrappingCommand(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_78 = " createDomainModelCommand("; >- protected final String TEXT_79 = " editingDomain, Object[] values) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_80 = " element = "; >- protected final String TEXT_81 = ";" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_82 = " result = new "; >- protected final String TEXT_83 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;"; >- protected final String TEXT_84 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_85 = " "; >- protected final String TEXT_86 = "feature = ("; >- protected final String TEXT_87 = ") "; >- protected final String TEXT_88 = ".eINSTANCE.get"; >- protected final String TEXT_89 = "();" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >- protected final String TEXT_90 = ".parseValue(feature, values["; >- protected final String TEXT_91 = "]);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_92 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >- protected final String TEXT_93 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_94 = " "; >- protected final String TEXT_95 = "values = new "; >- protected final String TEXT_96 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >- protected final String TEXT_97 = "());" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_98 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_99 = ".create(editingDomain, element, feature, valueToSet));"; >- protected final String TEXT_100 = NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_52 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]);" + NL + "\t\t\t\t\t\treturn new "; >+ protected final String TEXT_53 = "(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_54 = " createDomainModelCommand("; >+ protected final String TEXT_55 = " editingDomain, Object value) {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_56 = " element = "; >+ protected final String TEXT_57 = ";" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_58 = " feature = ("; >+ protected final String TEXT_59 = ") "; >+ protected final String TEXT_60 = ".eINSTANCE.get"; >+ protected final String TEXT_61 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >+ protected final String TEXT_62 = ".parseValue(feature, value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_63 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >+ protected final String TEXT_64 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_65 = " result = new "; >+ protected final String TEXT_66 = "();" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_67 = " values = new "; >+ protected final String TEXT_68 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >+ protected final String TEXT_69 = "());" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_70 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_71 = ".create(editingDomain, element, feature, valueToSet));" + NL + "\t\t\t\t\t\treturn result;"; >+ protected final String TEXT_72 = NL + "\t\t\t\t\t\treturn "; >+ protected final String TEXT_73 = ".create(editingDomain, element, feature, valueToSet);"; >+ protected final String TEXT_74 = NL + "\t\t\t\t\t}"; >+ protected final String TEXT_75 = NL + "\t\t\t\t\t\tif (parseResult.length != "; >+ protected final String TEXT_76 = ") {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_77 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_78 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult);" + NL + "\t\t\t\t\t\treturn new "; >+ protected final String TEXT_79 = "(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_80 = " createDomainModelCommand("; >+ protected final String TEXT_81 = " editingDomain, Object[] values) {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_82 = " element = "; >+ protected final String TEXT_83 = ";" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_84 = " result = new "; >+ protected final String TEXT_85 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;"; >+ protected final String TEXT_86 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_87 = " "; >+ protected final String TEXT_88 = "feature = ("; >+ protected final String TEXT_89 = ") "; >+ protected final String TEXT_90 = ".eINSTANCE.get"; >+ protected final String TEXT_91 = "();" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >+ protected final String TEXT_92 = ".parseValue(feature, values["; >+ protected final String TEXT_93 = "]);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_94 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >+ protected final String TEXT_95 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_96 = " "; >+ protected final String TEXT_97 = "values = new "; >+ protected final String TEXT_98 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >+ protected final String TEXT_99 = "());" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_100 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; > protected final String TEXT_101 = ".create(editingDomain, element, feature, valueToSet));"; >- protected final String TEXT_102 = NL + "\t\t\t\t\t\treturn result;" + NL + "\t\t\t\t\t}"; >- protected final String TEXT_103 = NL + "\t\t\t\t});"; >- protected final String TEXT_104 = NL + "\t}" + NL; >- protected final String TEXT_105 = NL; >- protected final String TEXT_106 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >- protected final String TEXT_107 = " req) {" + NL + "\t\tif ("; >- protected final String TEXT_108 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(req);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_109 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tmanager = new "; >- protected final String TEXT_110 = "(this, "; >- protected final String TEXT_111 = ".class, new "; >- protected final String TEXT_112 = "() {" + NL + "\t\t\t\tpublic void relocate("; >- protected final String TEXT_113 = " celleditor) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_114 = " rect = getLabel().getTextBounds();" + NL + "\t\t\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "\t\t\t\t\tcelleditor.getControl().setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t}) {" + NL + "\t\t\t\tprotected void initCellEditor() {" + NL + "\t\t\t\t\tgetCellEditor().setValue(getLabelEditText());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL; >- protected final String TEXT_115 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshBounds();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\tNode node = getDiagramNode();" + NL + "\t\tassert node.getLayoutConstraint() instanceof Location;" + NL + "\t\tfinal Location location = (Location) node.getLayoutConstraint();" + NL + "\t\t"; >- protected final String TEXT_116 = " parent = getUpdatableParent();" + NL + "\t\t"; >- protected final String TEXT_117 = " connection = ("; >- protected final String TEXT_118 = ") parent.getFigure();"; >- protected final String TEXT_119 = NL + "\t\t(("; >- protected final String TEXT_120 = ") getParent()).setLayoutConstraint(this," + NL + "\t\t\t\tgetFigure(), new "; >- protected final String TEXT_121 = "(connection, "; >- protected final String TEXT_122 = "."; >- protected final String TEXT_123 = ") {" + NL + "\t\t\t\t\tprotected "; >- protected final String TEXT_124 = " getReferencePoint() {" + NL + "\t\t\t\t\t\treturn super.getReferencePoint().translate(location.getX(), location.getY());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t});" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tgetLabel().setText(getLabelText());" + NL + "\t\tgetLabel().setIcon(getLabelIcon());" + NL + "\t}" + NL; >- protected final String TEXT_125 = NL; >- protected final String TEXT_126 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String VIEW_PATTERN = \""; >- protected final String TEXT_127 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String EDIT_PATTERN = \""; >- protected final String TEXT_128 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t"; >- protected final String TEXT_129 = " element = "; >- protected final String TEXT_130 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, VIEW_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelEditText() {" + NL + "\t\t"; >+ protected final String TEXT_102 = NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_103 = ".create(editingDomain, element, feature, valueToSet));"; >+ protected final String TEXT_104 = NL + "\t\t\t\t\t\treturn result;" + NL + "\t\t\t\t\t}"; >+ protected final String TEXT_105 = NL + "\t\t\t\t});"; >+ protected final String TEXT_106 = NL + "\t}" + NL; >+ protected final String TEXT_107 = NL; >+ protected final String TEXT_108 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >+ protected final String TEXT_109 = " req) {" + NL + "\t\tif ("; >+ protected final String TEXT_110 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(req);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_111 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tmanager = new "; >+ protected final String TEXT_112 = "(this, "; >+ protected final String TEXT_113 = ".class, new "; >+ protected final String TEXT_114 = "() {" + NL + "\t\t\t\tpublic void relocate("; >+ protected final String TEXT_115 = " celleditor) {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_116 = " rect = getLabel().getTextBounds();" + NL + "\t\t\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "\t\t\t\t\tcelleditor.getControl().setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t}) {" + NL + "\t\t\t\tprotected void initCellEditor() {" + NL + "\t\t\t\t\tgetCellEditor().setValue(getLabelEditText());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL; >+ protected final String TEXT_117 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshBounds();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\tNode node = getDiagramNode();" + NL + "\t\tassert node.getLayoutConstraint() instanceof Location;" + NL + "\t\tfinal Location location = (Location) node.getLayoutConstraint();" + NL + "\t\t"; >+ protected final String TEXT_118 = " parent = getUpdatableParent();" + NL + "\t\t"; >+ protected final String TEXT_119 = " connection = ("; >+ protected final String TEXT_120 = ") parent.getFigure();"; >+ protected final String TEXT_121 = NL + "\t\t(("; >+ protected final String TEXT_122 = ") getParent()).setLayoutConstraint(this," + NL + "\t\t\t\tgetFigure(), new "; >+ protected final String TEXT_123 = "(connection, "; >+ protected final String TEXT_124 = "."; >+ protected final String TEXT_125 = ") {" + NL + "\t\t\t\t\tprotected "; >+ protected final String TEXT_126 = " getReferencePoint() {" + NL + "\t\t\t\t\t\treturn super.getReferencePoint().translate(location.getX(), location.getY());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t});" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tgetLabel().setText(getLabelText());" + NL + "\t\tgetLabel().setIcon(getLabelIcon());" + NL + "\t}" + NL; >+ protected final String TEXT_127 = NL; >+ protected final String TEXT_128 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String VIEW_PATTERN = \""; >+ protected final String TEXT_129 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String EDIT_PATTERN = \""; >+ protected final String TEXT_130 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t"; > protected final String TEXT_131 = " element = "; >- protected final String TEXT_132 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, EDIT_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String buildTextByPattern("; >- protected final String TEXT_133 = " element, String pattern) {"; >- protected final String TEXT_134 = NL + "\t\tif ("; >- protected final String TEXT_135 = " == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}"; >- protected final String TEXT_136 = NL + "\t\treturn "; >- protected final String TEXT_137 = ".format(pattern, new Object[] {"; >- protected final String TEXT_138 = NL + "\t\t\tnew "; >- protected final String TEXT_139 = "("; >- protected final String TEXT_140 = ")"; >- protected final String TEXT_141 = NL + "\t\t});"; >- protected final String TEXT_142 = NL + "\t\treturn "; >- protected final String TEXT_143 = ".format(pattern, new Object[] {"; >- protected final String TEXT_144 = NL + "\t\t\tnew "; >- protected final String TEXT_145 = "("; >- protected final String TEXT_146 = ")"; >- protected final String TEXT_147 = ","; >- protected final String TEXT_148 = NL + "\t\t});"; >- protected final String TEXT_149 = NL + "\t\t//XXX: unexpected model facet." + NL + "\t\treturn defaultText;"; >- protected final String TEXT_150 = NL + "\t}"; >- protected final String TEXT_151 = NL; >- protected final String TEXT_152 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >- protected final String TEXT_153 = NL + "\t\t"; >- protected final String TEXT_154 = " style =" + NL + "\t\t\t("; >- protected final String TEXT_155 = ") "; >- protected final String TEXT_156 = ".getStyle(" + NL + "\t\t\t\t"; >- protected final String TEXT_157 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_158 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >- protected final String TEXT_159 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_160 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_161 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_162 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >- protected final String TEXT_163 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >- protected final String TEXT_164 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >- protected final String TEXT_165 = "\t" + NL + "\t}"; >- protected final String TEXT_166 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_167 = " createdFont;"; >- protected final String TEXT_168 = "\t"; >- protected final String TEXT_169 = NL; >- protected final String TEXT_170 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFontColor() {" + NL + "\t\t"; >- protected final String TEXT_171 = " style = ("; >- protected final String TEXT_172 = ") "; >- protected final String TEXT_173 = ".getStyle("; >- protected final String TEXT_174 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_175 = " toDispose = createdFontColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint fontColor = style.getFontColor();" + NL + "\t\t\tint red = fontColor & 0x000000FF;" + NL + "\t\t\tint green = (fontColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (fontColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_176 = " currentColor = getLabel().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFontColor = new "; >- protected final String TEXT_177 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdFontColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedFontColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshFontColor()}) currently assigned to the label." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_178 = " createdFontColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_179 = " getLabelIcon() {"; >- protected final String TEXT_180 = NL + "\t\t"; >- protected final String TEXT_181 = " imageDescriptor = "; >- protected final String TEXT_182 = ".getInstance().getItemImageDescriptor(resolveSemanticElement());" + NL + "\t\tif (imageDescriptor != null) {" + NL + "\t\t\treturn imageDescriptor.createImage();" + NL + "\t\t}"; >- protected final String TEXT_183 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_184 = " resolveSemanticElement() {" + NL + "\t\t"; >- protected final String TEXT_185 = " parent = getUpdatableParent();" + NL + "\t\tif (parent == null || parent.getModel() instanceof "; >- protected final String TEXT_186 = " == false) {" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >- protected final String TEXT_187 = NL + "\t\t"; >- protected final String TEXT_188 = " view = ("; >- protected final String TEXT_189 = ") parent.getModel();" + NL + "\t\treturn ("; >- protected final String TEXT_190 = ") view.getElement();"; >- protected final String TEXT_191 = NL + "\t\t"; >- protected final String TEXT_192 = " target = (("; >- protected final String TEXT_193 = ") parent.getModel()).getTarget();" + NL + "\t\treturn (target != null && target.getElement() instanceof "; >- protected final String TEXT_194 = ") ? ("; >- protected final String TEXT_195 = ") target.getElement() : null;"; >- protected final String TEXT_196 = NL + "\t\treturn null;"; >- protected final String TEXT_197 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_198 = " getUpdatableParent() {" + NL + "\t\tfor(EditPart editPart = getParent(); editPart != null; editPart = editPart.getParent()) {" + NL + "\t\t\tif (editPart instanceof "; >- protected final String TEXT_199 = ") {" + NL + "\t\t\t\treturn ("; >- protected final String TEXT_200 = ") editPart;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\t"; >- protected final String TEXT_201 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_202 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_203 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_204 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_205 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_206 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >- protected final String TEXT_207 = NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_208 = ".eINSTANCE.get"; >- protected final String TEXT_209 = "(), labelRefresher);"; >- protected final String TEXT_210 = NL + "\t\t\tupdatableParent.addRefresher("; >- protected final String TEXT_211 = ".eINSTANCE.get"; >- protected final String TEXT_212 = "(), labelRefresher);"; >- protected final String TEXT_213 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tsuper.deactivate();" + NL + "\t\t"; >- protected final String TEXT_214 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_215 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_216 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_217 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_218 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_219 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >- protected final String TEXT_220 = NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_221 = ".eINSTANCE.get"; >- protected final String TEXT_222 = "(), labelRefresher);"; >- protected final String TEXT_223 = NL + "\t\t\tupdatableParent.removeRefresher("; >- protected final String TEXT_224 = ".eINSTANCE.get"; >- protected final String TEXT_225 = "(), labelRefresher);"; >- protected final String TEXT_226 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IUpdatableEditPart.Refresher labelRefresher = new IUpdatableEditPart.Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshLabel();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IUpdatableEditPart.Refresher fontColorRefresher = new IUpdatableEditPart.Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFontColor();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IUpdatableEditPart.Refresher fontRefresher = new IUpdatableEditPart.Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFont();" + NL + "\t\t}" + NL + "\t};" + NL; >- protected final String TEXT_227 = NL; >- protected final String TEXT_228 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_229 = " createFigure() {" + NL + "\t\t// Parent should assign one using "; >- protected final String TEXT_230 = " method" + NL + "\t\treturn null;" + NL + "\t}"; >- protected final String TEXT_231 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_232 = " createLabel() {"; >- protected final String TEXT_233 = NL + "\t\treturn new "; >- protected final String TEXT_234 = "();"; >- protected final String TEXT_235 = NL + "\t\treturn "; >- protected final String TEXT_236 = ";"; >- protected final String TEXT_237 = NL + "\t\treturn new "; >- protected final String TEXT_238 = "();"; >- protected final String TEXT_239 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_240 = " createFigure() {" + NL + "\t\t"; >- protected final String TEXT_241 = " label = createLabel();"; >- protected final String TEXT_242 = NL + "\t\tdefaultText = label.getText();"; >- protected final String TEXT_243 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >- protected final String TEXT_244 = NL + "\t\treturn label;" + NL + "\t}"; >- protected final String TEXT_245 = NL + NL + "\t/**"; >- protected final String TEXT_246 = NL + "\t * TODO: reimplement, since the figure used by this editpart is not a Label."; >- protected final String TEXT_247 = NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_248 = " getLabel() {" + NL + "\t\treturn ("; >- protected final String TEXT_249 = ") getFigure();" + NL + "\t}" + NL; >- protected final String TEXT_250 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void "; >- protected final String TEXT_251 = "("; >- protected final String TEXT_252 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);"; >- protected final String TEXT_253 = NL + "\t\tdefaultText = figure.getText();"; >- protected final String TEXT_254 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >- protected final String TEXT_255 = NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL; >- protected final String TEXT_256 = NL; >- protected final String TEXT_257 = NL; >- protected final String TEXT_258 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_259 = NL + "}"; >- protected final String TEXT_260 = NL; >+ protected final String TEXT_132 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, VIEW_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelEditText() {" + NL + "\t\t"; >+ protected final String TEXT_133 = " element = "; >+ protected final String TEXT_134 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, EDIT_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String buildTextByPattern("; >+ protected final String TEXT_135 = " element, String pattern) {"; >+ protected final String TEXT_136 = NL + "\t\tif ("; >+ protected final String TEXT_137 = " == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}"; >+ protected final String TEXT_138 = NL + "\t\treturn "; >+ protected final String TEXT_139 = ".format(pattern, new Object[] {"; >+ protected final String TEXT_140 = NL + "\t\t\tnew "; >+ protected final String TEXT_141 = "("; >+ protected final String TEXT_142 = ")"; >+ protected final String TEXT_143 = NL + "\t\t});"; >+ protected final String TEXT_144 = NL + "\t\treturn "; >+ protected final String TEXT_145 = ".format(pattern, new Object[] {"; >+ protected final String TEXT_146 = NL + "\t\t\tnew "; >+ protected final String TEXT_147 = "("; >+ protected final String TEXT_148 = ")"; >+ protected final String TEXT_149 = ","; >+ protected final String TEXT_150 = NL + "\t\t});"; >+ protected final String TEXT_151 = NL + "\t\t//XXX: unexpected model facet." + NL + "\t\treturn defaultText;"; >+ protected final String TEXT_152 = NL + "\t}"; >+ protected final String TEXT_153 = NL; >+ protected final String TEXT_154 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >+ protected final String TEXT_155 = NL + "\t\t"; >+ protected final String TEXT_156 = " style =" + NL + "\t\t\t("; >+ protected final String TEXT_157 = ") "; >+ protected final String TEXT_158 = ".getStyle(" + NL + "\t\t\t\t"; >+ protected final String TEXT_159 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_160 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >+ protected final String TEXT_161 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_162 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_163 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_164 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_165 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >+ protected final String TEXT_166 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >+ protected final String TEXT_167 = "\t" + NL + "\t}"; >+ protected final String TEXT_168 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_169 = " createdFont;"; >+ protected final String TEXT_170 = "\t"; >+ protected final String TEXT_171 = NL; >+ protected final String TEXT_172 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFontColor() {" + NL + "\t\t"; >+ protected final String TEXT_173 = " style = ("; >+ protected final String TEXT_174 = ") "; >+ protected final String TEXT_175 = ".getStyle("; >+ protected final String TEXT_176 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_177 = " toDispose = createdFontColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint fontColor = style.getFontColor();" + NL + "\t\t\tint red = fontColor & 0x000000FF;" + NL + "\t\t\tint green = (fontColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (fontColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_178 = " currentColor = getLabel().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFontColor = new "; >+ protected final String TEXT_179 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdFontColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedFontColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshFontColor()}) currently assigned to the label." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_180 = " createdFontColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_181 = " getLabelIcon() {"; >+ protected final String TEXT_182 = NL + "\t\t"; >+ protected final String TEXT_183 = " imageDescriptor = "; >+ protected final String TEXT_184 = ".getInstance().getItemImageDescriptor(resolveSemanticElement());" + NL + "\t\tif (imageDescriptor != null) {" + NL + "\t\t\treturn imageDescriptor.createImage();" + NL + "\t\t}"; >+ protected final String TEXT_185 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_186 = " resolveSemanticElement() {" + NL + "\t\t"; >+ protected final String TEXT_187 = " parent = getUpdatableParent();" + NL + "\t\tif (parent == null || parent.getModel() instanceof "; >+ protected final String TEXT_188 = " == false) {" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >+ protected final String TEXT_189 = NL + "\t\t"; >+ protected final String TEXT_190 = " view = ("; >+ protected final String TEXT_191 = ") parent.getModel();" + NL + "\t\treturn ("; >+ protected final String TEXT_192 = ") view.getElement();"; >+ protected final String TEXT_193 = NL + "\t\t"; >+ protected final String TEXT_194 = " target = (("; >+ protected final String TEXT_195 = ") parent.getModel()).getTarget();" + NL + "\t\treturn (target != null && target.getElement() instanceof "; >+ protected final String TEXT_196 = ") ? ("; >+ protected final String TEXT_197 = ") target.getElement() : null;"; >+ protected final String TEXT_198 = NL + "\t\treturn null;"; >+ protected final String TEXT_199 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_200 = " getUpdatableParent() {" + NL + "\t\tfor(EditPart editPart = getParent(); editPart != null; editPart = editPart.getParent()) {" + NL + "\t\t\tif (editPart instanceof "; >+ protected final String TEXT_201 = ") {" + NL + "\t\t\t\treturn ("; >+ protected final String TEXT_202 = ") editPart;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\t"; >+ protected final String TEXT_203 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_204 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_205 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_206 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_207 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_208 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >+ protected final String TEXT_209 = NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_210 = ".eINSTANCE.get"; >+ protected final String TEXT_211 = "(), labelRefresher);"; >+ protected final String TEXT_212 = NL + "\t\t\tupdatableParent.addRefresher("; >+ protected final String TEXT_213 = ".eINSTANCE.get"; >+ protected final String TEXT_214 = "(), labelRefresher);"; >+ protected final String TEXT_215 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tsuper.deactivate();" + NL + "\t\t"; >+ protected final String TEXT_216 = " updatableParent = getUpdatableParent();" + NL + "\t\tif (updatableParent != null) {" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_217 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_218 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_219 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_220 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_221 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);"; >+ protected final String TEXT_222 = NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_223 = ".eINSTANCE.get"; >+ protected final String TEXT_224 = "(), labelRefresher);"; >+ protected final String TEXT_225 = NL + "\t\t\tupdatableParent.removeRefresher("; >+ protected final String TEXT_226 = ".eINSTANCE.get"; >+ protected final String TEXT_227 = "(), labelRefresher);"; >+ protected final String TEXT_228 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_229 = ".Refresher labelRefresher = new "; >+ protected final String TEXT_230 = ".Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshLabel();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_231 = ".Refresher fontColorRefresher = new "; >+ protected final String TEXT_232 = ".Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFontColor();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_233 = ".Refresher fontRefresher = new "; >+ protected final String TEXT_234 = ".Refresher() {" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\trefreshFont();" + NL + "\t\t}" + NL + "\t};" + NL; >+ protected final String TEXT_235 = NL; >+ protected final String TEXT_236 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_237 = " createFigure() {" + NL + "\t\t// Parent should assign one using "; >+ protected final String TEXT_238 = " method" + NL + "\t\treturn null;" + NL + "\t}"; >+ protected final String TEXT_239 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_240 = " createLabel() {"; >+ protected final String TEXT_241 = NL + "\t\treturn new "; >+ protected final String TEXT_242 = "();"; >+ protected final String TEXT_243 = NL + "\t\treturn "; >+ protected final String TEXT_244 = ";"; >+ protected final String TEXT_245 = NL + "\t\treturn new "; >+ protected final String TEXT_246 = "();"; >+ protected final String TEXT_247 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_248 = " createFigure() {" + NL + "\t\t"; >+ protected final String TEXT_249 = " label = createLabel();"; >+ protected final String TEXT_250 = NL + "\t\tdefaultText = label.getText();"; >+ protected final String TEXT_251 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >+ protected final String TEXT_252 = NL + "\t\treturn label;" + NL + "\t}"; >+ protected final String TEXT_253 = NL + NL + "\t/**"; >+ protected final String TEXT_254 = NL + "\t * TODO: reimplement, since the figure used by this editpart is not a Label."; >+ protected final String TEXT_255 = NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_256 = " getLabel() {" + NL + "\t\treturn ("; >+ protected final String TEXT_257 = ") getFigure();" + NL + "\t}" + NL; >+ protected final String TEXT_258 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void "; >+ protected final String TEXT_259 = "("; >+ protected final String TEXT_260 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);"; >+ protected final String TEXT_261 = NL + "\t\tdefaultText = figure.getText();"; >+ protected final String TEXT_262 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >+ protected final String TEXT_263 = NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL; >+ protected final String TEXT_264 = NL; >+ protected final String TEXT_265 = NL; >+ protected final String TEXT_266 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_267 = NL + "}"; >+ protected final String TEXT_268 = NL; > > public String generate(Object argument) > { >@@ -469,171 +477,175 @@ > stringBuffer.append(TEXT_51); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_52); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_53); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_54); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_55); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_56); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >+ stringBuffer.append(resolvedSemanticElement); > stringBuffer.append(TEXT_57); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_58); >- stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_59); >- stringBuffer.append(featureToSet.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_60); >- stringBuffer.append(importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())); >+ stringBuffer.append(featureToSet.getFeatureAccessorName()); > stringBuffer.append(TEXT_61); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); > stringBuffer.append(TEXT_62); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(TEXT_63); > > if (ecoreFeature.isMany()) { > >- stringBuffer.append(TEXT_63); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_64); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_65); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); > stringBuffer.append(TEXT_66); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); > stringBuffer.append(TEXT_67); >- stringBuffer.append(featureToSet.getAccessorName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); > stringBuffer.append(TEXT_68); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >+ stringBuffer.append(featureToSet.getAccessorName()); > stringBuffer.append(TEXT_69); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); > stringBuffer.append(TEXT_70); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >+ stringBuffer.append(TEXT_71); > > } else { > >- stringBuffer.append(TEXT_71); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_72); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >+ stringBuffer.append(TEXT_73); > > } > >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_74); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); > >- stringBuffer.append(TEXT_74); >- stringBuffer.append(metaFeatures.size()); > stringBuffer.append(TEXT_75); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(metaFeatures.size()); > stringBuffer.append(TEXT_76); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_77); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_78); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_79); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_80); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_81); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_82); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(resolvedSemanticElement); > stringBuffer.append(TEXT_83); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_84); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >+ stringBuffer.append(TEXT_85); > > boolean haveDeclaredValues = false; > for(int i = 0; i < metaFeatures.size(); i++) { > GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); > EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); > >- stringBuffer.append(TEXT_84); >- if (i == 0) { >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >- stringBuffer.append(TEXT_85); >- } > stringBuffer.append(TEXT_86); >+ if (i == 0) { > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_87); >- stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); >+ } > stringBuffer.append(TEXT_88); >- stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_89); >- stringBuffer.append(importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_90); >- stringBuffer.append(i); >+ stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); > stringBuffer.append(TEXT_91); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); > stringBuffer.append(TEXT_92); >+ stringBuffer.append(i); >+ stringBuffer.append(TEXT_93); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(TEXT_94); > > if (nextEcoreFeature.isMany()) { > >- stringBuffer.append(TEXT_93); >+ stringBuffer.append(TEXT_95); > if (!haveDeclaredValues) { haveDeclaredValues = true; > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); >- stringBuffer.append(TEXT_94); >+ stringBuffer.append(TEXT_96); > } >- stringBuffer.append(TEXT_95); >+ stringBuffer.append(TEXT_97); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); >- stringBuffer.append(TEXT_96); >+ stringBuffer.append(TEXT_98); > stringBuffer.append(nextFeatureToSet.getAccessorName()); >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_99); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_98); >+ stringBuffer.append(TEXT_100); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_99); >+ stringBuffer.append(TEXT_101); > > } else { > >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_102); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_103); > > } > > > } > >- stringBuffer.append(TEXT_102); >+ stringBuffer.append(TEXT_104); > > } > >- stringBuffer.append(TEXT_103); >+ stringBuffer.append(TEXT_105); > > } > >- stringBuffer.append(TEXT_104); >+ stringBuffer.append(TEXT_106); > > if (labelModelFacet instanceof FeatureLabelModelFacet || labelModelFacet instanceof CompositeFeatureLabelModelFacet && !isReadOnly) { > >- stringBuffer.append(TEXT_105); >- stringBuffer.append(TEXT_106); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_107); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); > stringBuffer.append(TEXT_108); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_109); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); > stringBuffer.append(TEXT_110); >- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); > stringBuffer.append(TEXT_111); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); > stringBuffer.append(TEXT_112); >- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); > stringBuffer.append(TEXT_113); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); > stringBuffer.append(TEXT_114); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); >+ stringBuffer.append(TEXT_115); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(TEXT_116); > > } > >- stringBuffer.append(TEXT_115); >+ stringBuffer.append(TEXT_117); > stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_116); >+ stringBuffer.append(TEXT_118); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Connection")); >- stringBuffer.append(TEXT_117); >+ stringBuffer.append(TEXT_119); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Connection")); >- stringBuffer.append(TEXT_118); >+ stringBuffer.append(TEXT_120); > > final String alignment; > LinkLabelAlignment genAlignment = genLabel.getAlignment(); >@@ -656,18 +668,18 @@ > } > } > >- stringBuffer.append(TEXT_119); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >- stringBuffer.append(TEXT_120); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionLocator")); > stringBuffer.append(TEXT_121); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionLocator")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); > stringBuffer.append(TEXT_122); >- stringBuffer.append(alignment); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionLocator")); > stringBuffer.append(TEXT_123); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionLocator")); > stringBuffer.append(TEXT_124); >+ stringBuffer.append(alignment); > stringBuffer.append(TEXT_125); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >+ stringBuffer.append(TEXT_126); >+ stringBuffer.append(TEXT_127); > > /*genFeature.getObjectType() throws NPE on primitive types. This is a workaround. */ > HashMap primitiveTypeToWrapperClassName = new HashMap(); >@@ -711,14 +723,10 @@ > } > } > >- stringBuffer.append(TEXT_126); >- stringBuffer.append(viewPattern); >- stringBuffer.append(TEXT_127); >- stringBuffer.append(editPattern); > stringBuffer.append(TEXT_128); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(viewPattern); > stringBuffer.append(TEXT_129); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(editPattern); > stringBuffer.append(TEXT_130); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_131); >@@ -726,76 +734,80 @@ > stringBuffer.append(TEXT_132); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_133); >+ stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(TEXT_134); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(TEXT_135); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; > GenFeature feature = featureLabelModelFacet.getMetaFeature(); > if (!feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_134); >+ stringBuffer.append(TEXT_136); > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); >- stringBuffer.append(TEXT_135); >+ stringBuffer.append(TEXT_137); > > } > >- stringBuffer.append(TEXT_136); >+ stringBuffer.append(TEXT_138); > stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_137); >+ stringBuffer.append(TEXT_139); > > if (feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_138); >+ stringBuffer.append(TEXT_140); > stringBuffer.append(primitiveTypeToWrapperClassName.get(feature.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); >- stringBuffer.append(TEXT_139); >+ stringBuffer.append(TEXT_141); > > } > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); > if (feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_140); >+ stringBuffer.append(TEXT_142); > > } > >- stringBuffer.append(TEXT_141); >+ stringBuffer.append(TEXT_143); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > >- stringBuffer.append(TEXT_142); >+ stringBuffer.append(TEXT_144); > stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_143); >+ stringBuffer.append(TEXT_145); > > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > if (next.isPrimitiveType()) { > >- stringBuffer.append(TEXT_144); >+ stringBuffer.append(TEXT_146); > stringBuffer.append(primitiveTypeToWrapperClassName.get(next.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); >- stringBuffer.append(TEXT_145); >+ stringBuffer.append(TEXT_147); > > } > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", next, underlyingMetaClass, false); > if (next.isPrimitiveType()) { > >- stringBuffer.append(TEXT_146); >+ stringBuffer.append(TEXT_148); > > } > if (it.hasNext()) { >- stringBuffer.append(TEXT_147); >+ stringBuffer.append(TEXT_149); > } > > } > >- stringBuffer.append(TEXT_148); >+ stringBuffer.append(TEXT_150); > > } else { > >- stringBuffer.append(TEXT_149); >+ stringBuffer.append(TEXT_151); > > } > >- stringBuffer.append(TEXT_150); >- stringBuffer.append(TEXT_151); >+ stringBuffer.append(TEXT_152); >+ stringBuffer.append(TEXT_153); > > boolean isFixedFontSetInFigure; > { >@@ -803,126 +815,122 @@ > isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont(); > } > >- stringBuffer.append(TEXT_152); >+ stringBuffer.append(TEXT_154); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_153); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_154); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_155); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_156); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_157); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_158); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_159); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_160); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_161); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_162); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_163); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_164); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >+ stringBuffer.append(TEXT_165); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(TEXT_166); > > } > >- stringBuffer.append(TEXT_165); >+ stringBuffer.append(TEXT_167); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_166); >+ stringBuffer.append(TEXT_168); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_167); >+ stringBuffer.append(TEXT_169); > > } > >- stringBuffer.append(TEXT_168); >- stringBuffer.append(TEXT_169); > stringBuffer.append(TEXT_170); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_171); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_172); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_173); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_174); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_175); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_176); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_177); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_178); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_179); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(TEXT_180); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); >+ stringBuffer.append(TEXT_181); > > if (genLabel.isElementIcon()) { > >- stringBuffer.append(TEXT_180); >+ stringBuffer.append(TEXT_182); > stringBuffer.append(importManager.getImportedName("org.eclipse.jface.resource.ImageDescriptor")); >- stringBuffer.append(TEXT_181); >+ stringBuffer.append(TEXT_183); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_182); >+ stringBuffer.append(TEXT_184); > > } > >- stringBuffer.append(TEXT_183); >+ stringBuffer.append(TEXT_185); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_184); >+ stringBuffer.append(TEXT_186); > stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_185); >+ stringBuffer.append(TEXT_187); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_186); >+ stringBuffer.append(TEXT_188); > > if (genHost.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_187); >+ stringBuffer.append(TEXT_189); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_188); >+ stringBuffer.append(TEXT_190); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_191); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_190); >+ stringBuffer.append(TEXT_192); > > } else if (genHost.getModelFacet() instanceof FeatureLinkModelFacet) { > >- stringBuffer.append(TEXT_191); >+ stringBuffer.append(TEXT_193); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >- stringBuffer.append(TEXT_192); >+ stringBuffer.append(TEXT_194); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_193); >+ stringBuffer.append(TEXT_195); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_194); >+ stringBuffer.append(TEXT_196); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_195); >+ stringBuffer.append(TEXT_197); > > } else { > >- stringBuffer.append(TEXT_196); >+ stringBuffer.append(TEXT_198); > > } > >- stringBuffer.append(TEXT_197); >- stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_198); >- stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_199); > stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_200); > stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_201); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_202); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_203); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_204); >@@ -930,36 +938,36 @@ > stringBuffer.append(TEXT_205); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_206); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_207); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_208); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > GenFeature feature = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); > >- stringBuffer.append(TEXT_207); >+ stringBuffer.append(TEXT_209); > stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_208); >+ stringBuffer.append(TEXT_210); > stringBuffer.append(feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_209); >+ stringBuffer.append(TEXT_211); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > >- stringBuffer.append(TEXT_210); >+ stringBuffer.append(TEXT_212); > stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_211); >+ stringBuffer.append(TEXT_213); > stringBuffer.append(next.getFeatureAccessorName()); >- stringBuffer.append(TEXT_212); >+ stringBuffer.append(TEXT_214); > > } > } > >- stringBuffer.append(TEXT_213); >- stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); >- stringBuffer.append(TEXT_214); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_215); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName(genHost.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_216); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_217); >@@ -967,35 +975,51 @@ > stringBuffer.append(TEXT_218); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_219); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_220); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_221); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > GenFeature feature = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); > >- stringBuffer.append(TEXT_220); >+ stringBuffer.append(TEXT_222); > stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_221); >+ stringBuffer.append(TEXT_223); > stringBuffer.append(feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_222); >+ stringBuffer.append(TEXT_224); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > >- stringBuffer.append(TEXT_223); >+ stringBuffer.append(TEXT_225); > stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_224); >+ stringBuffer.append(TEXT_226); > stringBuffer.append(next.getFeatureAccessorName()); >- stringBuffer.append(TEXT_225); >+ stringBuffer.append(TEXT_227); > > } > } > >- stringBuffer.append(TEXT_226); >+ stringBuffer.append(TEXT_228); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_229); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_230); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_231); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_232); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_233); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_234); > > final Viewmap viewmap = genLabel.getViewmap(); > >- stringBuffer.append(TEXT_227); >+ stringBuffer.append(TEXT_235); > > final String figureQualifiedClassName; > if (viewmap instanceof ParentAssignedViewmap) { >@@ -1024,64 +1048,64 @@ > if (viewmap instanceof ParentAssignedViewmap) { > final ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; > >- stringBuffer.append(TEXT_228); >+ stringBuffer.append(TEXT_236); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_229); >+ stringBuffer.append(TEXT_237); > stringBuffer.append((parentAssignedViewmap.getSetterName() == null ? "setLabel" : parentAssignedViewmap.getSetterName())); >- stringBuffer.append(TEXT_230); >+ stringBuffer.append(TEXT_238); > } else { >- stringBuffer.append(TEXT_231); >+ stringBuffer.append(TEXT_239); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_232); >+ stringBuffer.append(TEXT_240); > > if (viewmap instanceof FigureViewmap) { > >- stringBuffer.append(TEXT_233); >+ stringBuffer.append(TEXT_241); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_234); >+ stringBuffer.append(TEXT_242); > } // instanceof FigureViewmap > else if (viewmap instanceof SnippetViewmap) { >- stringBuffer.append(TEXT_235); >+ stringBuffer.append(TEXT_243); > stringBuffer.append(((SnippetViewmap) viewmap).getBody()); >- stringBuffer.append(TEXT_236); >+ stringBuffer.append(TEXT_244); > } // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter > else if (viewmap instanceof InnerClassViewmap) { > >- stringBuffer.append(TEXT_237); >+ stringBuffer.append(TEXT_245); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_238); >+ stringBuffer.append(TEXT_246); > } >- stringBuffer.append(TEXT_239); >+ stringBuffer.append(TEXT_247); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_240); >+ stringBuffer.append(TEXT_248); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_241); >+ stringBuffer.append(TEXT_249); > > if ("org.eclipse.draw2d.Label".equals(figureQualifiedClassName) || viewmap instanceof InnerClassViewmap) { > >- stringBuffer.append(TEXT_242); >+ stringBuffer.append(TEXT_250); > > } else { > >- stringBuffer.append(TEXT_243); >+ stringBuffer.append(TEXT_251); > > } > >- stringBuffer.append(TEXT_244); >+ stringBuffer.append(TEXT_252); > } /*not parent-assigned*/ >- stringBuffer.append(TEXT_245); >+ stringBuffer.append(TEXT_253); > > if (!"org.eclipse.draw2d.Label".equals(figureQualifiedClassName) && viewmap instanceof InnerClassViewmap==false) { > >- stringBuffer.append(TEXT_246); >+ stringBuffer.append(TEXT_254); > > } > >- stringBuffer.append(TEXT_247); >+ stringBuffer.append(TEXT_255); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); >- stringBuffer.append(TEXT_248); >+ stringBuffer.append(TEXT_256); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); >- stringBuffer.append(TEXT_249); >+ stringBuffer.append(TEXT_257); > > String labelSetterName = "setLabel"; // same assumption in NodeEditPart > String labelFigureClassName = "org.eclipse.draw2d.IFigure"; >@@ -1095,43 +1119,43 @@ > } > } // FIXME perhaps, there's no sense to have setLabel for any other viewmap than ParentAssigned? > >- stringBuffer.append(TEXT_250); >+ stringBuffer.append(TEXT_258); > stringBuffer.append(labelSetterName); >- stringBuffer.append(TEXT_251); >+ stringBuffer.append(TEXT_259); > stringBuffer.append(importManager.getImportedName(labelFigureClassName)); >- stringBuffer.append(TEXT_252); >+ stringBuffer.append(TEXT_260); > > if ("org.eclipse.draw2d.Label".equals(labelFigureClassName)) { > >- stringBuffer.append(TEXT_253); >+ stringBuffer.append(TEXT_261); > > } else { > >- stringBuffer.append(TEXT_254); >+ stringBuffer.append(TEXT_262); > > } > >- stringBuffer.append(TEXT_255); >+ stringBuffer.append(TEXT_263); > > if (viewmap instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) viewmap).getClassBody(); > >- stringBuffer.append(TEXT_256); >+ stringBuffer.append(TEXT_264); > stringBuffer.append(classBody); >- stringBuffer.append(TEXT_257); >+ stringBuffer.append(TEXT_265); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_258); >+ stringBuffer.append(TEXT_266); > > } > > > } > >- stringBuffer.append(TEXT_259); >+ stringBuffer.append(TEXT_267); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_260); >+ stringBuffer.append(TEXT_268); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/UpdatableEditPartGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/UpdatableEditPartGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/parts/UpdatableEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/UpdatableEditPartGenerator.java 9 Aug 2006 14:34:54 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,35 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.parts; >- >-import org.eclipse.gmf.common.codegen.*; >- >-public class UpdatableEditPartGenerator >-{ >- protected static String nl; >- public static synchronized UpdatableEditPartGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- UpdatableEditPartGenerator result = new UpdatableEditPartGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL + NL + "import java.util.ArrayList;" + NL + "import java.util.Collection;" + NL + "import java.util.Iterator;" + NL + "" + NL + "import org.eclipse.emf.common.notify.Notification;" + NL + "import org.eclipse.emf.ecore.EStructuralFeature;" + NL + "" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public interface IUpdatableEditPart {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(EStructuralFeature feature, Notification msg);" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic interface Refresher {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void refresh();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic class CompositeRefresher implements Refresher {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void addRefresher(Refresher refresher) {" + NL + "\t\t\trefreshers.add(refresher);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void removeRefresher(Refresher refresher) {" + NL + "\t\t\trefreshers.remove(refresher);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void refresh() {" + NL + "\t\t\tfor(Iterator it = refreshers.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\tRefresher next = (Refresher) it.next();" + NL + "\t\t\t\tnext.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Collection/*<Refresher>*/ refreshers = new ArrayList();" + NL + "\t}" + NL + "}"; >- protected final String TEXT_3 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_1); >- >-importManager.emitPackageStatement(stringBuffer); >- >- stringBuffer.append(TEXT_2); >- stringBuffer.append(TEXT_3); >- return stringBuffer.toString(); >- } >-} >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/ChildNodeEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/ChildNodeEditPartGenerator.java,v >retrieving revision 1.9 >diff -u -r1.9 ChildNodeEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/ChildNodeEditPartGenerator.java 4 Aug 2006 17:05:48 -0000 1.9 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/ChildNodeEditPartGenerator.java 30 Aug 2006 15:22:21 -0000 >@@ -40,275 +40,278 @@ > protected final String TEXT_20 = NL; > protected final String TEXT_21 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class "; > protected final String TEXT_22 = " extends "; >- protected final String TEXT_23 = " implements IUpdatableEditPart {"; >- protected final String TEXT_24 = NL; >- protected final String TEXT_25 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >- protected final String TEXT_26 = ";"; >- protected final String TEXT_27 = NL; >+ protected final String TEXT_23 = " implements "; >+ protected final String TEXT_24 = " {"; >+ protected final String TEXT_25 = NL; >+ protected final String TEXT_26 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = "; >+ protected final String TEXT_27 = ";"; > protected final String TEXT_28 = NL; >- protected final String TEXT_29 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_30 = " manager;" + NL; >- protected final String TEXT_31 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate String defaultText;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_32 = "(View view) {" + NL + "\t\tsetModel(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_33 = " getDiagramNode() {" + NL + "\t\treturn ("; >- protected final String TEXT_34 = ") getModel();" + NL + "\t}" + NL; >- protected final String TEXT_35 = NL; >- protected final String TEXT_36 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >- protected final String TEXT_37 = " view = ("; >- protected final String TEXT_38 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >- protected final String TEXT_39 = " view = ("; >- protected final String TEXT_40 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\t//XXX: install correct edit policies!"; >- protected final String TEXT_41 = NL; >- protected final String TEXT_42 = "\t\tinstallEditPolicy("; >- protected final String TEXT_43 = ".DIRECT_EDIT_ROLE," + NL + "\t\t\t\tnew "; >- protected final String TEXT_44 = "() {" + NL + "\t\t\t\t\tprotected void showCurrentEditValue("; >- protected final String TEXT_45 = " request) {" + NL + "\t\t\t\t\t\tString value = (String) request.getCellEditor().getValue();" + NL + "\t\t\t\t\t\tgetLabel().setText(value);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected "; >- protected final String TEXT_46 = " getDirectEditCommand("; >- protected final String TEXT_47 = " request) {" + NL + "\t\t\t\t\t\tString value = (String) request.getCellEditor().getValue();" + NL + "\t\t\t\t\t\tif (value == null) {" + NL + "\t\t\t\t\t\t\t//Invalid value is transformed into a null by the validator." + NL + "\t\t\t\t\t\t\t//XXX: implement validator" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_48 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tfinal Object[] parseResult;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tparseResult = new "; >- protected final String TEXT_49 = "(EDIT_PATTERN).parse(value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_50 = ".INSTANCE;" + NL + "\t\t\t\t\t\t} catch ("; >- protected final String TEXT_51 = " e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_52 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_53 = " editingDomain = "; >- protected final String TEXT_54 = ".getEditingDomain("; >- protected final String TEXT_55 = ".getDiagram().getElement());"; >- protected final String TEXT_56 = NL + "\t\t\t\t\t\tif (parseResult.length != 1) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_57 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_58 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]);" + NL + "\t\t\t\t\t\treturn new WrappingCommand(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_59 = " createDomainModelCommand("; >- protected final String TEXT_60 = " editingDomain, Object value) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_61 = " element = "; >- protected final String TEXT_62 = ";" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_63 = " feature = ("; >- protected final String TEXT_64 = ") "; >- protected final String TEXT_65 = ".eINSTANCE.get"; >- protected final String TEXT_66 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >- protected final String TEXT_67 = ".parseValue(feature, value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_68 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >- protected final String TEXT_69 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_70 = " result = new "; >- protected final String TEXT_71 = "();" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_72 = " values = new "; >- protected final String TEXT_73 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >- protected final String TEXT_74 = "());" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_75 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_76 = ".create(editingDomain, element, feature, valueToSet));" + NL + "\t\t\t\t\t\treturn result;"; >- protected final String TEXT_77 = NL + "\t\t\t\t\t\treturn "; >- protected final String TEXT_78 = ".create(editingDomain, element, feature, valueToSet);"; >- protected final String TEXT_79 = NL + "\t\t\t\t\t}"; >- protected final String TEXT_80 = NL + "\t\t\t\t\t\tif (parseResult.length != "; >- protected final String TEXT_81 = ") {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_82 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_83 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult);" + NL + "\t\t\t\t\t\treturn new WrappingCommand(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >- protected final String TEXT_84 = " createDomainModelCommand("; >- protected final String TEXT_85 = " editingDomain, Object[] values) {" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_86 = " element = "; >- protected final String TEXT_87 = ";" + NL + "\t\t\t\t\t\t"; >- protected final String TEXT_88 = " result = new "; >- protected final String TEXT_89 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;"; >- protected final String TEXT_90 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_91 = " "; >- protected final String TEXT_92 = "feature = ("; >- protected final String TEXT_93 = ") "; >- protected final String TEXT_94 = ".eINSTANCE.get"; >- protected final String TEXT_95 = "();" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >- protected final String TEXT_96 = ".parseValue(feature, values["; >- protected final String TEXT_97 = "]);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >- protected final String TEXT_98 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >- protected final String TEXT_99 = NL + "\t\t\t\t\t\t"; >- protected final String TEXT_100 = " "; >- protected final String TEXT_101 = "values = new "; >- protected final String TEXT_102 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >- protected final String TEXT_103 = "());" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_104 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_105 = ".create(editingDomain, element, feature, valueToSet));"; >- protected final String TEXT_106 = NL + "\t\t\t\t\t\tresult.append("; >- protected final String TEXT_107 = ".create(editingDomain, element, feature, valueToSet));"; >- protected final String TEXT_108 = NL + "\t\t\t\t\t\treturn result;" + NL + "\t\t\t\t\t}"; >- protected final String TEXT_109 = NL + "\t\t\t\t});"; >- protected final String TEXT_110 = NL; >- protected final String TEXT_111 = "\t\tinstallEditPolicy("; >- protected final String TEXT_112 = ".COMPONENT_ROLE, new "; >- protected final String TEXT_113 = "() {" + NL + "\t\t\tprotected "; >- protected final String TEXT_114 = " createDeleteCommand("; >- protected final String TEXT_115 = " deleteRequest) {" + NL + "\t\t\t\t"; >- protected final String TEXT_116 = " editingDomain = "; >- protected final String TEXT_117 = ".getEditingDomain(getDiagramNode().getDiagram().getElement());" + NL + "\t\t\t\t"; >- protected final String TEXT_118 = " cc = new "; >- protected final String TEXT_119 = "();" + NL + "\t\t\t\tcc.append(getDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append("; >- protected final String TEXT_120 = ".create(editingDomain, getDiagramNode()));" + NL + "\t\t\t\treturn new WrappingCommand(editingDomain, cc);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tprivate org.eclipse.emf.common.command.Command getDomainModelRemoveCommand("; >- protected final String TEXT_121 = " editingDomain) {"; >- protected final String TEXT_122 = NL + "\t\t\t\t"; >- protected final String TEXT_123 = " result = new "; >- protected final String TEXT_124 = "();"; >- protected final String TEXT_125 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_126 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_127 = ".eINSTANCE.get"; >- protected final String TEXT_128 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >+ protected final String TEXT_29 = NL; >+ protected final String TEXT_30 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_31 = " manager;" + NL; >+ protected final String TEXT_32 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate String defaultText;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_33 = "(View view) {" + NL + "\t\tsetModel(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_34 = " getDiagramNode() {" + NL + "\t\treturn ("; >+ protected final String TEXT_35 = ") getModel();" + NL + "\t}" + NL; >+ protected final String TEXT_36 = NL; >+ protected final String TEXT_37 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t"; >+ protected final String TEXT_38 = " view = ("; >+ protected final String TEXT_39 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t"; >+ protected final String TEXT_40 = " view = ("; >+ protected final String TEXT_41 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\t//XXX: install correct edit policies!"; >+ protected final String TEXT_42 = NL; >+ protected final String TEXT_43 = "\t\tinstallEditPolicy("; >+ protected final String TEXT_44 = ".DIRECT_EDIT_ROLE," + NL + "\t\t\t\tnew "; >+ protected final String TEXT_45 = "() {" + NL + "\t\t\t\t\tprotected void showCurrentEditValue("; >+ protected final String TEXT_46 = " request) {" + NL + "\t\t\t\t\t\tString value = (String) request.getCellEditor().getValue();" + NL + "\t\t\t\t\t\tgetLabel().setText(value);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected "; >+ protected final String TEXT_47 = " getDirectEditCommand("; >+ protected final String TEXT_48 = " request) {" + NL + "\t\t\t\t\t\tString value = (String) request.getCellEditor().getValue();" + NL + "\t\t\t\t\t\tif (value == null) {" + NL + "\t\t\t\t\t\t\t//Invalid value is transformed into a null by the validator." + NL + "\t\t\t\t\t\t\t//XXX: implement validator" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_49 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tfinal Object[] parseResult;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tparseResult = new "; >+ protected final String TEXT_50 = "(EDIT_PATTERN).parse(value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_51 = ".INSTANCE;" + NL + "\t\t\t\t\t\t} catch ("; >+ protected final String TEXT_52 = " e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_53 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_54 = " editingDomain = "; >+ protected final String TEXT_55 = ".getEditingDomain("; >+ protected final String TEXT_56 = ".getDiagram().getElement());"; >+ protected final String TEXT_57 = NL + "\t\t\t\t\t\tif (parseResult.length != 1) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_58 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_59 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult[0]);" + NL + "\t\t\t\t\t\treturn new "; >+ protected final String TEXT_60 = "(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_61 = " createDomainModelCommand("; >+ protected final String TEXT_62 = " editingDomain, Object value) {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_63 = " element = "; >+ protected final String TEXT_64 = ";" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_65 = " feature = ("; >+ protected final String TEXT_66 = ") "; >+ protected final String TEXT_67 = ".eINSTANCE.get"; >+ protected final String TEXT_68 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >+ protected final String TEXT_69 = ".parseValue(feature, value);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_70 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >+ protected final String TEXT_71 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_72 = " result = new "; >+ protected final String TEXT_73 = "();" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_74 = " values = new "; >+ protected final String TEXT_75 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >+ protected final String TEXT_76 = "());" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_77 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_78 = ".create(editingDomain, element, feature, valueToSet));" + NL + "\t\t\t\t\t\treturn result;"; >+ protected final String TEXT_79 = NL + "\t\t\t\t\t\treturn "; >+ protected final String TEXT_80 = ".create(editingDomain, element, feature, valueToSet);"; >+ protected final String TEXT_81 = NL + "\t\t\t\t\t}"; >+ protected final String TEXT_82 = NL + "\t\t\t\t\t\tif (parseResult.length != "; >+ protected final String TEXT_83 = ") {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_84 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_85 = " domainModelCommand = createDomainModelCommand(editingDomain, parseResult);" + NL + "\t\t\t\t\t\treturn new "; >+ protected final String TEXT_86 = "(editingDomain, domainModelCommand);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_87 = " createDomainModelCommand("; >+ protected final String TEXT_88 = " editingDomain, Object[] values) {" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_89 = " element = "; >+ protected final String TEXT_90 = ";" + NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_91 = " result = new "; >+ protected final String TEXT_92 = "();" + NL + "\t\t\t\t\t\tObject valueToSet;"; >+ protected final String TEXT_93 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_94 = " "; >+ protected final String TEXT_95 = "feature = ("; >+ protected final String TEXT_96 = ") "; >+ protected final String TEXT_97 = ".eINSTANCE.get"; >+ protected final String TEXT_98 = "();" + NL + "\t\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t\tvalueToSet = "; >+ protected final String TEXT_99 = ".parseValue(feature, values["; >+ protected final String TEXT_100 = "]);" + NL + "\t\t\t\t\t\t} catch (IllegalArgumentException e) {" + NL + "\t\t\t\t\t\t\treturn "; >+ protected final String TEXT_101 = ".INSTANCE;" + NL + "\t\t\t\t\t\t}"; >+ protected final String TEXT_102 = NL + "\t\t\t\t\t\t"; >+ protected final String TEXT_103 = " "; >+ protected final String TEXT_104 = "values = new "; >+ protected final String TEXT_105 = "();" + NL + "\t\t\t\t\t\tvalues.addAll(element.get"; >+ protected final String TEXT_106 = "());" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_107 = ".create(editingDomain, element, feature, values));" + NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_108 = ".create(editingDomain, element, feature, valueToSet));"; >+ protected final String TEXT_109 = NL + "\t\t\t\t\t\tresult.append("; >+ protected final String TEXT_110 = ".create(editingDomain, element, feature, valueToSet));"; >+ protected final String TEXT_111 = NL + "\t\t\t\t\t\treturn result;" + NL + "\t\t\t\t\t}"; >+ protected final String TEXT_112 = NL + "\t\t\t\t});"; >+ protected final String TEXT_113 = NL; >+ protected final String TEXT_114 = "\t\tinstallEditPolicy("; >+ protected final String TEXT_115 = ".COMPONENT_ROLE, new "; >+ protected final String TEXT_116 = "() {" + NL + "\t\t\tprotected "; >+ protected final String TEXT_117 = " createDeleteCommand("; >+ protected final String TEXT_118 = " deleteRequest) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_119 = " editingDomain = "; >+ protected final String TEXT_120 = ".getEditingDomain(getDiagramNode().getDiagram().getElement());" + NL + "\t\t\t\t"; >+ protected final String TEXT_121 = " cc = new "; >+ protected final String TEXT_122 = "();" + NL + "\t\t\t\tcc.append(getDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append("; >+ protected final String TEXT_123 = ".create(editingDomain, getDiagramNode()));" + NL + "\t\t\t\treturn new "; >+ protected final String TEXT_124 = "(editingDomain, cc);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tprivate org.eclipse.emf.common.command.Command getDomainModelRemoveCommand("; >+ protected final String TEXT_125 = " editingDomain) {"; >+ protected final String TEXT_126 = NL + "\t\t\t\t"; >+ protected final String TEXT_127 = " result = new "; >+ protected final String TEXT_128 = "();"; > protected final String TEXT_129 = NL + "\t\t\t\tresult.append("; > protected final String TEXT_130 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; > protected final String TEXT_131 = ".eINSTANCE.get"; >- protected final String TEXT_132 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_133 = ".UNSET_VALUE));"; >- protected final String TEXT_134 = NL + "\t\t\t\tresult.append("; >- protected final String TEXT_135 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_136 = ".eINSTANCE.get"; >- protected final String TEXT_137 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >+ protected final String TEXT_132 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >+ protected final String TEXT_133 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_134 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_135 = ".eINSTANCE.get"; >+ protected final String TEXT_136 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_137 = ".UNSET_VALUE));"; > protected final String TEXT_138 = NL + "\t\t\t\tresult.append("; > protected final String TEXT_139 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; > protected final String TEXT_140 = ".eINSTANCE.get"; >- protected final String TEXT_141 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_142 = ".UNSET_VALUE));"; >- protected final String TEXT_143 = NL + "\t\t\t\treturn result;"; >- protected final String TEXT_144 = NL + "\t\t\t\treturn "; >- protected final String TEXT_145 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >- protected final String TEXT_146 = ".eINSTANCE.get"; >- protected final String TEXT_147 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement());"; >+ protected final String TEXT_141 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));"; >+ protected final String TEXT_142 = NL + "\t\t\t\tresult.append("; >+ protected final String TEXT_143 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_144 = ".eINSTANCE.get"; >+ protected final String TEXT_145 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_146 = ".UNSET_VALUE));"; >+ protected final String TEXT_147 = NL + "\t\t\t\treturn result;"; > protected final String TEXT_148 = NL + "\t\t\t\treturn "; > protected final String TEXT_149 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; > protected final String TEXT_150 = ".eINSTANCE.get"; >- protected final String TEXT_151 = "()," + NL + "\t\t\t\t\t"; >- protected final String TEXT_152 = ".UNSET_VALUE);"; >- protected final String TEXT_153 = NL + "\t\t\t}" + NL + "\t\t});"; >- protected final String TEXT_154 = NL + "\t}" + NL; >- protected final String TEXT_155 = NL; >- protected final String TEXT_156 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >- protected final String TEXT_157 = " req) {" + NL + "\t\tif ("; >- protected final String TEXT_158 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(req);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_159 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tmanager = new "; >- protected final String TEXT_160 = "(this, "; >- protected final String TEXT_161 = ".class, new "; >- protected final String TEXT_162 = "() {" + NL + "\t\t\t\tpublic void relocate("; >- protected final String TEXT_163 = " celleditor) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_164 = " rect = getLabel().getTextBounds();" + NL + "\t\t\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "\t\t\t\t\tcelleditor.getControl().setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t}) {" + NL + "\t\t\t\tprotected void initCellEditor() {" + NL + "\t\t\t\t\tgetCellEditor().setValue(getLabelEditText());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL; >- protected final String TEXT_165 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn ((View)getModel()).getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelSourceConnections() {" + NL + "\t\treturn ((View)getModel()).getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelTargetConnections() {" + NL + "\t\treturn ((View)getModel()).getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tgetLabel().setText(getLabelText());" + NL + "\t\tgetLabel().setIcon(getLabelIcon());" + NL + "\t}"; >- protected final String TEXT_166 = NL; >- protected final String TEXT_167 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String VIEW_PATTERN = \""; >- protected final String TEXT_168 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String EDIT_PATTERN = \""; >- protected final String TEXT_169 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t"; >- protected final String TEXT_170 = " element = "; >- protected final String TEXT_171 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, VIEW_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelEditText() {" + NL + "\t\t"; >- protected final String TEXT_172 = " element = "; >- protected final String TEXT_173 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, EDIT_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String buildTextByPattern("; >- protected final String TEXT_174 = " element, String pattern) {"; >- protected final String TEXT_175 = NL + "\t\tif ("; >- protected final String TEXT_176 = " == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}"; >- protected final String TEXT_177 = NL + "\t\treturn "; >- protected final String TEXT_178 = ".format(pattern, new Object[] {"; >- protected final String TEXT_179 = NL + "\t\t\tnew "; >- protected final String TEXT_180 = "("; >- protected final String TEXT_181 = ")"; >- protected final String TEXT_182 = NL + "\t\t});"; >- protected final String TEXT_183 = NL + "\t\treturn "; >- protected final String TEXT_184 = ".format(pattern, new Object[] {"; >- protected final String TEXT_185 = NL + "\t\t\tnew "; >- protected final String TEXT_186 = "("; >- protected final String TEXT_187 = ")"; >- protected final String TEXT_188 = ","; >- protected final String TEXT_189 = NL + "\t\t});"; >- protected final String TEXT_190 = NL + "\t\t//XXX: unexpected model facet." + NL + "\t\treturn defaultText;"; >- protected final String TEXT_191 = NL + "\t}"; >- protected final String TEXT_192 = NL; >- protected final String TEXT_193 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >- protected final String TEXT_194 = NL + "\t\t"; >- protected final String TEXT_195 = " style =" + NL + "\t\t\t("; >- protected final String TEXT_196 = ") "; >- protected final String TEXT_197 = ".getStyle(" + NL + "\t\t\t\t"; >- protected final String TEXT_198 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_199 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >- protected final String TEXT_200 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_201 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_202 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_203 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >- protected final String TEXT_204 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >- protected final String TEXT_205 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >- protected final String TEXT_206 = "\t" + NL + "\t}"; >- protected final String TEXT_207 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_208 = " createdFont;"; >- protected final String TEXT_209 = "\t"; >- protected final String TEXT_210 = NL; >- protected final String TEXT_211 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFontColor() {" + NL + "\t\t"; >- protected final String TEXT_212 = " style = ("; >- protected final String TEXT_213 = ") "; >- protected final String TEXT_214 = ".getStyle("; >- protected final String TEXT_215 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_216 = " toDispose = createdFontColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint fontColor = style.getFontColor();" + NL + "\t\t\tint red = fontColor & 0x000000FF;" + NL + "\t\t\tint green = (fontColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (fontColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_217 = " currentColor = getLabel().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFontColor = new "; >- protected final String TEXT_218 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdFontColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedFontColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshFontColor()}) currently assigned to the label." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_219 = " createdFontColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_220 = " getLabelIcon() {"; >- protected final String TEXT_221 = NL + "\t\t"; >- protected final String TEXT_222 = " imageDescriptor = "; >- protected final String TEXT_223 = ".getInstance().getItemImageDescriptor(getDiagramNode().getElement());" + NL + "\t\tif (imageDescriptor != null) {" + NL + "\t\t\treturn imageDescriptor.createImage();" + NL + "\t\t}"; >- protected final String TEXT_224 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; >- protected final String TEXT_225 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >- protected final String TEXT_226 = NL; >- protected final String TEXT_227 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >- protected final String TEXT_228 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_229 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >- protected final String TEXT_230 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_231 = NL; >- protected final String TEXT_232 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_233 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_234 = " feature, "; >- protected final String TEXT_235 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >- protected final String TEXT_236 = NL; >- protected final String TEXT_237 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_238 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_239 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >- protected final String TEXT_240 = NL; >- protected final String TEXT_241 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_242 = ".eINSTANCE.getView_Visible(), visibilityRefresher);" + NL + "\t\tRefresher labelRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshLabel();" + NL + "\t\t\t}" + NL + "\t\t};"; >- protected final String TEXT_243 = NL + "\t\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_244 = ".eINSTANCE.get"; >- protected final String TEXT_245 = "(), labelRefresher);"; >+ protected final String TEXT_151 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement());"; >+ protected final String TEXT_152 = NL + "\t\t\t\treturn "; >+ protected final String TEXT_153 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), "; >+ protected final String TEXT_154 = ".eINSTANCE.get"; >+ protected final String TEXT_155 = "()," + NL + "\t\t\t\t\t"; >+ protected final String TEXT_156 = ".UNSET_VALUE);"; >+ protected final String TEXT_157 = NL + "\t\t\t}" + NL + "\t\t});"; >+ protected final String TEXT_158 = NL + "\t}" + NL; >+ protected final String TEXT_159 = NL; >+ protected final String TEXT_160 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; >+ protected final String TEXT_161 = " req) {" + NL + "\t\tif ("; >+ protected final String TEXT_162 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(req);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_163 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tmanager = new "; >+ protected final String TEXT_164 = "(this, "; >+ protected final String TEXT_165 = ".class, new "; >+ protected final String TEXT_166 = "() {" + NL + "\t\t\t\tpublic void relocate("; >+ protected final String TEXT_167 = " celleditor) {" + NL + "\t\t\t\t\t"; >+ protected final String TEXT_168 = " rect = getLabel().getTextBounds();" + NL + "\t\t\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "\t\t\t\t\tcelleditor.getControl().setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t}) {" + NL + "\t\t\t\tprotected void initCellEditor() {" + NL + "\t\t\t\t\tgetCellEditor().setValue(getLabelEditText());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL; >+ protected final String TEXT_169 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn ((View)getModel()).getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelSourceConnections() {" + NL + "\t\treturn ((View)getModel()).getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelTargetConnections() {" + NL + "\t\treturn ((View)getModel()).getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tgetLabel().setText(getLabelText());" + NL + "\t\tgetLabel().setIcon(getLabelIcon());" + NL + "\t}"; >+ protected final String TEXT_170 = NL; >+ protected final String TEXT_171 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String VIEW_PATTERN = \""; >+ protected final String TEXT_172 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final String EDIT_PATTERN = \""; >+ protected final String TEXT_173 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t"; >+ protected final String TEXT_174 = " element = "; >+ protected final String TEXT_175 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, VIEW_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelEditText() {" + NL + "\t\t"; >+ protected final String TEXT_176 = " element = "; >+ protected final String TEXT_177 = ";" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}" + NL + "\t\treturn buildTextByPattern(element, EDIT_PATTERN);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String buildTextByPattern("; >+ protected final String TEXT_178 = " element, String pattern) {"; >+ protected final String TEXT_179 = NL + "\t\tif ("; >+ protected final String TEXT_180 = " == null) {" + NL + "\t\t\treturn defaultText;" + NL + "\t\t}"; >+ protected final String TEXT_181 = NL + "\t\treturn "; >+ protected final String TEXT_182 = ".format(pattern, new Object[] {"; >+ protected final String TEXT_183 = NL + "\t\t\tnew "; >+ protected final String TEXT_184 = "("; >+ protected final String TEXT_185 = ")"; >+ protected final String TEXT_186 = NL + "\t\t});"; >+ protected final String TEXT_187 = NL + "\t\treturn "; >+ protected final String TEXT_188 = ".format(pattern, new Object[] {"; >+ protected final String TEXT_189 = NL + "\t\t\tnew "; >+ protected final String TEXT_190 = "("; >+ protected final String TEXT_191 = ")"; >+ protected final String TEXT_192 = ","; >+ protected final String TEXT_193 = NL + "\t\t});"; >+ protected final String TEXT_194 = NL + "\t\t//XXX: unexpected model facet." + NL + "\t\treturn defaultText;"; >+ protected final String TEXT_195 = NL + "\t}"; >+ protected final String TEXT_196 = NL; >+ protected final String TEXT_197 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {"; >+ protected final String TEXT_198 = NL + "\t\t"; >+ protected final String TEXT_199 = " style =" + NL + "\t\t\t("; >+ protected final String TEXT_200 = ") "; >+ protected final String TEXT_201 = ".getStyle(" + NL + "\t\t\t\t"; >+ protected final String TEXT_202 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_203 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >+ protected final String TEXT_204 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_205 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_206 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_207 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_208 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >+ protected final String TEXT_209 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}"; >+ protected final String TEXT_210 = "\t" + NL + "\t}"; >+ protected final String TEXT_211 = NL + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_212 = " createdFont;"; >+ protected final String TEXT_213 = "\t"; >+ protected final String TEXT_214 = NL; >+ protected final String TEXT_215 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFontColor() {" + NL + "\t\t"; >+ protected final String TEXT_216 = " style = ("; >+ protected final String TEXT_217 = ") "; >+ protected final String TEXT_218 = ".getStyle("; >+ protected final String TEXT_219 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_220 = " toDispose = createdFontColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint fontColor = style.getFontColor();" + NL + "\t\t\tint red = fontColor & 0x000000FF;" + NL + "\t\t\tint green = (fontColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (fontColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_221 = " currentColor = getLabel().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFontColor = new "; >+ protected final String TEXT_222 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdFontColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedFontColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshFontColor()}) currently assigned to the label." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_223 = " createdFontColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_224 = " getLabelIcon() {"; >+ protected final String TEXT_225 = NL + "\t\t"; >+ protected final String TEXT_226 = " imageDescriptor = "; >+ protected final String TEXT_227 = ".getInstance().getItemImageDescriptor(getDiagramNode().getElement());" + NL + "\t\tif (imageDescriptor != null) {" + NL + "\t\t\treturn imageDescriptor.createImage();" + NL + "\t\t}"; >+ protected final String TEXT_228 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; >+ protected final String TEXT_229 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >+ protected final String TEXT_230 = NL; >+ protected final String TEXT_231 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_232 = " domainModelRefresher = new "; >+ protected final String TEXT_233 = "(this);" + NL; >+ protected final String TEXT_234 = NL; >+ protected final String TEXT_235 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_236 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_237 = " feature, "; >+ protected final String TEXT_238 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >+ protected final String TEXT_239 = NL; >+ protected final String TEXT_240 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_241 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_242 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >+ protected final String TEXT_243 = NL; >+ protected final String TEXT_244 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_245 = ".eINSTANCE.getView_Visible(), visibilityRefresher);" + NL + "\t\tRefresher labelRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshLabel();" + NL + "\t\t\t}" + NL + "\t\t};"; > protected final String TEXT_246 = NL + "\t\t\tstructuralFeatures2Refresher.put("; > protected final String TEXT_247 = ".eINSTANCE.get"; > protected final String TEXT_248 = "(), labelRefresher);"; >- protected final String TEXT_249 = NL; >- protected final String TEXT_250 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_251 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_252 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_253 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_254 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; >- protected final String TEXT_255 = NL; >- protected final String TEXT_256 = "\t\tRefresher fontColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFontColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_257 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t}" + NL; >+ protected final String TEXT_249 = NL + "\t\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_250 = ".eINSTANCE.get"; >+ protected final String TEXT_251 = "(), labelRefresher);"; >+ protected final String TEXT_252 = NL; >+ protected final String TEXT_253 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_254 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_255 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_256 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_257 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; > protected final String TEXT_258 = NL; >- protected final String TEXT_259 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_260 = " createFigure() {" + NL + "\t\t// Parent should assign one using "; >- protected final String TEXT_261 = " method" + NL + "\t\treturn null;" + NL + "\t}"; >- protected final String TEXT_262 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_263 = " createLabel() {"; >- protected final String TEXT_264 = NL + "\t\treturn new "; >- protected final String TEXT_265 = "();"; >- protected final String TEXT_266 = NL + "\t\treturn "; >- protected final String TEXT_267 = ";"; >- protected final String TEXT_268 = NL + "\t\treturn new "; >- protected final String TEXT_269 = "();"; >- protected final String TEXT_270 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_271 = " createFigure() {" + NL + "\t\t"; >- protected final String TEXT_272 = " label = createLabel();"; >- protected final String TEXT_273 = NL + "\t\tdefaultText = label.getText();"; >- protected final String TEXT_274 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >- protected final String TEXT_275 = NL + "\t\treturn label;" + NL + "\t}"; >- protected final String TEXT_276 = NL + NL + "\t/**"; >- protected final String TEXT_277 = NL + "\t * TODO: reimplement, since the figure used by this editpart is not a Label."; >- protected final String TEXT_278 = NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_279 = " getLabel() {" + NL + "\t\treturn ("; >- protected final String TEXT_280 = ") getFigure();" + NL + "\t}" + NL; >- protected final String TEXT_281 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void "; >- protected final String TEXT_282 = "("; >- protected final String TEXT_283 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);"; >- protected final String TEXT_284 = NL + "\t\tdefaultText = figure.getText();"; >- protected final String TEXT_285 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >- protected final String TEXT_286 = NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL; >- protected final String TEXT_287 = NL; >- protected final String TEXT_288 = NL; >- protected final String TEXT_289 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_290 = NL + "}"; >+ protected final String TEXT_259 = "\t\tRefresher fontColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFontColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_260 = ".eINSTANCE.getFontStyle_FontColor(), fontColorRefresher);" + NL + "\t}" + NL; >+ protected final String TEXT_261 = NL; >+ protected final String TEXT_262 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_263 = " createFigure() {" + NL + "\t\t// Parent should assign one using "; >+ protected final String TEXT_264 = " method" + NL + "\t\treturn null;" + NL + "\t}"; >+ protected final String TEXT_265 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_266 = " createLabel() {"; >+ protected final String TEXT_267 = NL + "\t\treturn new "; >+ protected final String TEXT_268 = "();"; >+ protected final String TEXT_269 = NL + "\t\treturn "; >+ protected final String TEXT_270 = ";"; >+ protected final String TEXT_271 = NL + "\t\treturn new "; >+ protected final String TEXT_272 = "();"; >+ protected final String TEXT_273 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_274 = " createFigure() {" + NL + "\t\t"; >+ protected final String TEXT_275 = " label = createLabel();"; >+ protected final String TEXT_276 = NL + "\t\tdefaultText = label.getText();"; >+ protected final String TEXT_277 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >+ protected final String TEXT_278 = NL + "\t\treturn label;" + NL + "\t}"; >+ protected final String TEXT_279 = NL + NL + "\t/**"; >+ protected final String TEXT_280 = NL + "\t * TODO: reimplement, since the figure used by this editpart is not a Label."; >+ protected final String TEXT_281 = NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_282 = " getLabel() {" + NL + "\t\treturn ("; >+ protected final String TEXT_283 = ") getFigure();" + NL + "\t}" + NL; >+ protected final String TEXT_284 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void "; >+ protected final String TEXT_285 = "("; >+ protected final String TEXT_286 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);"; >+ protected final String TEXT_287 = NL + "\t\tdefaultText = figure.getText();"; >+ protected final String TEXT_288 = NL + "\t\tdefaultText = \"\";\t//$NON-NLS-1$"; >+ protected final String TEXT_289 = NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL; >+ protected final String TEXT_290 = NL; > protected final String TEXT_291 = NL; >+ protected final String TEXT_292 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_293 = NL + "}"; >+ protected final String TEXT_294 = NL; > > public String generate(Object argument) > { >@@ -423,34 +426,34 @@ > stringBuffer.append(TEXT_22); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")); > stringBuffer.append(TEXT_23); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); >+ stringBuffer.append(TEXT_24); > { > GenCommonBase genCommonBase = genChildNode; >- stringBuffer.append(TEXT_24); > stringBuffer.append(TEXT_25); >- stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_26); >- } >+ stringBuffer.append(genCommonBase.getVisualID()); > stringBuffer.append(TEXT_27); >+ } > stringBuffer.append(TEXT_28); >+ stringBuffer.append(TEXT_29); > > if (!isReadOnly) { > >- stringBuffer.append(TEXT_29); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); > stringBuffer.append(TEXT_30); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >+ stringBuffer.append(TEXT_31); > > } > >- stringBuffer.append(TEXT_31); >- stringBuffer.append(genChildNode.getEditPartClassName()); > stringBuffer.append(TEXT_32); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); >+ stringBuffer.append(genChildNode.getEditPartClassName()); > stringBuffer.append(TEXT_33); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_34); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_35); > stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_37); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_38); >@@ -458,6 +461,8 @@ > stringBuffer.append(TEXT_39); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_40); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(TEXT_41); > > String resolvedSemanticElement = "(" + importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()) + ") getDiagramNode().getElement()"; > final String primaryView = "getDiagramNode()"; >@@ -465,199 +470,205 @@ > > if (!isReadOnly) { > >- stringBuffer.append(TEXT_41); > stringBuffer.append(TEXT_42); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_43); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.DirectEditPolicy")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); > stringBuffer.append(TEXT_44); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.DirectEditPolicy")); > stringBuffer.append(TEXT_45); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_46); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >+ stringBuffer.append(TEXT_46); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); > stringBuffer.append(TEXT_47); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_48); >- stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_49); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(TEXT_49); >+ stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); > stringBuffer.append(TEXT_50); >- stringBuffer.append(importManager.getImportedName("java.text.ParseException")); >- stringBuffer.append(TEXT_51); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >+ stringBuffer.append(TEXT_51); >+ stringBuffer.append(importManager.getImportedName("java.text.ParseException")); > stringBuffer.append(TEXT_52); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_53); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_54); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); > stringBuffer.append(TEXT_55); >+ stringBuffer.append(primaryView); >+ stringBuffer.append(TEXT_56); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > GenFeature featureToSet = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); > EStructuralFeature ecoreFeature = featureToSet.getEcoreFeature(); > >- stringBuffer.append(TEXT_56); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_57); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); > stringBuffer.append(TEXT_58); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_59); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); > stringBuffer.append(TEXT_60); >- stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); > stringBuffer.append(TEXT_61); >- stringBuffer.append(resolvedSemanticElement); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_62); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >+ stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); > stringBuffer.append(TEXT_63); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >+ stringBuffer.append(resolvedSemanticElement); > stringBuffer.append(TEXT_64); >- stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_65); >- stringBuffer.append(featureToSet.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); > stringBuffer.append(TEXT_66); >- stringBuffer.append(importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_67); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(featureToSet.getFeatureAccessorName()); > stringBuffer.append(TEXT_68); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); >+ stringBuffer.append(TEXT_69); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(TEXT_70); > > if (ecoreFeature.isMany()) { > >- stringBuffer.append(TEXT_69); >+ stringBuffer.append(TEXT_71); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_70); >+ stringBuffer.append(TEXT_72); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_71); >+ stringBuffer.append(TEXT_73); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); >- stringBuffer.append(TEXT_72); >+ stringBuffer.append(TEXT_74); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); >- stringBuffer.append(TEXT_73); >+ stringBuffer.append(TEXT_75); > stringBuffer.append(featureToSet.getAccessorName()); >- stringBuffer.append(TEXT_74); >+ stringBuffer.append(TEXT_76); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_75); >+ stringBuffer.append(TEXT_77); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_76); >+ stringBuffer.append(TEXT_78); > > } else { > >- stringBuffer.append(TEXT_77); >+ stringBuffer.append(TEXT_79); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_78); >+ stringBuffer.append(TEXT_80); > > } > >- stringBuffer.append(TEXT_79); >+ stringBuffer.append(TEXT_81); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); > >- stringBuffer.append(TEXT_80); >+ stringBuffer.append(TEXT_82); > stringBuffer.append(metaFeatures.size()); >- stringBuffer.append(TEXT_81); >+ stringBuffer.append(TEXT_83); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); >- stringBuffer.append(TEXT_82); >+ stringBuffer.append(TEXT_84); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_83); >+ stringBuffer.append(TEXT_85); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_86); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); >- stringBuffer.append(TEXT_84); >+ stringBuffer.append(TEXT_87); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_85); >+ stringBuffer.append(TEXT_88); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_86); >+ stringBuffer.append(TEXT_89); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_87); >+ stringBuffer.append(TEXT_90); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_88); >+ stringBuffer.append(TEXT_91); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_89); >+ stringBuffer.append(TEXT_92); > > boolean haveDeclaredValues = false; > for(int i = 0; i < metaFeatures.size(); i++) { > GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); > EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); > >- stringBuffer.append(TEXT_90); >+ stringBuffer.append(TEXT_93); > if (i == 0) { > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >- stringBuffer.append(TEXT_91); >+ stringBuffer.append(TEXT_94); > } >- stringBuffer.append(TEXT_92); >+ stringBuffer.append(TEXT_95); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); >- stringBuffer.append(TEXT_93); >+ stringBuffer.append(TEXT_96); > stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_94); >+ stringBuffer.append(TEXT_97); > stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); >- stringBuffer.append(TEXT_95); >- stringBuffer.append(importManager.getImportedName(genDiagram.getAbstractParserQualifiedClassName())); >- stringBuffer.append(TEXT_96); >+ stringBuffer.append(TEXT_98); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); >+ stringBuffer.append(TEXT_99); > stringBuffer.append(i); >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_100); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >- stringBuffer.append(TEXT_98); >+ stringBuffer.append(TEXT_101); > > if (nextEcoreFeature.isMany()) { > >- stringBuffer.append(TEXT_99); >+ stringBuffer.append(TEXT_102); > if (!haveDeclaredValues) { haveDeclaredValues = true; > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); >- stringBuffer.append(TEXT_100); >+ stringBuffer.append(TEXT_103); > } >- stringBuffer.append(TEXT_101); >+ stringBuffer.append(TEXT_104); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); >- stringBuffer.append(TEXT_102); >+ stringBuffer.append(TEXT_105); > stringBuffer.append(nextFeatureToSet.getAccessorName()); >- stringBuffer.append(TEXT_103); >+ stringBuffer.append(TEXT_106); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_104); >+ stringBuffer.append(TEXT_107); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); >- stringBuffer.append(TEXT_105); >+ stringBuffer.append(TEXT_108); > > } else { > >- stringBuffer.append(TEXT_106); >+ stringBuffer.append(TEXT_109); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_107); >+ stringBuffer.append(TEXT_110); > > } > > > } > >- stringBuffer.append(TEXT_108); >+ stringBuffer.append(TEXT_111); > > } > >- stringBuffer.append(TEXT_109); >+ stringBuffer.append(TEXT_112); > > } > >- stringBuffer.append(TEXT_110); >- stringBuffer.append(TEXT_111); >+ stringBuffer.append(TEXT_113); >+ stringBuffer.append(TEXT_114); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); >- stringBuffer.append(TEXT_112); >+ stringBuffer.append(TEXT_115); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); >- stringBuffer.append(TEXT_113); >+ stringBuffer.append(TEXT_116); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_114); >+ stringBuffer.append(TEXT_117); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); >- stringBuffer.append(TEXT_115); >+ stringBuffer.append(TEXT_118); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_116); >+ stringBuffer.append(TEXT_119); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_117); >+ stringBuffer.append(TEXT_120); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_118); >+ stringBuffer.append(TEXT_121); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_119); >+ stringBuffer.append(TEXT_122); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_120); >+ stringBuffer.append(TEXT_123); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); >+ stringBuffer.append(TEXT_124); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_121); >+ stringBuffer.append(TEXT_125); > > { > TypeModelFacet facet = genNode.getModelFacet(); >@@ -665,120 +676,120 @@ > GenFeature containmentFeature = facet.getContainmentMetaFeature(); > if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { > >- stringBuffer.append(TEXT_122); >+ stringBuffer.append(TEXT_126); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_123); >+ stringBuffer.append(TEXT_127); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); >- stringBuffer.append(TEXT_124); >+ stringBuffer.append(TEXT_128); > > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_125); >+ stringBuffer.append(TEXT_129); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_126); >+ stringBuffer.append(TEXT_130); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_127); >+ stringBuffer.append(TEXT_131); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_128); >+ stringBuffer.append(TEXT_132); > > } else { > >- stringBuffer.append(TEXT_129); >+ stringBuffer.append(TEXT_133); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_130); >+ stringBuffer.append(TEXT_134); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_131); >+ stringBuffer.append(TEXT_135); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_132); >+ stringBuffer.append(TEXT_136); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_133); >+ stringBuffer.append(TEXT_137); > > } > > > if (childFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_134); >+ stringBuffer.append(TEXT_138); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_135); >+ stringBuffer.append(TEXT_139); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_136); >+ stringBuffer.append(TEXT_140); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_137); >+ stringBuffer.append(TEXT_141); > > } else { > >- stringBuffer.append(TEXT_138); >+ stringBuffer.append(TEXT_142); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_139); >+ stringBuffer.append(TEXT_143); > stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_140); >+ stringBuffer.append(TEXT_144); > stringBuffer.append(childFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_141); >+ stringBuffer.append(TEXT_145); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_142); >+ stringBuffer.append(TEXT_146); > > } > >- stringBuffer.append(TEXT_143); >+ stringBuffer.append(TEXT_147); > > } else { > if (containmentFeature.getEcoreFeature().isMany()) { > >- stringBuffer.append(TEXT_144); >+ stringBuffer.append(TEXT_148); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); >- stringBuffer.append(TEXT_145); >+ stringBuffer.append(TEXT_149); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_146); >+ stringBuffer.append(TEXT_150); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_147); >+ stringBuffer.append(TEXT_151); > > } else { > >- stringBuffer.append(TEXT_148); >+ stringBuffer.append(TEXT_152); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_149); >+ stringBuffer.append(TEXT_153); > stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_150); >+ stringBuffer.append(TEXT_154); > stringBuffer.append(containmentFeature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_151); >+ stringBuffer.append(TEXT_155); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); >- stringBuffer.append(TEXT_152); >+ stringBuffer.append(TEXT_156); > > } > } > >- stringBuffer.append(TEXT_153); >+ stringBuffer.append(TEXT_157); > > } /*restrict local vars used in component edit policy*/ > >- stringBuffer.append(TEXT_154); >+ stringBuffer.append(TEXT_158); > > if (!isReadOnly) { > >- stringBuffer.append(TEXT_155); >- stringBuffer.append(TEXT_156); >+ stringBuffer.append(TEXT_159); >+ stringBuffer.append(TEXT_160); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >- stringBuffer.append(TEXT_157); >+ stringBuffer.append(TEXT_161); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); >- stringBuffer.append(TEXT_158); >+ stringBuffer.append(TEXT_162); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >- stringBuffer.append(TEXT_159); >+ stringBuffer.append(TEXT_163); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); >- stringBuffer.append(TEXT_160); >+ stringBuffer.append(TEXT_164); > stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); >- stringBuffer.append(TEXT_161); >+ stringBuffer.append(TEXT_165); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); >- stringBuffer.append(TEXT_162); >+ stringBuffer.append(TEXT_166); > stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); >- stringBuffer.append(TEXT_163); >+ stringBuffer.append(TEXT_167); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >- stringBuffer.append(TEXT_164); >+ stringBuffer.append(TEXT_168); > > } > >- stringBuffer.append(TEXT_165); >- stringBuffer.append(TEXT_166); >+ stringBuffer.append(TEXT_169); >+ stringBuffer.append(TEXT_170); > > /*genFeature.getObjectType() throws NPE on primitive types. This is a workaround. */ > HashMap primitiveTypeToWrapperClassName = new HashMap(); >@@ -822,91 +833,91 @@ > } > } > >- stringBuffer.append(TEXT_167); >+ stringBuffer.append(TEXT_171); > stringBuffer.append(viewPattern); >- stringBuffer.append(TEXT_168); >+ stringBuffer.append(TEXT_172); > stringBuffer.append(editPattern); >- stringBuffer.append(TEXT_169); >+ stringBuffer.append(TEXT_173); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_170); >+ stringBuffer.append(TEXT_174); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_171); >+ stringBuffer.append(TEXT_175); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_172); >+ stringBuffer.append(TEXT_176); > stringBuffer.append(resolvedSemanticElement); >- stringBuffer.append(TEXT_173); >+ stringBuffer.append(TEXT_177); > stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); >- stringBuffer.append(TEXT_174); >+ stringBuffer.append(TEXT_178); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; > GenFeature feature = featureLabelModelFacet.getMetaFeature(); > if (!feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_175); >+ stringBuffer.append(TEXT_179); > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); >- stringBuffer.append(TEXT_176); >+ stringBuffer.append(TEXT_180); > > } > >- stringBuffer.append(TEXT_177); >+ stringBuffer.append(TEXT_181); > stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_178); >+ stringBuffer.append(TEXT_182); > > if (feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_179); >+ stringBuffer.append(TEXT_183); > stringBuffer.append(primitiveTypeToWrapperClassName.get(feature.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); >- stringBuffer.append(TEXT_180); >+ stringBuffer.append(TEXT_184); > > } > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); > if (feature.isPrimitiveType()) { > >- stringBuffer.append(TEXT_181); >+ stringBuffer.append(TEXT_185); > > } > >- stringBuffer.append(TEXT_182); >+ stringBuffer.append(TEXT_186); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > >- stringBuffer.append(TEXT_183); >+ stringBuffer.append(TEXT_187); > stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); >- stringBuffer.append(TEXT_184); >+ stringBuffer.append(TEXT_188); > > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > if (next.isPrimitiveType()) { > >- stringBuffer.append(TEXT_185); >+ stringBuffer.append(TEXT_189); > stringBuffer.append(primitiveTypeToWrapperClassName.get(next.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); >- stringBuffer.append(TEXT_186); >+ stringBuffer.append(TEXT_190); > > } > myFeatureGetAccessorHelper.appendFeatureValueGetter("element", next, underlyingMetaClass, false); > if (next.isPrimitiveType()) { > >- stringBuffer.append(TEXT_187); >+ stringBuffer.append(TEXT_191); > > } > if (it.hasNext()) { >- stringBuffer.append(TEXT_188); >+ stringBuffer.append(TEXT_192); > } > > } > >- stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_193); > > } else { > >- stringBuffer.append(TEXT_190); >+ stringBuffer.append(TEXT_194); > > } > >- stringBuffer.append(TEXT_191); >- stringBuffer.append(TEXT_192); >+ stringBuffer.append(TEXT_195); >+ stringBuffer.append(TEXT_196); > > boolean isFixedFontSetInFigure; > { >@@ -914,149 +925,147 @@ > isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont(); > } > >- stringBuffer.append(TEXT_193); >+ stringBuffer.append(TEXT_197); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_194); >+ stringBuffer.append(TEXT_198); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_195); >+ stringBuffer.append(TEXT_199); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_196); >+ stringBuffer.append(TEXT_200); > stringBuffer.append(primaryView); >- stringBuffer.append(TEXT_197); >+ stringBuffer.append(TEXT_201); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_198); >+ stringBuffer.append(TEXT_202); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_199); >+ stringBuffer.append(TEXT_203); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >- stringBuffer.append(TEXT_200); >+ stringBuffer.append(TEXT_204); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >- stringBuffer.append(TEXT_201); >+ stringBuffer.append(TEXT_205); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >- stringBuffer.append(TEXT_202); >+ stringBuffer.append(TEXT_206); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_203); >+ stringBuffer.append(TEXT_207); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >- stringBuffer.append(TEXT_204); >+ stringBuffer.append(TEXT_208); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_205); >+ stringBuffer.append(TEXT_209); > > } > >- stringBuffer.append(TEXT_206); >+ stringBuffer.append(TEXT_210); > > if (!isFixedFontSetInFigure) { > >- stringBuffer.append(TEXT_207); >+ stringBuffer.append(TEXT_211); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >- stringBuffer.append(TEXT_208); >+ stringBuffer.append(TEXT_212); > > } > >- stringBuffer.append(TEXT_209); >- stringBuffer.append(TEXT_210); >- stringBuffer.append(TEXT_211); >+ stringBuffer.append(TEXT_213); >+ stringBuffer.append(TEXT_214); >+ stringBuffer.append(TEXT_215); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_212); >+ stringBuffer.append(TEXT_216); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); >- stringBuffer.append(TEXT_213); >+ stringBuffer.append(TEXT_217); > stringBuffer.append(primaryView); >- stringBuffer.append(TEXT_214); >+ stringBuffer.append(TEXT_218); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_215); >+ stringBuffer.append(TEXT_219); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_216); >+ stringBuffer.append(TEXT_220); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_217); >+ stringBuffer.append(TEXT_221); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_218); >+ stringBuffer.append(TEXT_222); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >- stringBuffer.append(TEXT_219); >+ stringBuffer.append(TEXT_223); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); >- stringBuffer.append(TEXT_220); >+ stringBuffer.append(TEXT_224); > > if (genChildNode.isLabelElementIcon()) { > >- stringBuffer.append(TEXT_221); >+ stringBuffer.append(TEXT_225); > stringBuffer.append(importManager.getImportedName("org.eclipse.jface.resource.ImageDescriptor")); >- stringBuffer.append(TEXT_222); >+ stringBuffer.append(TEXT_226); > stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); >- stringBuffer.append(TEXT_223); >+ stringBuffer.append(TEXT_227); > > } > >- stringBuffer.append(TEXT_224); >- /*@ include file="adapters/propertySource.javajetinc"*/ >- stringBuffer.append(TEXT_225); >- stringBuffer.append(TEXT_226); >- stringBuffer.append(TEXT_227); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); > stringBuffer.append(TEXT_228); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ /*@ include file="adapters/propertySource.javajetinc"*/ > stringBuffer.append(TEXT_229); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_230); > stringBuffer.append(TEXT_231); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); > stringBuffer.append(TEXT_232); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); > stringBuffer.append(TEXT_233); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_234); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_235); >+ stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_236); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_237); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_238); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_239); > stringBuffer.append(TEXT_240); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_241); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_242); >+ stringBuffer.append(TEXT_243); >+ stringBuffer.append(TEXT_244); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_245); > > if (labelModelFacet instanceof FeatureLabelModelFacet) { > GenFeature feature = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); > >- stringBuffer.append(TEXT_243); >+ stringBuffer.append(TEXT_246); > stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_244); >+ stringBuffer.append(TEXT_247); > stringBuffer.append(feature.getFeatureAccessorName()); >- stringBuffer.append(TEXT_245); >+ stringBuffer.append(TEXT_248); > > } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { > CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; > for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { > GenFeature next = (GenFeature) it.next(); > >- stringBuffer.append(TEXT_246); >+ stringBuffer.append(TEXT_249); > stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); >- stringBuffer.append(TEXT_247); >+ stringBuffer.append(TEXT_250); > stringBuffer.append(next.getFeatureAccessorName()); >- stringBuffer.append(TEXT_248); >+ stringBuffer.append(TEXT_251); > > } > } > >- stringBuffer.append(TEXT_249); >- stringBuffer.append(TEXT_250); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >- stringBuffer.append(TEXT_251); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_252); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_253); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_254); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_255); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_256); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_257); >+ stringBuffer.append(TEXT_258); >+ stringBuffer.append(TEXT_259); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_260); > > final Viewmap viewmap = genChildNode.getViewmap(); > >- stringBuffer.append(TEXT_258); >+ stringBuffer.append(TEXT_261); > > final String figureQualifiedClassName; > if (viewmap instanceof ParentAssignedViewmap) { >@@ -1085,64 +1094,64 @@ > if (viewmap instanceof ParentAssignedViewmap) { > final ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; > >- stringBuffer.append(TEXT_259); >+ stringBuffer.append(TEXT_262); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_260); >+ stringBuffer.append(TEXT_263); > stringBuffer.append((parentAssignedViewmap.getSetterName() == null ? "setLabel" : parentAssignedViewmap.getSetterName())); >- stringBuffer.append(TEXT_261); >+ stringBuffer.append(TEXT_264); > } else { >- stringBuffer.append(TEXT_262); >+ stringBuffer.append(TEXT_265); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_263); >+ stringBuffer.append(TEXT_266); > > if (viewmap instanceof FigureViewmap) { > >- stringBuffer.append(TEXT_264); >+ stringBuffer.append(TEXT_267); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_265); >+ stringBuffer.append(TEXT_268); > } // instanceof FigureViewmap > else if (viewmap instanceof SnippetViewmap) { >- stringBuffer.append(TEXT_266); >+ stringBuffer.append(TEXT_269); > stringBuffer.append(((SnippetViewmap) viewmap).getBody()); >- stringBuffer.append(TEXT_267); >+ stringBuffer.append(TEXT_270); > } // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter > else if (viewmap instanceof InnerClassViewmap) { > >- stringBuffer.append(TEXT_268); >+ stringBuffer.append(TEXT_271); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_269); >+ stringBuffer.append(TEXT_272); > } >- stringBuffer.append(TEXT_270); >+ stringBuffer.append(TEXT_273); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >- stringBuffer.append(TEXT_271); >+ stringBuffer.append(TEXT_274); > stringBuffer.append(figureImportedName); >- stringBuffer.append(TEXT_272); >+ stringBuffer.append(TEXT_275); > > if ("org.eclipse.draw2d.Label".equals(figureQualifiedClassName) || viewmap instanceof InnerClassViewmap) { > >- stringBuffer.append(TEXT_273); >+ stringBuffer.append(TEXT_276); > > } else { > >- stringBuffer.append(TEXT_274); >+ stringBuffer.append(TEXT_277); > > } > >- stringBuffer.append(TEXT_275); >+ stringBuffer.append(TEXT_278); > } /*not parent-assigned*/ >- stringBuffer.append(TEXT_276); >+ stringBuffer.append(TEXT_279); > > if (!"org.eclipse.draw2d.Label".equals(figureQualifiedClassName) && viewmap instanceof InnerClassViewmap==false) { > >- stringBuffer.append(TEXT_277); >+ stringBuffer.append(TEXT_280); > > } > >- stringBuffer.append(TEXT_278); >+ stringBuffer.append(TEXT_281); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); >- stringBuffer.append(TEXT_279); >+ stringBuffer.append(TEXT_282); > stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); >- stringBuffer.append(TEXT_280); >+ stringBuffer.append(TEXT_283); > > String labelSetterName = "setLabel"; // same assumption in NodeEditPart > String labelFigureClassName = "org.eclipse.draw2d.IFigure"; >@@ -1156,43 +1165,43 @@ > } > } // FIXME perhaps, there's no sense to have setLabel for any other viewmap than ParentAssigned? > >- stringBuffer.append(TEXT_281); >+ stringBuffer.append(TEXT_284); > stringBuffer.append(labelSetterName); >- stringBuffer.append(TEXT_282); >+ stringBuffer.append(TEXT_285); > stringBuffer.append(importManager.getImportedName(labelFigureClassName)); >- stringBuffer.append(TEXT_283); >+ stringBuffer.append(TEXT_286); > > if ("org.eclipse.draw2d.Label".equals(labelFigureClassName)) { > >- stringBuffer.append(TEXT_284); >+ stringBuffer.append(TEXT_287); > > } else { > >- stringBuffer.append(TEXT_285); >+ stringBuffer.append(TEXT_288); > > } > >- stringBuffer.append(TEXT_286); >+ stringBuffer.append(TEXT_289); > > if (viewmap instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) viewmap).getClassBody(); > >- stringBuffer.append(TEXT_287); >+ stringBuffer.append(TEXT_290); > stringBuffer.append(classBody); >- stringBuffer.append(TEXT_288); >+ stringBuffer.append(TEXT_291); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_289); >+ stringBuffer.append(TEXT_292); > > } > > > } > >- stringBuffer.append(TEXT_290); >+ stringBuffer.append(TEXT_293); > importManager.emitSortedImports(); >- stringBuffer.append(TEXT_291); >+ stringBuffer.append(TEXT_294); > return stringBuffer.toString(); > } > } >Index: templates/editor/manifest.mfjet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/editor/manifest.mfjet,v >retrieving revision 1.3 >diff -u -r1.3 manifest.mfjet >--- templates/editor/manifest.mfjet 22 May 2006 18:22:10 -0000 1.3 >+++ templates/editor/manifest.mfjet 30 Aug 2006 15:22:24 -0000 >@@ -38,6 +38,7 @@ > org.eclipse.emf.edit.ui, > org.eclipse.emf.workspace,<%/*XXX: introduces dependency on org.eclipse.core.resources which may be problematic for RCP*/%> > org.eclipse.gef;visibility:=reexport, >+ org.eclipse.gmf.runtime.lite, > org.eclipse.gmf.runtime.notation, > org.eclipse.gmf.runtime.notation.edit<%while(requiredBundleIterator.hasNext()) {%>, > <%=requiredBundleIterator.next()%>;visibility:=reexport<%}%> >Index: templates/editor/PaletteFactory.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/editor/PaletteFactory.javajet,v >retrieving revision 1.4 >diff -u -r1.4 PaletteFactory.javajet >--- templates/editor/PaletteFactory.javajet 25 May 2006 14:22:15 -0000 1.4 >+++ templates/editor/PaletteFactory.javajet 30 Aug 2006 15:22:24 -0000 >@@ -138,11 +138,11 @@ > %> > }; > return new <%=importManager.getImportedName("org.eclipse.gef.palette.CombinedTemplateCreationEntry")%>("<%=nodeCreationTool.getTitle()%>", >- "<%=nodeCreationTool.getDescription()%>", new ModelCreationFactory(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%>.class), smallImage, largeImage) { >+ "<%=nodeCreationTool.getDescription()%>", new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.ModelCreationFactory")%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%>.class), smallImage, largeImage) { > public Tool createTool() { > Tool result = new CreationTool() { > protected Request createTargetRequest() { >- CreateRequestEx request = new CreateRequestEx(visualIds); >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%> request = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>(visualIds); > request.setFactory(getFactory()); > return request; > } >@@ -208,14 +208,14 @@ > %> > }; > return new ConnectionCreationToolEntry("<%=linkCreationTool.getTitle()%>", "<%=linkCreationTool.getDescription()%>", >- new ModelCreationFactory(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>.class), smallImage, largeImage) { >+ new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.ModelCreationFactory")%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>.class), smallImage, largeImage) { > public Tool createTool() { > Tool result = new ConnectionCreationTool() { > { > setUnloadWhenFinished(true); > } > protected Request createTargetRequest() { >- CreateConnectionRequestEx request = new CreateConnectionRequestEx(visualIds); >+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%> request = new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx")%>(visualIds); > request.setFactory(getFactory()); > return request; > } >@@ -246,110 +246,5 @@ > } > return null; > } >- >- /** >- * @generated >- */ >- public static class CreateRequestEx extends <%=importManager.getImportedName("org.eclipse.gef.requests.CreateRequest")%> { >- /** >- * @generated >- */ >- private final int[] visualIds; >- >- /** >- * @generated >- */ >- public CreateRequestEx(int[] visualIds) { >- this.visualIds = visualIds; >- } >- >- /** >- * @generated >- */ >- public int[] getVisualIds() { >- return visualIds; >- } >- >- /** >- * @generated >- */ >- public void setCreatedObject(Object createdObject) { >- ((ModelCreationFactory)getFactory()).setCreatedObject(createdObject); >- } >- } >- >- /** >- * @generated >- */ >- public static class CreateConnectionRequestEx extends <%=importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest")%> { >- /** >- * @generated >- */ >- private final int[] visualIds; >- >- /** >- * @generated >- */ >- public CreateConnectionRequestEx(int[] visualIds) { >- this.visualIds = visualIds; >- } >- >- /** >- * @generated >- */ >- public int[] getVisualIds() { >- return visualIds; >- } >- >- /** >- * @generated >- */ >- public void setCreatedObject(Object createdObject) { >- ((ModelCreationFactory)getFactory()).setCreatedObject(createdObject); >- } >- } >- >- /** >- * @generated >- */ >- public static class ModelCreationFactory implements CreationFactory { >- /** >- * @generated >- */ >- private Object createdObject; >- >- /** >- * @generated >- */ >- private final Class createdObjectType; >- >- /** >- * @generated >- */ >- public ModelCreationFactory(Class objectType) { >- createdObjectType = objectType; >- } >- >- /** >- * @generated >- */ >- public Object getNewObject() { >- return createdObject; >- } >- >- /** >- * @generated >- */ >- public Object getObjectType() { >- return createdObjectType; >- } >- >- /** >- * @generated >- */ >- public void setCreatedObject(Object createdObject) { >- this.createdObject = createdObject; >- } >- } > } > <%importManager.emitSortedImports();%> >Index: templates/editor/Editor.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/editor/Editor.javajet,v >retrieving revision 1.7 >diff -u -r1.7 Editor.javajet >--- templates/editor/Editor.javajet 4 Aug 2006 17:05:48 -0000 1.7 >+++ templates/editor/Editor.javajet 30 Aug 2006 15:22:24 -0000 >@@ -10,96 +10,16 @@ > importManager.markImportLocation(stringBuffer);%> > > <% >-importManager.registerInnerClass("UndoablePropertySheetEntry"); >-importManager.registerInnerClass("SetValueCommand"); >-importManager.registerInnerClass("ResetValueCommand"); >-importManager.registerInnerClass("UpdatableActionGroup"); > importManager.registerInnerClass(genEditor.getClassName() + "ContextMenuProvider"); > if (!isRichClientPlatform) { > importManager.registerInnerClass("ResourceTracker"); > } >- >-importManager.addImport("java.io.IOException"); >-importManager.addImport("java.util.ArrayList"); >-importManager.addImport("java.util.Collections"); >-importManager.addImport("java.util.EventObject"); >-importManager.addImport("java.util.HashMap"); >-importManager.addImport("java.util.Iterator"); >-importManager.addImport("java.util.List"); >- >-importManager.addImport("org.eclipse.core.runtime.CoreException"); >-importManager.addImport("org.eclipse.core.runtime.IProgressMonitor"); >-importManager.addImport("org.eclipse.core.runtime.IStatus"); >-importManager.addImport("org.eclipse.core.runtime.NullProgressMonitor"); >-importManager.addImport("org.eclipse.core.runtime.Status"); >-importManager.addImport("org.eclipse.draw2d.PositionConstants"); >-importManager.addImport("org.eclipse.emf.common.util.URI"); >-importManager.addImport("org.eclipse.emf.ecore.resource.Resource"); >-importManager.addImport("org.eclipse.emf.ecore.resource.ResourceSet"); >-importManager.addImport("org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain"); >-importManager.addImport("org.eclipse.emf.transaction.TransactionalEditingDomain"); >-importManager.addImport("org.eclipse.emf.edit.provider.ComposedAdapterFactory"); >-importManager.addImport("org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory"); >-importManager.addImport("org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory"); >-importManager.addImport("org.eclipse.gef.ContextMenuProvider"); >-importManager.addImport("org.eclipse.gef.EditPartViewer"); >-importManager.addImport("org.eclipse.gef.GraphicalViewer"); >-importManager.addImport("org.eclipse.gef.KeyHandler"); >-importManager.addImport("org.eclipse.gef.KeyStroke"); >-importManager.addImport("org.eclipse.gef.RootEditPart"); >-importManager.addImport("org.eclipse.gef.MouseWheelHandler"); >-importManager.addImport("org.eclipse.gef.MouseWheelZoomHandler"); >-importManager.addImport("org.eclipse.gef.commands.CommandStack"); >-importManager.addImport("org.eclipse.gef.commands.CommandStackListener"); >-importManager.addImport("org.eclipse.gef.editparts.ScalableFreeformRootEditPart"); >-importManager.addImport("org.eclipse.gef.editparts.ScalableRootEditPart"); >-importManager.addImport("org.eclipse.gef.editparts.ZoomManager"); >-importManager.addImport("org.eclipse.gef.palette.PaletteRoot"); >-importManager.addImport("org.eclipse.gef.ui.actions.AlignmentAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.DeleteAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.DirectEditAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.GEFActionConstants"); >-importManager.addImport("org.eclipse.gef.ui.actions.PrintAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.RedoAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.SaveAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.SelectionAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.StackAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.UndoAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.UpdateAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.WorkbenchPartAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.ZoomInAction"); >-importManager.addImport("org.eclipse.gef.ui.actions.ZoomOutAction"); >-importManager.addImport("org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler"); >-importManager.addImport("org.eclipse.gmf.runtime.notation.Diagram"); >-importManager.addImport("org.eclipse.gmf.runtime.notation.NotationFactory"); >-importManager.addImport("org.eclipse.gmf.runtime.notation.provider.NotationItemProviderAdapterFactory"); >-importManager.addImport("org.eclipse.jface.action.IAction"); >-importManager.addImport("org.eclipse.jface.action.IMenuManager"); >-importManager.addImport("org.eclipse.jface.action.MenuManager"); >-importManager.addImport("org.eclipse.jface.action.Separator"); >-importManager.addImport("org.eclipse.jface.dialogs.ErrorDialog"); >-importManager.addImport("org.eclipse.jface.viewers.ISelection"); >-importManager.addImport("org.eclipse.swt.SWT"); >-importManager.addImport("org.eclipse.swt.widgets.Composite"); >-importManager.addImport("org.eclipse.ui.IEditorPart"); >-importManager.addImport("org.eclipse.ui.IEditorInput"); >-importManager.addImport("org.eclipse.ui.IEditorSite"); >-importManager.addImport("org.eclipse.ui.ISelectionListener"); >-importManager.addImport("org.eclipse.ui.IWorkbenchPart"); >-importManager.addImport("org.eclipse.ui.PartInitException"); >-importManager.addImport("org.eclipse.ui.actions.ActionFactory"); >-importManager.addImport("org.eclipse.ui.views.contentoutline.IContentOutlinePage"); >-importManager.addImport("org.eclipse.ui.views.properties.IPropertySheetPage"); >-importManager.addImport("org.eclipse.ui.views.properties.PropertySheetPage"); >-importManager.addImport("org.eclipse.emf.common.notify.AdapterFactory"); >-importManager.addImport("org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette"); >-importManager.addImport("org.eclipse.gef.DefaultEditDomain"); > %> > > /** > * @generated > */ >-public class <%=genEditor.getClassName()%> extends GraphicalEditorWithFlyoutPalette { >+public class <%=genEditor.getClassName()%> extends <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.parts.DiagramEditor")%> { > <% > if (!isRichClientPlatform) { > %> >@@ -169,397 +89,6 @@ > <% > } > %> >- /** >- * @generated >- */ >- private static class UpdatableActionGroup { >- /** >- * @generated >- */ >- public void addAction(UpdateAction action) { >- assert action != null; >- myActions.add(action); >- } >- >- /** >- * @generated >- */ >- public void removeAction(UpdateAction action) { >- myActions.remove(action); >- } >- >- /** >- * @generated >- */ >- public void update() { >- for (Iterator it = myActions.iterator(); it.hasNext();) { >- UpdateAction next = (UpdateAction) it.next(); >- next.update(); >- } >- } >- >- /** >- * @generated >- */ >- private ArrayList myActions = new ArrayList(); >- } >- >- /** >- * Copied from <code>org.eclipse.gef.ui.properties.UndoablePropertySheetEntry</code> to provide EMF compatibility. >- * @generated >- */ >- private static final class UndoablePropertySheetEntry extends <%=importManager.getImportedName("org.eclipse.ui.views.properties.PropertySheetEntry")%> { >- /** >- * @generated >- */ >- private static class SetValueCommand extends <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> { >- /** >- * @generated >- */ >- protected Object propertyValue; >- /** >- * @generated >- */ >- protected Object propertyName; >- /** >- * @generated >- */ >- protected Object undoValue; >- /** >- * @generated >- */ >- protected boolean resetOnUndo; >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> target; >- >- /** >- * @generated >- */ >- public SetValueCommand() { >- super(""); //$NON-NLS-1$ >- } >- >- /** >- * @generated >- */ >- public SetValueCommand(String propLabel) { >- super(<%=importManager.getImportedName("java.text.MessageFormat")%>.format("Set {0} property", new Object[]{propLabel}).trim()); >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return true; >- } >- >- /** >- * @generated >- */ >- public void execute() { >- /* >- * Fix for Bug# 54250 >- * IPropertySource.isPropertySet(String) returns false both when there is no default >- * value, and when there is a default value and the property is set to that value. >- * To correctly determine if a reset should be done during undo, we compare the >- * return value of isPropertySet(String) before and after setPropertyValue(...) is >- * invoked. If they are different (it must have been false before and true after -- >- * it cannot be the other way around), then that means we need to reset. >- */ >- boolean wasPropertySet = getTarget().isPropertySet(propertyName); >- undoValue = getTarget().getPropertyValue(propertyName); >- if (undoValue instanceof <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>) { >- undoValue = ((<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>)undoValue).getEditableValue(); >- } else if (undoValue instanceof <%=importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")%>) { >- undoValue = ((<%=importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")%>)undoValue).getEditableValue(propertyName); >- } >- if (propertyValue instanceof <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>) >- propertyValue = ((<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>)propertyValue).getEditableValue(); >- getTarget().setPropertyValue(propertyName, propertyValue); >- if (getTarget() instanceof <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")%>) >- resetOnUndo = !wasPropertySet >- && ((<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")%>)getTarget()).isPropertyResettable(propertyName); >- else >- resetOnUndo = !wasPropertySet && getTarget().isPropertySet(propertyName); >- if (resetOnUndo) >- undoValue = null; >- } >- >- /** >- * @generated >- */ >- public <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> getTarget() { >- return target; >- } >- >- /** >- * @generated >- */ >- public void setTarget(<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> aTarget) { >- target = aTarget; >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >- >- /** >- * @generated >- */ >- public void setPropertyId(Object pName) { >- propertyName = pName; >- } >- >- /** >- * @generated >- */ >- public void setPropertyValue(Object val) { >- propertyValue = val; >- } >- >- /** >- * @generated >- */ >- public void undo() { >- if (resetOnUndo) >- getTarget().resetPropertyValue(propertyName); >- else >- getTarget().setPropertyValue(propertyName, undoValue); >- } >- } >- >- /** >- * @generated >- */ >- private static class ResetValueCommand extends <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> { >- /** >- * the property that has to be reset >- * @generated >- */ >- protected Object propertyName; >- /** >- * the current non-default value of the property >- * @generated >- */ >- protected Object undoValue; >- /** >- * the property source whose property has to be reset >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> target; >- >- /** >- * Default Constructor: Sets the label for the Command >- * @generated >- */ >- public ResetValueCommand() { >- super("Restore Default Value"); >- } >- >- /** >- * Returns <code>true</code> IFF:<br> >- * 1) the target and property have been specified<br> >- * 2) the property has a default value<br> >- * 3) the value set for that property is not the default >- * @generated >- */ >- public boolean canExecute() { >- boolean answer = false; >- if (target != null && propertyName != null) { >- answer = target.isPropertySet(propertyName); >- if (target instanceof <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")%>) >- answer = answer >- && (((<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource2")%>)target).isPropertyResettable(propertyName)); >- } >- return answer; >- } >- >- /** >- * Caches the undo value and invokes redo() >- * @generated >- */ >- public void execute() { >- undoValue = target.getPropertyValue(propertyName); >- if (undoValue instanceof <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>) { >- undoValue = ((<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>)undoValue).getEditableValue(); >- } else if (undoValue instanceof <%=importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")%>) { >- undoValue = ((<%=importManager.getImportedName("org.eclipse.emf.edit.provider.IItemPropertySource")%>)undoValue).getEditableValue(propertyName); >- } >- redo(); >- } >- >- /** >- * Sets the IPropertySource. >- * @param propSource the IPropertySource whose property has to be reset >- * @generated >- */ >- public void setTarget(<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> propSource) { >- target = propSource; >- } >- >- /** >- * Resets the specified property on the specified IPropertySource >- * @generated >- */ >- public void redo() { >- target.resetPropertyValue(propertyName); >- } >- >- /** >- * Sets the property that is to be reset. >- * @param pName the property to be reset >- * @generated >- */ >- public void setPropertyId(Object pName) { >- propertyName = pName; >- } >- >- /** >- * Restores the non-default value that was reset. >- * @generated >- */ >- public void undo() { >- target.setPropertyValue(propertyName, undoValue); >- } >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gef.commands.CommandStackListener")%> commandStackListener; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gef.commands.CommandStack")%> stack; >- >- /** >- * @generated >- */ >- private UndoablePropertySheetEntry() { } >- >- /** >- * Constructs the root entry using the given command stack. >- * @param stack the command stack >- * @generated >- */ >- public UndoablePropertySheetEntry(<%=importManager.getImportedName("org.eclipse.gef.commands.CommandStack")%> stack) { >- setCommandStack(stack); >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.ui.views.properties.PropertySheetEntry")%> createChildEntry() { >- return new UndoablePropertySheetEntry(); >- } >- >- /** >- * @generated >- */ >- public void dispose() { >- if (stack != null) >- stack.removeCommandStackListener(commandStackListener); >- super.dispose(); >- } >- >- /** >- * @generated >- */ >- <%=importManager.getImportedName("org.eclipse.gef.commands.CommandStack")%> getCommandStack() { >- //only the root has, and is listening to the command stack >- if (getParent() != null) >- return ((UndoablePropertySheetEntry)getParent()).getCommandStack(); >- return stack; >- } >- >- /** >- * @generated >- */ >- public void resetPropertyValue() { >- <%=importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")%> cc = new <%=importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")%>(); >- ResetValueCommand restoreCmd; >- >- if (getParent() == null) >- // root does not have a default value >- return; >- >- // Use our parent's values to reset our values. >- boolean change = false; >- Object[] objects = getParent().getValues(); >- for (int i = 0; i < objects.length; i++) { >- <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> source = getPropertySource(objects[i]); >- if (source.isPropertySet(getDescriptor().getId())) { >- //source.resetPropertyValue(getDescriptor()getId()); >- restoreCmd = new ResetValueCommand(); >- restoreCmd.setTarget(source); >- restoreCmd.setPropertyId(getDescriptor().getId()); >- cc.add(restoreCmd); >- change = true; >- } >- } >- if (change) { >- getCommandStack().execute(cc); >- refreshFromRoot(); >- } >- } >- >- /** >- * @generated >- */ >- void setCommandStack(<%=importManager.getImportedName("org.eclipse.gef.commands.CommandStack")%> stack) { >- this.stack = stack; >- commandStackListener = new <%=importManager.getImportedName("org.eclipse.gef.commands.CommandStackListener")%>() { >- public void commandStackChanged(<%=importManager.getImportedName("java.util.EventObject")%> e) { >- refreshFromRoot(); >- } >- }; >- stack.addCommandStackListener(commandStackListener); >- } >- >- /** >- * @generated >- */ >- protected void valueChanged(<%=importManager.getImportedName("org.eclipse.ui.views.properties.PropertySheetEntry")%> child) { >- valueChanged((UndoablePropertySheetEntry)child, >- new <%=importManager.getImportedName("org.eclipse.gef.commands.ForwardUndoCompoundCommand")%>()); >- } >- >- /** >- * @generated >- */ >- void valueChanged(UndoablePropertySheetEntry child, <%=importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")%> command) { >- <%=importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")%> cc = new <%=importManager.getImportedName("org.eclipse.gef.commands.CompoundCommand")%>(); >- command.add(cc); >- >- SetValueCommand setCommand; >- for (int i = 0; i < getValues().length; i++) { >- setCommand = new SetValueCommand(child.getDisplayName()); >- setCommand.setTarget(getPropertySource(getValues()[i])); >- setCommand.setPropertyId(child.getDescriptor().getId()); >- setCommand.setPropertyValue(child.getValues()[i]); >- cc.add(setCommand); >- } >- >- // inform our parent >- if (getParent() != null) >- ((UndoablePropertySheetEntry)getParent()).valueChanged(this, command); >- else { >- //I am the root entry >- stack.execute(command); >- } >- } >- } >- >- /** >- * @generated >- */ >- private TransactionalEditingDomain editingDomain; > > /** > * @generated >@@ -574,148 +103,30 @@ > /** > * @generated > */ >- private boolean isDirty = false; >- >- /** >- * @generated >- */ >- private PaletteRoot paletteRoot; >- >- /** >- * @generated >- */ >- private PropertySheetPage undoablePropertySheetPage; >- >- /** >- * @generated >- */ >- private UpdatableActionGroup stackActions = new UpdatableActionGroup(); >- >- /** >- * @generated >- */ >- private CommandStackListener commandStackListener = new CommandStackListener() { >- >- public void commandStackChanged(EventObject event) { >- stackActions.update(); >- setDirty(((CommandStack) event.getSource()).isDirty()); >- } >- }; >- >- /** >- * @generated >- */ >- private UpdatableActionGroup editPartActions = new UpdatableActionGroup(); >- >- /** >- * @generated >- */ >- private ISelectionListener selectionListener = new ISelectionListener() { >- >- public void selectionChanged(IWorkbenchPart part, ISelection selection) { >- editPartActions.update(); >- } >- }; >- >- /** >- * @generated >- */ >- private UpdatableActionGroup editorActions = new UpdatableActionGroup(); >- >- /** >- * @generated >- */ >- private ComposedAdapterFactory domainAdapterFactory; >- >- /** >- * @generated >- */ >- protected void firePropertyChange(int propertyId) { >- super.firePropertyChange(propertyId); >- editorActions.update(); >- } >- >- /** >- * Adds an action to this editor's <code>ActionRegistry</code>. (This is >- * a helper method.) >- * >- * @generated >- * @param action >- * the action to add. >- */ >- protected void addAction(IAction action) { >- getActionRegistry().registerAction(action); >- } >- >- /** >- * Adds an editor action to this editor. >- * >- * <p> >- * Editor actions are actions that depend and work on the editor. >- * >- * @generated >- * @param action >- * the editor action >- */ >- protected void addEditorAction(WorkbenchPartAction action) { >- getActionRegistry().registerAction(action); >- editorActions.addAction(action); >- } >- >- /** >- * Adds an <code>EditPart</code> action to this editor. >- * >- * <p> >- * <code>EditPart</code> actions are actions that depend and work on the >- * selected <code>EditPart</code>s. >- * >- * @generated >- * @param action >- * the <code>EditPart</code> action >- */ >- protected void addEditPartAction(SelectionAction action) { >- getActionRegistry().registerAction(action); >- editPartActions.addAction(action); >- } >- >- /** >- * Adds an <code>CommandStack</code> action to this editor. >- * >- * <p> >- * <code>CommandStack</code> actions are actions that depend and work on >- * the <code>CommandStack</code>. >- * >- * @generated >- * @param action >- * the <code>CommandStack</code> action >- */ >- protected void addStackAction(StackAction action) { >- getActionRegistry().registerAction(action); >- stackActions.addAction(action); >- } >+ private <%=importManager.getImportedName("org.eclipse.emf.edit.provider.ComposedAdapterFactory")%> domainAdapterFactory; > > /** > * @generated > */ > protected void createActions() { >- addStackAction(new UndoAction(this)); >- addStackAction(new RedoAction(this)); >+ addStackAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.UndoAction")%>(this)); >+ addStackAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.RedoAction")%>(this)); > >- addEditPartAction(new DeleteAction((IWorkbenchPart) this)); >- addEditPartAction(new DirectEditAction((IWorkbenchPart) this)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.DeleteAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.DirectEditAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this)); > >- addEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.LEFT)); >- addEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.RIGHT)); >- addEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.TOP)); >- addEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.BOTTOM)); >- addEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.CENTER)); >- addEditPartAction(new AlignmentAction((IWorkbenchPart) this, PositionConstants.MIDDLE)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this, <%=importManager.getImportedName("org.eclipse.draw2d.PositionConstants")%>.LEFT)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this, <%=importManager.getImportedName("org.eclipse.draw2d.PositionConstants")%>.RIGHT)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this, <%=importManager.getImportedName("org.eclipse.draw2d.PositionConstants")%>.TOP)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this, <%=importManager.getImportedName("org.eclipse.draw2d.PositionConstants")%>.BOTTOM)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this, <%=importManager.getImportedName("org.eclipse.draw2d.PositionConstants")%>.CENTER)); >+ addEditPartAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.AlignmentAction")%>((<%=importManager.getImportedName("org.eclipse.ui.IWorkbenchPart")%>) this, <%=importManager.getImportedName("org.eclipse.draw2d.PositionConstants")%>.MIDDLE)); > >- addEditorAction(new SaveAction(this)); >- addEditorAction(new PrintAction(this)); >+ addEditorAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.SaveAction")%>(this)); >+ addEditorAction(new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.PrintAction")%>(this)); > >- IAction zoomIn = new ZoomInAction(getZoomManager()); >- IAction zoomOut = new ZoomOutAction(getZoomManager()); >+ <%=importManager.getImportedName("org.eclipse.jface.action.IAction")%> zoomIn = new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.ZoomInAction")%>(getZoomManager()); >+ <%=importManager.getImportedName("org.eclipse.jface.action.IAction")%> zoomOut = new <%=importManager.getImportedName("org.eclipse.gef.ui.actions.ZoomOutAction")%>(getZoomManager()); > addAction(zoomIn); > addAction(zoomOut); > getSite().getKeyBindingService().registerAction(zoomIn); >@@ -742,15 +153,6 @@ > * @generated > */ > public void dispose() { >- // remove CommandStackListener >- getCommandStack().removeCommandStackListener(getStackActionsListener()); >- >- // remove selection listener >- getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(getSelectionListener()); >- >- // dispose the ActionRegistry (will dispose all actions) >- getActionRegistry().dispose(); >- > // important: always call super implementation of dispose > super.dispose(); > } >@@ -758,142 +160,29 @@ > /** > * @generated > */ >- public void doSave(IProgressMonitor monitor) { >+ public void doSave(<%=importManager.getImportedName("org.eclipse.core.runtime.IProgressMonitor")%> monitor) { > try { > save(monitor); > getCommandStack().markSaveLocation(); >- } catch (CoreException e) { >- ErrorDialog.openError(getSite().getShell(), "Error During Save", "The current <%=genDiagram.getEditorGen().getDomainGenModel().getModelName()%> model could not be saved.", e.getStatus()); >- } >- } >- >- /** >- * @generated >- */ >- private void save(IProgressMonitor progressMonitor) throws CoreException { >- if (progressMonitor == null) { >- progressMonitor = new NullProgressMonitor(); >- } >- progressMonitor.beginTask("Saving", getEditingDomain().getResourceSet().getResources().size()); >- try { >- for(Iterator it = getEditingDomain().getResourceSet().getResources().iterator(); it.hasNext(); ) { >- Resource next = (Resource)it.next(); >- next.save(Collections.EMPTY_MAP); >- progressMonitor.worked(1); >- } >- } catch (IOException e) { >- IStatus status = new Status(IStatus.ERROR, <%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.ID, 0, "Error writing file.", e); >- throw new CoreException(status); >- } finally { >- progressMonitor.done(); >+ } catch (<%=importManager.getImportedName("org.eclipse.core.runtime.CoreException")%> e) { >+ <%=importManager.getImportedName("org.eclipse.jface.dialogs.ErrorDialog")%>.openError(getSite().getShell(), "Error During Save", "The current <%=genDiagram.getEditorGen().getDomainGenModel().getModelName()%> model could not be saved.", e.getStatus()); > } > } > > /** > * @generated > */ >- public boolean isSaveAsAllowed() { >- // TODO: should be allowed. >- return false; >- } >- >- /** >- * @generated >- */ >- public void doSaveAs() { >- // TODO: Implement. >- } >- >- /** >- * @generated >- */ >- public Object getAdapter(Class type) { >- if (type == IPropertySheetPage.class) { >- return getPropertySheetPage(); >- } else if (type == IContentOutlinePage.class) { >- return getOutlinePage(); >- } else if (type == ZoomManager.class) { >- return getZoomManager(); >- } >- return super.getAdapter(type); >- } >- >- /** >- * @generated >- */ >- protected ZoomManager getZoomManager() { >- return getZoomManager(getGraphicalViewer()); >- } >- >- /** >- * @generated >- */ >- private ZoomManager getZoomManager(GraphicalViewer viewer) { >- // get zoom manager from root edit part >- RootEditPart rootEditPart = viewer.getRootEditPart(); >- ZoomManager zoomManager = null; >- if (rootEditPart instanceof ScalableFreeformRootEditPart) { >- zoomManager = ((ScalableFreeformRootEditPart) rootEditPart).getZoomManager(); >- } else if (rootEditPart instanceof ScalableRootEditPart) { >- zoomManager = ((ScalableRootEditPart) rootEditPart).getZoomManager(); >- } >- return zoomManager; >- } >- >- /** >- * @generated >- */ >- private CommandStackListener getStackActionsListener() { >- return commandStackListener; >- } >- >- /** >- * @generated >- */ >- protected IContentOutlinePage getOutlinePage() { >- //TODO: outline page missing >- return null; >- } >- >- /** >- * @generated >- */ >- protected PaletteRoot getPaletteRoot() { >- if (paletteRoot == null) { >- paletteRoot = new PaletteRoot(); >+ protected void configurePalette(<%=importManager.getImportedName("org.eclipse.gef.palette.PaletteRoot")%> paletteRoot) { > <% > { > final Palette palette = genDiagram.getPalette(); > if (palette != null) { > %> >- new <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>(getDomainAdapterFactory()).contributeToPalette(paletteRoot); >+ new <%=importManager.getImportedName(palette.getFactoryQualifiedClassName())%>(getDomainAdapterFactory()).contributeToPalette(paletteRoot); > <% > } > } > %> >- } >- return paletteRoot; >- } >- >- /** >- * @generated >- */ >- protected PropertySheetPage getPropertySheetPage() { >- if (undoablePropertySheetPage == null) { >- undoablePropertySheetPage = new PropertySheetPage(); >- UndoablePropertySheetEntry rootEntry = new UndoablePropertySheetEntry(getCommandStack()); >- rootEntry.setPropertySourceProvider(new <%=importManager.getImportedName(genDiagram.getPropertyProviderQualifiedClassName())%>(getDomainAdapterFactory())); >- undoablePropertySheetPage.setRootEntry(rootEntry); >- } >- >- return undoablePropertySheetPage; >- } >- >- /** >- * @generated >- */ >- private ISelectionListener getSelectionListener() { >- return selectionListener; > } > > /** >@@ -906,38 +195,29 @@ > /** > * @generated > */ >- public Diagram getDiagram() { >+ public <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%> getDiagram() { > return diagram; > } > > /** > * @generated > */ >- public void init(IEditorSite site, IEditorInput input) throws PartInitException { >- URI file = getURIFromInput(input); >+ public void init(<%=importManager.getImportedName("org.eclipse.ui.IEditorSite")%> site, <%=importManager.getImportedName("org.eclipse.ui.IEditorInput")%> input) throws <%=importManager.getImportedName("org.eclipse.ui.PartInitException")%> { >+ <%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%> file = getURIFromInput(input); > if (file == null) { >- throw new PartInitException("The specified input is not valid."); >+ throw new <%=importManager.getImportedName("org.eclipse.ui.PartInitException")%>("The specified input is not valid."); > } >- setSite(site); >- setInput(input); >- setEditDomain(new DefaultEditDomain(this)); >- >+ super.init(site, input); > // validate > if (getDiagramRoot() == null) { >- throw new PartInitException("The specified input is not valid."); >+ throw new <%=importManager.getImportedName("org.eclipse.ui.PartInitException")%>("The specified input is not valid."); > } >- >- // add CommandStackListener >- getCommandStack().addCommandStackListener(getStackActionsListener()); >- >- // add selection change listener >- getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(getSelectionListener()); > } > > /** > * @generated > */ >- protected void setInput(IEditorInput input) { >+ protected void setInput(<%=importManager.getImportedName("org.eclipse.ui.IEditorInput")%> input) { > <% > if (!isRichClientPlatform) { > %> >@@ -948,7 +228,7 @@ > <% > } > %> >- URI file = getURIFromInput(input); >+ <%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%> file = getURIFromInput(input); > load(file); > setPartName(file.lastSegment()); > super.setInput(input); >@@ -967,17 +247,17 @@ > /** > * @generated > */ >- private URI getURIFromInput(IEditorInput input) { >+ private <%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%> getURIFromInput(<%=importManager.getImportedName("org.eclipse.ui.IEditorInput")%> input) { > <%if (isRichClientPlatform) {%> > if (input instanceof <%=importManager.getImportedName("org.eclipse.emf.common.ui.URIEditorInput")%>) { > return ((<%=importManager.getImportedName("org.eclipse.emf.common.ui.URIEditorInput")%>) input).getURI(); > } > if (input instanceof <%=importManager.getImportedName("org.eclipse.ui.IPathEditorInput")%>) { >- return URI.createFileURI(((IPathEditorInput)input).getPath().toOSString()); >+ return <%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%>.createFileURI(((IPathEditorInput)input).getPath().toOSString()); > } > <%} else {%> > if (input instanceof <%=importManager.getImportedName("org.eclipse.ui.IFileEditorInput")%>) { >- return URI.createPlatformResourceURI(((IFileEditorInput)input).getFile().getFullPath().toString()); >+ return <%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%>.createPlatformResourceURI(((IFileEditorInput)input).getFile().getFullPath().toString()); > } > <%}%> > return null; >@@ -986,39 +266,10 @@ > /** > * @generated > */ >- public boolean isDirty() { >- return isDirty; >- } >- >- /** >- * @generated >- */ >- private void setDirty(boolean dirty) { >- if (isDirty != dirty) { >- isDirty = dirty; >- firePropertyChange(IEditorPart.PROP_DIRTY); >- } >- } >- >- /** >- * @generated >- */ >- protected TransactionalEditingDomain getEditingDomain() { >- if (editingDomain == null) { >- editingDomain = <%=importManager.getImportedName("org.eclipse.emf.workspace.WorkspaceEditingDomainFactory")%>.INSTANCE.createEditingDomain(); >- //editingDomain.setAdapterFactory(getDomainAdapterFactory()); >- editingDomain.getResourceSet().eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(editingDomain)); >- } >- return editingDomain; >- } >- >- /** >- * @generated >- */ >- private AdapterFactory getDomainAdapterFactory() { >+ protected <%=importManager.getImportedName("org.eclipse.emf.common.notify.AdapterFactory")%> getDomainAdapterFactory() { > if (domainAdapterFactory == null) { >- List factories = new ArrayList(); >- factories.add(new ResourceItemProviderAdapterFactory()); >+ <%=importManager.getImportedName("java.util.List")%> factories = new <%=importManager.getImportedName("java.util.ArrayList")%>(); >+ factories.add(new <%=importManager.getImportedName("org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory")%>()); > <% > final EList genPackages = genDiagram.getEditorGen().getAllDomainGenPackages(true); > for (int i = 0; i < genPackages.size(); i++) { >@@ -1026,9 +277,9 @@ > %> > factories.add(new <%=importManager.getImportedName(genPackage.getQualifiedItemProviderAdapterFactoryClassName())%>()); > <%}%> >- factories.add(new ReflectiveItemProviderAdapterFactory()); >- factories.add(new NotationItemProviderAdapterFactory()); >- domainAdapterFactory = new ComposedAdapterFactory(factories); >+ factories.add(new <%=importManager.getImportedName("org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory")%>()); >+ factories.add(new <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.provider.NotationItemProviderAdapterFactory")%>()); >+ domainAdapterFactory = new <%=importManager.getImportedName("org.eclipse.emf.edit.provider.ComposedAdapterFactory")%>(factories); > } > return domainAdapterFactory; > } >@@ -1036,26 +287,26 @@ > /** > * @generated > */ >- private void load(URI diagramFile) { >+ private void load(<%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%> diagramFile) { > diagramRoot = null; > diagram = null; > if (diagramFile == null) { > return; > } >- TransactionalEditingDomain editingDomain = getEditingDomain(); >- ResourceSet resourceSet = editingDomain.getResourceSet(); >- Resource diagramResource = resourceSet.getResource(diagramFile, true); >+ <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain = getEditingDomain(); >+ <%=importManager.getImportedName("org.eclipse.emf.ecore.resource.ResourceSet")%> resourceSet = editingDomain.getResourceSet(); >+ <%=importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")%> diagramResource = resourceSet.getResource(diagramFile, true); > if (diagramResource == null) { > diagramResource = resourceSet.createResource(diagramFile); > } >- diagram = (Diagram) findInResource(diagramResource, Diagram.class); >+ diagram = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>) findInResource(diagramResource, <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%>.class); > if (diagram == null) { >- diagram = NotationFactory.eINSTANCE.createDiagram(); >+ diagram = <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")%>.eINSTANCE.createDiagram(); > diagramResource.getContents().add(0, diagram); > //Auxiliary creation should not be undoable. > try { >- diagramResource.save(Collections.EMPTY_MAP); >- } catch (IOException e) { >+ diagramResource.save(<%=importManager.getImportedName("java.util.Collections")%>.EMPTY_MAP); >+ } catch (<%=importManager.getImportedName("java.io.IOException")%> e) { > diagram = null; > diagramRoot = null; > return; >@@ -1071,8 +322,8 @@ > String resourceToUse; > if (!sameFile) { > %> >- URI modelFile = <%=genDiagram.getDiagramEditorUtilClassName()%>.getModelFileURI(diagramFile); >- Resource modelResource = resourceSet.getResource(modelFile, true); >+ <%=importManager.getImportedName("org.eclipse.emf.common.util.URI")%> modelFile = <%=genDiagram.getDiagramEditorUtilClassName()%>.getModelFileURI(diagramFile); >+ <%=importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")%> modelResource = resourceSet.getResource(modelFile, true); > if (modelResource == null) { > modelResource = resourceSet.createResource(modelFile); > } >@@ -1088,8 +339,8 @@ > <%=resourceToUse%>.getContents().add(0, diagramRoot); > //We don't want this auxiliary creation to be undoable. > try { >- <%=resourceToUse%>.save(Collections.EMPTY_MAP); >- } catch (IOException e) { >+ <%=resourceToUse%>.save(<%=importManager.getImportedName("java.util.Collections")%>.EMPTY_MAP); >+ } catch (<%=importManager.getImportedName("java.io.IOException")%> e) { > diagram = null; > diagramRoot = null; > return; >@@ -1107,8 +358,8 @@ > /** > * @generated > */ >- private Object findInResource(Resource resource, Class expectedClass) { >- for(Iterator it = resource.getContents().iterator(); it.hasNext(); ) { >+ private Object findInResource(<%=importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")%> resource, Class expectedClass) { >+ for(<%=importManager.getImportedName("java.util.Iterator")%> it = resource.getContents().iterator(); it.hasNext(); ) { > Object next = it.next(); > if (expectedClass.isInstance(next)) { > return next; >@@ -1120,26 +371,10 @@ > /** > * @generated > */ >- public void setFocus() { >- getGraphicalViewer().getControl().setFocus(); >- } >- >- /** >- * @generated >- */ >- public final void createPartControl(Composite parent) { >- super.createPartControl(parent); >- // initialize actions >- createActions(); >- } >- >- /** >- * @generated >- */ >- protected void createGraphicalViewer(Composite parent) { >+ protected void createGraphicalViewer(<%=importManager.getImportedName("org.eclipse.swt.widgets.Composite")%> parent) { > super.createGraphicalViewer(parent); > // initialize the viewer with input >- ScalableFreeformRootEditPart root = new ScalableFreeformRootEditPart(); >+ <%=importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")%> root = new <%=importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")%>(); > getGraphicalViewer().setRootEditPart(root); > getGraphicalViewer().setEditPartFactory(new <%=importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())%>()); > >@@ -1155,45 +390,45 @@ > */ > protected void configureGraphicalViewer() { > super.configureGraphicalViewer(); >- GraphicalViewer viewer = getGraphicalViewer(); >+ <%=importManager.getImportedName("org.eclipse.gef.GraphicalViewer")%> viewer = getGraphicalViewer(); > // configure the context menu >- ContextMenuProvider provider = new <%=genEditor.getClassName()%>ContextMenuProvider(viewer); >+ <%=importManager.getImportedName("org.eclipse.gef.ContextMenuProvider")%> provider = new <%=genEditor.getClassName()%>ContextMenuProvider(viewer); > viewer.setContextMenu(provider); > getSite().registerContextMenu(<%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.ID + ".editor.contextmenu", provider, getSite().getSelectionProvider()); //$NON-NLS-1$ > >- KeyHandler keyHandler = new GraphicalViewerKeyHandler(viewer); >- keyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0), getActionRegistry().getAction(ActionFactory.DELETE.getId())); >- keyHandler.put(KeyStroke.getPressed(SWT.F2, 0), getActionRegistry().getAction(GEFActionConstants.DIRECT_EDIT)); >+ <%=importManager.getImportedName("org.eclipse.gef.KeyHandler")%> keyHandler = new <%=importManager.getImportedName("org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler")%>(viewer); >+ keyHandler.put(<%=importManager.getImportedName("org.eclipse.gef.KeyStroke")%>.getPressed(<%=importManager.getImportedName("org.eclipse.swt.SWT")%>.DEL, 127, 0), getActionRegistry().getAction(<%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.DELETE.getId())); >+ keyHandler.put(<%=importManager.getImportedName("org.eclipse.gef.KeyStroke")%>.getPressed(<%=importManager.getImportedName("org.eclipse.swt.SWT")%>.F2, 0), getActionRegistry().getAction(<%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.DIRECT_EDIT)); > viewer.setKeyHandler(keyHandler); > >- viewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.CTRL), MouseWheelZoomHandler.SINGLETON); >+ viewer.setProperty(<%=importManager.getImportedName("org.eclipse.gef.MouseWheelHandler")%>.KeyGenerator.getKey(<%=importManager.getImportedName("org.eclipse.swt.SWT")%>.CTRL), <%=importManager.getImportedName("org.eclipse.gef.MouseWheelZoomHandler")%>.SINGLETON); > } > > /** > * @generated > */ >- private class <%=genEditor.getClassName()%>ContextMenuProvider extends ContextMenuProvider { >+ private class <%=genEditor.getClassName()%>ContextMenuProvider extends <%=importManager.getImportedName("org.eclipse.gef.ContextMenuProvider")%> { > /** > * @generated > */ >- public <%=genEditor.getClassName()%>ContextMenuProvider(EditPartViewer viewer) { >+ public <%=genEditor.getClassName()%>ContextMenuProvider(<%=importManager.getImportedName("org.eclipse.gef.EditPartViewer")%> viewer) { > super(viewer); > } > > /** > * @generated > */ >- public void buildContextMenu(IMenuManager menuManager) { >- GEFActionConstants.addStandardActionGroups(menuManager); >- appendActionToMenu(menuManager, ActionFactory.UNDO.getId(), GEFActionConstants.GROUP_UNDO); >- appendActionToMenu(menuManager, ActionFactory.REDO.getId(), GEFActionConstants.GROUP_UNDO); >- >- appendActionToMenu(menuManager, ActionFactory.COPY.getId(), GEFActionConstants.GROUP_EDIT); >- appendActionToMenu(menuManager, ActionFactory.PASTE.getId(), GEFActionConstants.GROUP_EDIT); >- appendActionToMenu(menuManager, ActionFactory.DELETE.getId(), GEFActionConstants.GROUP_EDIT); >- appendActionToMenu(menuManager, GEFActionConstants.DIRECT_EDIT, GEFActionConstants.GROUP_EDIT); >+ public void buildContextMenu(<%=importManager.getImportedName("org.eclipse.jface.action.IMenuManager")%> menuManager) { >+ <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.addStandardActionGroups(menuManager); >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.UNDO.getId(), <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_UNDO); >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.REDO.getId(), <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_UNDO); >+ >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.COPY.getId(), <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_EDIT); >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.PASTE.getId(), <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_EDIT); >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.DELETE.getId(), <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_EDIT); >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.DIRECT_EDIT, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_EDIT); > >- appendActionToMenu(menuManager, ActionFactory.SAVE.getId(), GEFActionConstants.GROUP_SAVE); >+ appendActionToMenu(menuManager, <%=importManager.getImportedName("org.eclipse.ui.actions.ActionFactory")%>.SAVE.getId(), <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_SAVE); > > appendAlignmentSubmenu(menuManager); > } >@@ -1201,28 +436,28 @@ > /** > * @generated > */ >- private void appendAlignmentSubmenu(IMenuManager menuManager) { >+ private void appendAlignmentSubmenu(<%=importManager.getImportedName("org.eclipse.jface.action.IMenuManager")%> menuManager) { > // Alignment Actions >- MenuManager submenu = new MenuManager("Align"); >- submenu.add(new Separator(GEFActionConstants.MB_ADDITIONS)); >+ <%=importManager.getImportedName("org.eclipse.jface.action.MenuManager")%> submenu = new <%=importManager.getImportedName("org.eclipse.jface.action.MenuManager")%>("Align"); >+ submenu.add(new <%=importManager.getImportedName("org.eclipse.jface.action.Separator")%>(<%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS)); > >- appendActionToMenu(submenu, GEFActionConstants.ALIGN_LEFT, GEFActionConstants.MB_ADDITIONS); >- appendActionToMenu(submenu, GEFActionConstants.ALIGN_CENTER, GEFActionConstants.MB_ADDITIONS); >- appendActionToMenu(submenu, GEFActionConstants.ALIGN_RIGHT, GEFActionConstants.MB_ADDITIONS); >- appendActionToMenu(submenu, GEFActionConstants.ALIGN_TOP, GEFActionConstants.MB_ADDITIONS); >- appendActionToMenu(submenu, GEFActionConstants.ALIGN_MIDDLE, GEFActionConstants.MB_ADDITIONS); >- appendActionToMenu(submenu, GEFActionConstants.ALIGN_BOTTOM, GEFActionConstants.MB_ADDITIONS); >+ appendActionToMenu(submenu, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.ALIGN_LEFT, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS); >+ appendActionToMenu(submenu, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.ALIGN_CENTER, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS); >+ appendActionToMenu(submenu, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.ALIGN_RIGHT, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS); >+ appendActionToMenu(submenu, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.ALIGN_TOP, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS); >+ appendActionToMenu(submenu, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.ALIGN_MIDDLE, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS); >+ appendActionToMenu(submenu, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.ALIGN_BOTTOM, <%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.MB_ADDITIONS); > > if (!submenu.isEmpty()) { >- menuManager.appendToGroup(GEFActionConstants.GROUP_REST, submenu); >+ menuManager.appendToGroup(<%=importManager.getImportedName("org.eclipse.gef.ui.actions.GEFActionConstants")%>.GROUP_REST, submenu); > } > } > > /** > * @generated > */ >- private void appendActionToMenu(IMenuManager menu, String actionId, String menuGroup) { >- IAction action = getActionRegistry().getAction(actionId); >+ private void appendActionToMenu(<%=importManager.getImportedName("org.eclipse.jface.action.IMenuManager")%> menu, String actionId, String menuGroup) { >+ <%=importManager.getImportedName("org.eclipse.jface.action.IAction")%> action = getActionRegistry().getAction(actionId); > if (action != null && action.isEnabled()) { > menu.appendToGroup(menuGroup, action); > } >Index: templates/policies/BendpointEditPolicy.javajet >=================================================================== >RCS file: templates/policies/BendpointEditPolicy.javajet >diff -N templates/policies/BendpointEditPolicy.javajet >--- templates/policies/BendpointEditPolicy.javajet 9 Aug 2006 14:34:54 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,226 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.policies" class="BendpointEditPolicyGenerator" >- imports="org.eclipse.gmf.common.codegen.* org.eclipse.gmf.codegen.gmfgen.*"%> >-<% >-GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class BendpointEditPolicy extends <%=importManager.getImportedName("org.eclipse.gef.editpolicies.BendpointEditPolicy")%> { >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> getDiagramEdge() { >- return (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>)getHost().getModel(); >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getCreateBendpointCommand(<%=importManager.getImportedName("org.eclipse.gef.requests.BendpointRequest")%> request) { >- return getModifyBendpointCommand(new BendpointCreator(request.getIndex(), request.getLocation())); >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getDeleteBendpointCommand(<%=importManager.getImportedName("org.eclipse.gef.requests.BendpointRequest")%> request) { >- return getModifyBendpointCommand(new BendpointDeleter(request.getIndex())); >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getMoveBendpointCommand(<%=importManager.getImportedName("org.eclipse.gef.requests.BendpointRequest")%> request) { >- return getModifyBendpointCommand(new BendpointMover(request.getIndex(), request.getLocation())); >- } >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getModifyBendpointCommand(final BendpointModifier modifier) { >- <%=importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")%> editingDomain = <%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagramEdge().getDiagram().getElement()); >- return new <%=importManager.getImportedName(genDiagram.getEditPartsPackageName() + ".WrappingCommand")%>(editingDomain, new BendpointModificationCommand(modifier)); >- } >- >- /** >- * @generated >- */ >- private class BendpointModificationCommand extends <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%> { >- /** >- * @generated >- */ >- private BendpointModifier bendpointModifier; >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("java.util.List")%> oldPoints; >- >- /** >- * @generated >- */ >- public BendpointModificationCommand(BendpointModifier bendpointModifier) { >- this.bendpointModifier = bendpointModifier; >- } >- >- /** >- * @generated >- */ >- public void execute() { >- <%=importManager.getImportedName("org.eclipse.draw2d.Connection")%> connection = getConnection(); >- final <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> ptRef1 = connection.getSourceAnchor().getReferencePoint().getCopy(); >- connection.translateToRelative(ptRef1); >- final <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> ptRef2 = connection.getTargetAnchor().getReferencePoint().getCopy(); >- connection.translateToRelative(ptRef2); >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")%> bendpoints = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")%>) getDiagramEdge().getBendpoints(); >- if (bendpoints == null) { >- bendpoints = <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")%>.eINSTANCE.createRelativeBendpoints(); >- getDiagramEdge().setBendpoints(bendpoints); >- } >- oldPoints = bendpoints.getPoints(); >- <%=importManager.getImportedName("java.util.List")%> newPoints = new <%=importManager.getImportedName("java.util.ArrayList")%>(oldPoints); >- bendpointModifier.applyModification(newPoints, new BendpointConverter() { >- public <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")%> convert(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> point) { >- <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%> s = point.getDifference(ptRef1); >- <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%> t = point.getDifference(ptRef2); >- return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")%>(s.width, s.height, t.width, t.height); >- } >- }); >- bendpoints.setPoints(newPoints); >- } >- >- /** >- * @generated >- */ >- public void undo() { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")%> bendpoints = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")%>) getDiagramEdge().getBendpoints(); >- bendpoints.setPoints(oldPoints); >- } >- >- /** >- * @generated >- */ >- public void redo() { >- execute(); >- } >- >- /** >- * @generated >- */ >- public boolean canExecute() { >- return true; >- } >- } >- >- /** >- * @generated >- */ >- private static interface BendpointConverter { >- /** >- * @generated >- */ >- public <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")%> convert(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> point); >- } >- >- /** >- * @generated >- */ >- private static interface BendpointModifier { >- /** >- * @generated >- */ >- public void applyModification(<%=importManager.getImportedName("java.util.List")%>/*<<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")%>>*/ originalBendpoints, BendpointConverter converter); >- } >- >- /** >- * @generated >- */ >- private static class BendpointDeleter implements BendpointModifier { >- /** >- * @generated >- */ >- private int index; >- >- /** >- * @generated >- */ >- public BendpointDeleter(int index) { >- this.index = index; >- } >- >- /** >- * @generated >- */ >- public void applyModification(<%=importManager.getImportedName("java.util.List")%> originalBendpoints, BendpointConverter converter) { >- originalBendpoints.remove(index); >- } >- } >- >- /** >- * @generated >- */ >- private static class BendpointMover implements BendpointModifier { >- /** >- * @generated >- */ >- private int index; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> point; >- >- /** >- * @generated >- */ >- public BendpointMover(int index, <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> point) { >- this.index = index; >- this.point = point; >- } >- >- /** >- * @generated >- */ >- public void applyModification(<%=importManager.getImportedName("java.util.List")%> originalBendpoints, BendpointConverter converter) { >- originalBendpoints.set(index, converter.convert(point)); >- } >- } >- >- /** >- * @generated >- */ >- private static class BendpointCreator implements BendpointModifier { >- /** >- * @generated >- */ >- private int index; >- >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> point; >- >- /** >- * @generated >- */ >- public BendpointCreator(int index, <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> point) { >- this.index = index; >- this.point = point; >- } >- >- /** >- * @generated >- */ >- public void applyModification(<%=importManager.getImportedName("java.util.List")%> originalBendpoints, BendpointConverter converter) { >- originalBendpoints.add(index, converter.convert(point)); >- } >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/providers/PropertySourceProvider.javajet >=================================================================== >RCS file: templates/providers/PropertySourceProvider.javajet >diff -N templates/providers/PropertySourceProvider.javajet >--- templates/providers/PropertySourceProvider.javajet 4 Jul 2006 15:44:10 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,68 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.providers" class="PropertySourceProviderGenerator" >- imports="org.eclipse.gmf.codegen.gmfgen.* org.eclipse.gmf.common.codegen.*"%> >-<% >-GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >-final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >-%> >-<%@ include file="../copyright4java.jetinc"%> >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public class <%=genDiagram.getPropertyProviderClassName()%> implements <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySourceProvider")%> { >- /** >- * @generated >- */ >- private <%=importManager.getImportedName("org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider")%> adapterFactoryContentProvider; >- >- /** >- * @generated >- */ >- public <%=genDiagram.getPropertyProviderClassName()%>(<%=importManager.getImportedName("org.eclipse.emf.common.notify.AdapterFactory")%> domainAdapterFactory) { >- adapterFactoryContentProvider = new <%=importManager.getImportedName("org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider")%>(domainAdapterFactory); >- } >- >- /** >- * @generated >- */ >- public <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%> getPropertySource(Object object) { >- if (object instanceof <%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>) { >- return (<%=importManager.getImportedName("org.eclipse.ui.views.properties.IPropertySource")%>) object; >- } >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view = getNotationElement(object); >- if (view == null) { >- return adapterFactoryContentProvider.getPropertySource(object); >- } >- //XXX: compose with view properties >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> domainElement = view.getElement(); >- if (domainElement == null && view instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%> edge = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) view; >- domainElement = edge.getTarget().getElement(); >- } >- return adapterFactoryContentProvider.getPropertySource(domainElement); >- } >- >- /** >- * @generated >- */ >- protected <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> getNotationElement(Object object) { >- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view = null; >- if (object instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) { >- view = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) object; >- } else if (object instanceof <%=importManager.getImportedName("org.eclipse.gef.EditPart")%>) { >- <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> editPart = (<%=importManager.getImportedName("org.eclipse.gef.EditPart")%>) object; >- if (editPart.getModel() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) { >- view = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) editPart.getModel(); >- } >- } >- if (view != null && "<%=genDiagram.getEditorGen().getModelID()%>".equals(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getModelID(view))) { >- return view; >- } >- return null; >- } >-} >-<%importManager.emitSortedImports();%> >Index: templates/providers/AbstractParser.javajet >=================================================================== >RCS file: templates/providers/AbstractParser.javajet >diff -N templates/providers/AbstractParser.javajet >--- templates/providers/AbstractParser.javajet 13 Apr 2006 21:20:16 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,179 +0,0 @@ >-<%@ jet package="org.eclipse.gmf.codegen.templates.lite.providers" class="AbstractParserGenerator" >- imports="org.eclipse.gmf.codegen.gmfgen.* org.eclipse.gmf.common.codegen.*"%> >-<%GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0];%> >-<%ImportAssistant importManager = (ImportAssistant) ((Object[])argument)[1];%> >-<%@ include file="../copyright4java.jetinc"%> >- >-<% >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >-%> >- >-/** >- * @generated >- */ >-public abstract class <%=genDiagram.getAbstractParserClassName()%> { >- /** >- * @generated >- */ >- public static Object parseValue(<%=importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")%> feature, Object value) throws IllegalArgumentException { >- if (value == null) { >- throw new IllegalArgumentException(); >- } >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EDataType")%> type = feature.getEAttributeType(); >- Class iClass = type.getInstanceClass(); >- if (Boolean.TYPE.equals(iClass) || Boolean.class.equals(iClass)) { >- if (value instanceof Boolean) { >- // ok >- } else if (value instanceof String) { >- value = Boolean.valueOf((String) value); >- } else { >- throw new IllegalArgumentException("Value of type Boolean is expected"); >- } >- } else if (Character.TYPE.equals(iClass) || Character.class.equals(iClass)) { >- if (value instanceof Character) { >- // ok >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- throw new IllegalArgumentException(); //XXX: ? >- } else { >- value = new Character(s.charAt(0)); >- } >- } else { >- throw new IllegalArgumentException("Value of type Character is expected"); >- } >- } else if (Byte.TYPE.equals(iClass) || Byte.class.equals(iClass)) { >- if (value instanceof Byte) { >- // ok >- } else if (value instanceof Number) { >- value = new Byte(((Number) value).byteValue()); >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- value = null; >- } else { >- try { >- value = Byte.valueOf(s); >- } catch (NumberFormatException nfe) { >- throw new IllegalArgumentException("String value does not convert to Byte value"); >- } >- } >- } else { >- throw new IllegalArgumentException("Value of type Byte is expected"); >- } >- } else if (Short.TYPE.equals(iClass) || Short.class.equals(iClass)) { >- if (value instanceof Short) { >- // ok >- } else if (value instanceof Number) { >- value = new Short(((Number) value).shortValue()); >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- value = null; >- } else { >- try { >- value = Short.valueOf(s); >- } catch (NumberFormatException nfe) { >- throw new IllegalArgumentException("String value does not convert to Short value"); >- } >- } >- } else { >- throw new IllegalArgumentException("Value of type Short is expected"); >- } >- } else if (Integer.TYPE.equals(iClass) || Integer.class.equals(iClass)) { >- if (value instanceof Integer) { >- // ok >- } else if (value instanceof Number) { >- value = new Integer(((Number) value).intValue()); >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- value = null; >- } else { >- try { >- value = Integer.valueOf(s); >- } catch (NumberFormatException nfe) { >- throw new IllegalArgumentException("String value does not convert to Integer value"); >- } >- } >- } else { >- throw new IllegalArgumentException("Value of type Integer is expected"); >- } >- } else if (Long.TYPE.equals(iClass) || Long.class.equals(iClass)) { >- if (value instanceof Long) { >- // ok >- } else if (value instanceof Number) { >- value = new Long(((Number) value).longValue()); >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- value = null; >- } else { >- try { >- value = Long.valueOf(s); >- } catch (NumberFormatException nfe) { >- throw new IllegalArgumentException("String value does not convert to Long value"); >- } >- } >- } else { >- throw new IllegalArgumentException("Value of type Long is expected"); >- } >- } else if (Float.TYPE.equals(iClass) || Float.class.equals(iClass)) { >- if (value instanceof Float) { >- // ok >- } else if (value instanceof Number) { >- value = new Float(((Number) value).floatValue()); >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- value = null; >- } else { >- try { >- value = Float.valueOf(s); >- } catch (NumberFormatException nfe) { >- throw new IllegalArgumentException("String value does not convert to Float value"); >- } >- } >- } else { >- throw new IllegalArgumentException("Value of type Float is expected"); >- } >- } else if (Double.TYPE.equals(iClass) || Double.class.equals(iClass)) { >- if (value instanceof Double) { >- // ok >- } else if (value instanceof Number) { >- value = new Double(((Number) value).doubleValue()); >- } else if (value instanceof String) { >- String s = (String) value; >- if (s.length() == 0) { >- value = null; >- } else { >- try { >- value = Double.valueOf(s); >- } catch (NumberFormatException nfe) { >- throw new IllegalArgumentException("String value does not convert to Double value"); >- } >- } >- } else { >- throw new IllegalArgumentException("Value of type Double is expected"); >- } >- } else if (String.class.equals(iClass)) { >- value = String.valueOf(value); >- } else if (type instanceof <%=importManager.getImportedName("org.eclipse.emf.ecore.EEnum")%>) { >- if (value instanceof String) { >- <%=importManager.getImportedName("org.eclipse.emf.ecore.EEnumLiteral")%> literal = ((<%=importManager.getImportedName("org.eclipse.emf.ecore.EEnum")%>) type).getEEnumLiteralByLiteral((String) value); >- if (literal == null) { >- throw new IllegalArgumentException("Unknown literal: " + value); >- } else { >- value = literal.getInstance(); >- } >- } else { >- throw new IllegalArgumentException("Value of type String is expected"); >- } >- } else { >- throw new IllegalArgumentException("Unsupported type"); >- } >- return value; >- } >-} >-<%importManager.emitSortedImports();%> >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/policies/BendpointEditPolicyGenerator.java >=================================================================== >RCS file: src-templates/org/eclipse/gmf/codegen/templates/lite/policies/BendpointEditPolicyGenerator.java >diff -N src-templates/org/eclipse/gmf/codegen/templates/lite/policies/BendpointEditPolicyGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/policies/BendpointEditPolicyGenerator.java 9 Aug 2006 14:34:54 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,162 +0,0 @@ >-package org.eclipse.gmf.codegen.templates.lite.policies; >- >-import org.eclipse.gmf.common.codegen.*; >-import org.eclipse.gmf.codegen.gmfgen.*; >- >-public class BendpointEditPolicyGenerator >-{ >- protected static String nl; >- public static synchronized BendpointEditPolicyGenerator create(String lineSeparator) >- { >- nl = lineSeparator; >- BendpointEditPolicyGenerator result = new BendpointEditPolicyGenerator(); >- nl = null; >- return result; >- } >- >- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; >- protected final String TEXT_1 = ""; >- protected final String TEXT_2 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class BendpointEditPolicy extends "; >- protected final String TEXT_3 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_4 = " getDiagramEdge() {" + NL + "\t\treturn ("; >- protected final String TEXT_5 = ")getHost().getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_6 = " getCreateBendpointCommand("; >- protected final String TEXT_7 = " request) {" + NL + "\t\treturn getModifyBendpointCommand(new BendpointCreator(request.getIndex(), request.getLocation()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_8 = " getDeleteBendpointCommand("; >- protected final String TEXT_9 = " request) {" + NL + "\t\treturn getModifyBendpointCommand(new BendpointDeleter(request.getIndex()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_10 = " getMoveBendpointCommand("; >- protected final String TEXT_11 = " request) {" + NL + "\t\treturn getModifyBendpointCommand(new BendpointMover(request.getIndex(), request.getLocation()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_12 = " getModifyBendpointCommand(final BendpointModifier modifier) {" + NL + "\t\t"; >- protected final String TEXT_13 = " editingDomain = "; >- protected final String TEXT_14 = ".getEditingDomain(getDiagramEdge().getDiagram().getElement());" + NL + "\t\treturn new "; >- protected final String TEXT_15 = "(editingDomain, new BendpointModificationCommand(modifier));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class BendpointModificationCommand extends "; >- protected final String TEXT_16 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate BendpointModifier bendpointModifier; " + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_17 = " oldPoints;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic BendpointModificationCommand(BendpointModifier bendpointModifier) {" + NL + "\t\t\tthis.bendpointModifier = bendpointModifier;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t"; >- protected final String TEXT_18 = " connection = getConnection();" + NL + "\t\t\tfinal "; >- protected final String TEXT_19 = " ptRef1 = connection.getSourceAnchor().getReferencePoint().getCopy();" + NL + "\t\t\tconnection.translateToRelative(ptRef1);" + NL + "\t\t\tfinal "; >- protected final String TEXT_20 = " ptRef2 = connection.getTargetAnchor().getReferencePoint().getCopy();" + NL + "\t\t\tconnection.translateToRelative(ptRef2);" + NL + "\t\t\t"; >- protected final String TEXT_21 = " bendpoints = ("; >- protected final String TEXT_22 = ") getDiagramEdge().getBendpoints();" + NL + "\t\t\tif (bendpoints == null) {" + NL + "\t\t\t\tbendpoints = "; >- protected final String TEXT_23 = ".eINSTANCE.createRelativeBendpoints();" + NL + "\t\t\t\tgetDiagramEdge().setBendpoints(bendpoints);" + NL + "\t\t\t}" + NL + "\t\t\toldPoints = bendpoints.getPoints();" + NL + "\t\t\t"; >- protected final String TEXT_24 = " newPoints = new "; >- protected final String TEXT_25 = "(oldPoints);" + NL + "\t\t\tbendpointModifier.applyModification(newPoints, new BendpointConverter() {" + NL + "\t\t\t\tpublic "; >- protected final String TEXT_26 = " convert("; >- protected final String TEXT_27 = " point) {" + NL + "\t\t\t\t\t"; >- protected final String TEXT_28 = " s = point.getDifference(ptRef1);" + NL + "\t\t\t\t\t"; >- protected final String TEXT_29 = " t = point.getDifference(ptRef2);" + NL + "\t\t\t\t\treturn new "; >- protected final String TEXT_30 = "(s.width, s.height, t.width, t.height);" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t\tbendpoints.setPoints(newPoints);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t"; >- protected final String TEXT_31 = " bendpoints = ("; >- protected final String TEXT_32 = ") getDiagramEdge().getBendpoints();" + NL + "\t\t\tbendpoints.setPoints(oldPoints);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static interface BendpointConverter {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic "; >- protected final String TEXT_33 = " convert("; >- protected final String TEXT_34 = " point);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static interface BendpointModifier {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void applyModification("; >- protected final String TEXT_35 = "/*<"; >- protected final String TEXT_36 = ">*/ originalBendpoints, BendpointConverter converter);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class BendpointDeleter implements BendpointModifier {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate int index;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic BendpointDeleter(int index) {" + NL + "\t\t\tthis.index = index;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void applyModification("; >- protected final String TEXT_37 = " originalBendpoints, BendpointConverter converter) {" + NL + "\t\t\toriginalBendpoints.remove(index);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class BendpointMover implements BendpointModifier {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate int index;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_38 = " point;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic BendpointMover(int index, "; >- protected final String TEXT_39 = " point) {" + NL + "\t\t\tthis.index = index;" + NL + "\t\t\tthis.point = point;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void applyModification("; >- protected final String TEXT_40 = " originalBendpoints, BendpointConverter converter) {" + NL + "\t\t\toriginalBendpoints.set(index, converter.convert(point));" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class BendpointCreator implements BendpointModifier {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate int index;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; >- protected final String TEXT_41 = " point;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic BendpointCreator(int index, "; >- protected final String TEXT_42 = " point) {" + NL + "\t\t\tthis.index = index;" + NL + "\t\t\tthis.point = point;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void applyModification("; >- protected final String TEXT_43 = " originalBendpoints, BendpointConverter converter) {" + NL + "\t\t\toriginalBendpoints.add(index, converter.convert(point));" + NL + "\t\t}" + NL + "\t}" + NL + "}"; >- protected final String TEXT_44 = NL; >- >- public String generate(Object argument) >- { >- final StringBuffer stringBuffer = new StringBuffer(); >- >-GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; >-ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; >- >- stringBuffer.append(TEXT_1); >- >-importManager.emitPackageStatement(stringBuffer); >-importManager.markImportLocation(stringBuffer); >- >- stringBuffer.append(TEXT_2); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.BendpointEditPolicy")); >- stringBuffer.append(TEXT_3); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_4); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >- stringBuffer.append(TEXT_5); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_6); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.BendpointRequest")); >- stringBuffer.append(TEXT_7); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_8); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.BendpointRequest")); >- stringBuffer.append(TEXT_9); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_10); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.BendpointRequest")); >- stringBuffer.append(TEXT_11); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); >- stringBuffer.append(TEXT_12); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >- stringBuffer.append(TEXT_13); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >- stringBuffer.append(TEXT_14); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartsPackageName() + ".WrappingCommand")); >- stringBuffer.append(TEXT_15); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); >- stringBuffer.append(TEXT_16); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_17); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Connection")); >- stringBuffer.append(TEXT_18); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_19); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_20); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); >- stringBuffer.append(TEXT_21); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); >- stringBuffer.append(TEXT_22); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >- stringBuffer.append(TEXT_23); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_24); >- stringBuffer.append(importManager.getImportedName("java.util.ArrayList")); >- stringBuffer.append(TEXT_25); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); >- stringBuffer.append(TEXT_26); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_27); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); >- stringBuffer.append(TEXT_28); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")); >- stringBuffer.append(TEXT_29); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); >- stringBuffer.append(TEXT_30); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); >- stringBuffer.append(TEXT_31); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.RelativeBendpoints")); >- stringBuffer.append(TEXT_32); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); >- stringBuffer.append(TEXT_33); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_34); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_35); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint")); >- stringBuffer.append(TEXT_36); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_37); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_38); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_39); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_40); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_41); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point")); >- stringBuffer.append(TEXT_42); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >- stringBuffer.append(TEXT_43); >- importManager.emitSortedImports(); >- stringBuffer.append(TEXT_44); >- return stringBuffer.toString(); >- } >-} >#P org.eclipse.gmf.runtime.lite >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ChildNotationModelRefresher.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ChildNotationModelRefresher.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ChildNotationModelRefresher.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ChildNotationModelRefresher.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,75 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import java.util.HashMap; >+import java.util.Iterator; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.emf.common.command.Command; >+import org.eclipse.emf.common.command.CompoundCommand; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand; >+import org.eclipse.gmf.runtime.lite.commands.RemoveNotationalElementCommand; >+import org.eclipse.gmf.runtime.lite.commands.ReplaceNotationalElementCommand; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * A notation model refresher that is specifically suited to update children of the element. >+ */ >+public abstract class ChildNotationModelRefresher extends AbstractNotationModelRefresher { >+ public ChildNotationModelRefresher() { >+ } >+ >+ public Command buildRefreshNotationModelCommand() { >+ List/*<ElementDescriptor>*/ semanticChildren = getSemanticChildNodes(); >+ List/*<View>*/ notationalChildren = getHost().getChildren(); >+ if (semanticChildren.isEmpty() && notationalChildren.isEmpty()) { >+ return null; >+ } >+ final Map semanticToNotational = new HashMap(); >+ for(Iterator it = notationalChildren.iterator(); it.hasNext(); ) { >+ View next = (View) it.next(); >+ EObject nextSemantic = next.getElement(); >+ if (nextSemantic != null) { >+ semanticToNotational.put(nextSemantic, next); >+ } >+ } >+ CompoundCommand command = new CompoundCommand(); >+ for(Iterator it = semanticChildren.iterator(); it.hasNext(); ) { >+ ElementDescriptor next = (ElementDescriptor) it.next(); >+ EObject node = next.getElement(); >+ View currentView = (View) semanticToNotational.remove(node); >+ int nodeVisualID = next.getVisualID(); >+ if (currentView == null) { >+ if (shouldCreateView(next)) { >+ command.appendIfCanExecute(getCreateNotationalElementCommand(next)); >+ } >+ } else if (nodeVisualID != getVisualID(currentView)) { >+ CreateNotationalElementCommand notationalCommand = getCreateNotationalElementCommand(next); >+ if (notationalCommand != null) { >+ command.appendIfCanExecute(new ReplaceNotationalElementCommand(getHost(), notationalCommand, currentView)); >+ } else { >+ command.appendIfCanExecute(new RemoveNotationalElementCommand(getHost(), currentView)); >+ } >+ } >+ } >+ for(Iterator it = semanticToNotational.values().iterator(); it.hasNext(); ) { >+ View obsoleteView = (View) it.next(); >+ command.appendIfCanExecute(new RemoveNotationalElementCommand(getHost(), obsoleteView)); >+ } >+ return command.getCommandList().isEmpty() ? null : command; >+ } >+ >+ protected abstract List/*<ElementDescriptor>*/ getSemanticChildNodes(); >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/OwnedLinksNotationModelRefresher.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/OwnedLinksNotationModelRefresher.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/OwnedLinksNotationModelRefresher.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/OwnedLinksNotationModelRefresher.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,129 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import java.util.HashMap; >+import java.util.Iterator; >+import java.util.LinkedList; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.emf.common.command.Command; >+import org.eclipse.emf.common.command.CompoundCommand; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand; >+import org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeSourceCommand; >+import org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeTargetCommand; >+import org.eclipse.gmf.runtime.lite.commands.RemoveNotationalEdgeCommand; >+import org.eclipse.gmf.runtime.lite.commands.ReplaceNotationalElementCommand; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+ >+public abstract class OwnedLinksNotationModelRefresher extends AbstractNotationModelRefresher { >+ private final IViewService myViewService; >+ >+ public OwnedLinksNotationModelRefresher(IViewService viewService) { >+ myViewService = viewService; >+ } >+ >+ public Command buildRefreshNotationModelCommand() { >+ List/*<LinkDescriptor>*/ semanticChildLinks = getSemanticChildLinks(); >+ List/*<Edge>*/ notationalChildLinks = getNotationalChildLinks(); >+ if (semanticChildLinks.isEmpty() && notationalChildLinks.isEmpty()) { >+ return null; >+ } >+ final Map semanticToNotationalTypeBasedLinks = new HashMap(); >+ final Map/*<EObject, List<Edge>>*/ semanticToNotationalFeatureBasedLinks = new HashMap(); >+ for(Iterator it = notationalChildLinks.iterator(); it.hasNext(); ) { >+ Edge next = (Edge) it.next(); >+ EObject nextSemantic = next.getElement(); >+ if (nextSemantic != null) { >+ semanticToNotationalTypeBasedLinks.put(nextSemantic, next); >+ } else { >+ List featureBasedLinksForSource = (List) semanticToNotationalFeatureBasedLinks.get(next.getSource().getElement()); >+ if (featureBasedLinksForSource == null) { >+ featureBasedLinksForSource = new LinkedList(); >+ semanticToNotationalFeatureBasedLinks.put(next.getSource().getElement(), featureBasedLinksForSource); >+ } >+ featureBasedLinksForSource.add(next); >+ } >+ } >+ Diagram parentView = getHost().getDiagram(); >+ CompoundCommand command = new CompoundCommand(); >+ for(Iterator it = semanticChildLinks.iterator(); it.hasNext(); ) { >+ LinkDescriptor next = (LinkDescriptor) it.next(); >+ EObject nextLinkElement = next.getElement(); >+ Edge currentEdge; >+ if (nextLinkElement != null) { >+ currentEdge = (Edge) semanticToNotationalTypeBasedLinks.remove(nextLinkElement); >+ } else { >+ List featureBasedLinksForSource = (List) semanticToNotationalFeatureBasedLinks.get(next.getSource()); >+ if (featureBasedLinksForSource == null || featureBasedLinksForSource.isEmpty()) { >+ currentEdge = null; >+ } else { >+ currentEdge = (Edge) featureBasedLinksForSource.remove(0); >+ } >+ } >+ int linkVisualID = next.getVisualID(); >+ if (currentEdge == null) { >+ if (nextLinkElement == null || shouldCreateView(next)) { >+ command.appendIfCanExecute(getCreateNotationalElementCommand(next)); >+ } >+ } else { >+ boolean changedSource = currentEdge.getSource().getElement() != next.getSource(); >+ boolean changedTarget = currentEdge.getTarget().getElement() != next.getDestination(); >+ boolean changedVID = linkVisualID != getVisualID(currentEdge); >+ if (!changedSource && !changedTarget) { >+ if (changedVID) { >+ CreateNotationalElementCommand notationalCommand = getCreateNotationalElementCommand(next); >+ if (notationalCommand != null) { >+ command.appendIfCanExecute(new ReplaceNotationalElementCommand(parentView, notationalCommand, currentEdge)); >+ } else { >+ command.appendIfCanExecute(new RemoveNotationalEdgeCommand(parentView, currentEdge)); >+ } >+ } >+ } else { >+ if (changedVID) { >+ command.appendIfCanExecute(new RemoveNotationalEdgeCommand(parentView, currentEdge)); >+ command.appendIfCanExecute(getCreateNotationalElementCommand(next)); >+ } else { >+ View newSourceView = myViewService.findView(next.getSource()); >+ if (changedSource && newSourceView != null) { >+ command.appendIfCanExecute(new ReconnectNotationalEdgeSourceCommand(currentEdge, newSourceView)); >+ } >+ View newTargetView = myViewService.findView(next.getDestination()); >+ if (changedTarget && newTargetView != null) { >+ command.appendIfCanExecute(new ReconnectNotationalEdgeTargetCommand(currentEdge, newTargetView)); >+ } >+ } >+ } >+ } >+ } >+ for(Iterator it = semanticToNotationalTypeBasedLinks.values().iterator(); it.hasNext(); ) { >+ View obsoleteView = (View) it.next(); >+ command.appendIfCanExecute(new RemoveNotationalEdgeCommand(parentView, obsoleteView)); >+ } >+ for(Iterator it = semanticToNotationalFeatureBasedLinks.values().iterator(); it.hasNext(); ) { >+ List obsoleteViews = (List) it.next(); >+ for(Iterator obsoleteViewsIt = obsoleteViews.iterator(); obsoleteViewsIt.hasNext(); ) { >+ View obsoleteView = (View) obsoleteViewsIt.next(); >+ command.appendIfCanExecute(new RemoveNotationalEdgeCommand(parentView, obsoleteView)); >+ } >+ } >+ return command.getCommandList().isEmpty() ? null : command; >+ } >+ >+ protected abstract List/*<LinkDescriptor>*/ getSemanticChildLinks(); >+ protected abstract List/*<Edge>*/ getNotationalChildLinks(); >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalEdgeCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalEdgeCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalEdgeCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalEdgeCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class RemoveNotationalEdgeCommand extends RemoveNotationalElementCommand { >+ private View source; >+ private View target; >+ >+ public RemoveNotationalEdgeCommand(View parentView, View childView) { >+ super(parentView, childView); >+ } >+ >+ public boolean canExecute() { >+ return getParent() instanceof Diagram && getChildView() instanceof Edge >+ && ((Diagram) getParent()).getEdges().contains(getChildView()); >+ } >+ >+ public void execute() { >+ Edge edgeToRemove = (Edge) getChildView(); >+ source = edgeToRemove.getSource(); >+ target = edgeToRemove.getTarget(); >+ edgeToRemove.setSource(null); >+ edgeToRemove.setTarget(null); >+ ((Diagram) getParent()).removeEdge(edgeToRemove); >+ sweepElement(); >+ } >+ >+ public void undo() { >+ restoreElement(); >+ Edge edge = (Edge) getChildView(); >+ ((Diagram) getParent()).insertEdge(edge); >+ edge.setSource(source); >+ edge.setTarget(target); >+ } >+} >Index: .cvsignore >=================================================================== >RCS file: .cvsignore >diff -N .cvsignore >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .cvsignore 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1 @@ >+bin >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/LinkDescriptor.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/LinkDescriptor.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/LinkDescriptor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/LinkDescriptor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,37 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import org.eclipse.emf.ecore.EObject; >+ >+public class LinkDescriptor extends ElementDescriptor { >+ private EObject mySource; >+ private EObject myDestination; >+ >+ public LinkDescriptor(EObject source, EObject destination, EObject linkElement, int linkVID) { >+ super(linkElement, linkVID); >+ mySource = source; >+ myDestination = destination; >+ } >+ >+ public LinkDescriptor(EObject source, EObject destination, int linkVID) { >+ this(source, destination, null, linkVID); >+ } >+ >+ public EObject getSource() { >+ return mySource; >+ } >+ >+ public EObject getDestination() { >+ return myDestination; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/policies/BendpointEditPolicy.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/policies/BendpointEditPolicy.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/policies/BendpointEditPolicy.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/policies/BendpointEditPolicy.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,148 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.policies; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.draw2d.Connection; >+import org.eclipse.draw2d.geometry.Dimension; >+import org.eclipse.draw2d.geometry.Point; >+import org.eclipse.emf.common.command.AbstractCommand; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.transaction.util.TransactionUtil; >+import org.eclipse.gef.commands.Command; >+import org.eclipse.gef.requests.BendpointRequest; >+import org.eclipse.gmf.runtime.lite.commands.WrappingCommand; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.RelativeBendpoints; >+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; >+ >+ >+public class BendpointEditPolicy extends org.eclipse.gef.editpolicies.BendpointEditPolicy { >+ protected Edge getDiagramEdge() { >+ return (Edge) getHost().getModel(); >+ } >+ >+ protected Command getCreateBendpointCommand(BendpointRequest request) { >+ return getModifyBendpointCommand(new BendpointCreator(request.getIndex(), request.getLocation())); >+ } >+ >+ protected Command getDeleteBendpointCommand(BendpointRequest request) { >+ return getModifyBendpointCommand(new BendpointDeleter(request.getIndex())); >+ } >+ >+ protected Command getMoveBendpointCommand(BendpointRequest request) { >+ return getModifyBendpointCommand(new BendpointMover(request.getIndex(), request.getLocation())); >+ } >+ >+ private Command getModifyBendpointCommand(final BendpointModifier modifier) { >+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(getDiagramEdge().getDiagram().getElement()); >+ return new WrappingCommand(editingDomain, new BendpointModificationCommand(modifier)); >+ } >+ >+ private class BendpointModificationCommand extends AbstractCommand { >+ private BendpointModifier bendpointModifier; >+ private List oldPoints; >+ >+ public BendpointModificationCommand(BendpointModifier bendpointModifier) { >+ this.bendpointModifier = bendpointModifier; >+ } >+ >+ public void execute() { >+ Connection connection = getConnection(); >+ final Point ptRef1 = connection.getSourceAnchor().getReferencePoint().getCopy(); >+ connection.translateToRelative(ptRef1); >+ final Point ptRef2 = connection.getTargetAnchor().getReferencePoint().getCopy(); >+ connection.translateToRelative(ptRef2); >+ RelativeBendpoints bendpoints = (RelativeBendpoints) getDiagramEdge().getBendpoints(); >+ if (bendpoints == null) { >+ bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); >+ getDiagramEdge().setBendpoints(bendpoints); >+ } >+ oldPoints = bendpoints.getPoints(); >+ List newPoints = new ArrayList(oldPoints); >+ bendpointModifier.applyModification(newPoints, new BendpointConverter() { >+ public RelativeBendpoint convert(Point point) { >+ Dimension s = point.getDifference(ptRef1); >+ Dimension t = point.getDifference(ptRef2); >+ return new RelativeBendpoint(s.width, s.height, t.width, t.height); >+ } >+ }); >+ bendpoints.setPoints(newPoints); >+ } >+ >+ public void undo() { >+ RelativeBendpoints bendpoints = (RelativeBendpoints) getDiagramEdge().getBendpoints(); >+ bendpoints.setPoints(oldPoints); >+ } >+ >+ public void redo() { >+ execute(); >+ } >+ >+ public boolean canExecute() { >+ return true; >+ } >+ } >+ >+ private static interface BendpointConverter { >+ public RelativeBendpoint convert(Point point); >+ } >+ >+ private static interface BendpointModifier { >+ public void applyModification(List/*<RelativeBendpoint>*/ originalBendpoints, BendpointConverter converter); >+ } >+ >+ private static class BendpointDeleter implements BendpointModifier { >+ private int index; >+ >+ public BendpointDeleter(int index) { >+ this.index = index; >+ } >+ >+ public void applyModification(List originalBendpoints, BendpointConverter converter) { >+ originalBendpoints.remove(index); >+ } >+ } >+ >+ private static class BendpointMover implements BendpointModifier { >+ private int index; >+ >+ private Point point; >+ >+ public BendpointMover(int index, Point point) { >+ this.index = index; >+ this.point = point; >+ } >+ >+ public void applyModification(List originalBendpoints, BendpointConverter converter) { >+ originalBendpoints.set(index, converter.convert(point)); >+ } >+ } >+ >+ private static class BendpointCreator implements BendpointModifier { >+ private int index; >+ >+ private Point point; >+ >+ public BendpointCreator(int index, Point point) { >+ this.index = index; >+ this.point = point; >+ } >+ >+ public void applyModification(List originalBendpoints, BendpointConverter converter) { >+ originalBendpoints.add(index, converter.convert(point)); >+ } >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalNodeCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalNodeCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalNodeCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalNodeCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class CreateNotationalNodeCommand extends CreateNotationalElementCommand { >+ public CreateNotationalNodeCommand(View parent) { >+ super(parent); >+ } >+ >+ public boolean canExecute() { >+ return getCreatedView() instanceof Node; >+ } >+ >+ public boolean canUndo() { >+ return true; >+ } >+ >+ public void execute() { >+ getParent().insertChild(getCreatedView()); >+ } >+ >+ public void undo() { >+ getParent().removeChild(getCreatedView()); >+ } >+ >+ public void redo() { >+ execute(); >+ } >+} >Index: .project >=================================================================== >RCS file: .project >diff -N .project >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .project 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,28 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<projectDescription> >+ <name>org.eclipse.gmf.runtime.lite</name> >+ <comment></comment> >+ <projects> >+ </projects> >+ <buildSpec> >+ <buildCommand> >+ <name>org.eclipse.jdt.core.javabuilder</name> >+ <arguments> >+ </arguments> >+ </buildCommand> >+ <buildCommand> >+ <name>org.eclipse.pde.ManifestBuilder</name> >+ <arguments> >+ </arguments> >+ </buildCommand> >+ <buildCommand> >+ <name>org.eclipse.pde.SchemaBuilder</name> >+ <arguments> >+ </arguments> >+ </buildCommand> >+ </buildSpec> >+ <natures> >+ <nature>org.eclipse.pde.PluginNature</nature> >+ <nature>org.eclipse.jdt.core.javanature</nature> >+ </natures> >+</projectDescription> >Index: build.properties >=================================================================== >RCS file: build.properties >diff -N build.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ build.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,4 @@ >+source.. = src/ >+output.. = bin/ >+bin.includes = META-INF/,\ >+ . >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/IUpdatableEditPart.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/IUpdatableEditPart.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/IUpdatableEditPart.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/IUpdatableEditPart.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,46 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update; >+ >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.Iterator; >+ >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.ecore.EStructuralFeature; >+ >+public interface IUpdatableEditPart { >+ public Refresher getRefresher(EStructuralFeature feature, Notification msg); >+ >+ public interface Refresher { >+ public void refresh(); >+ } >+ >+ public class CompositeRefresher implements Refresher { >+ public void addRefresher(Refresher refresher) { >+ refreshers.add(refresher); >+ } >+ >+ public void removeRefresher(Refresher refresher) { >+ refreshers.remove(refresher); >+ } >+ >+ public void refresh() { >+ for(Iterator it = refreshers.iterator(); it.hasNext(); ) { >+ Refresher next = (Refresher) it.next(); >+ next.refresh(); >+ } >+ } >+ >+ private Collection/*<Refresher>*/ refreshers = new ArrayList(); >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/properties/PropertySourceProvider.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/properties/PropertySourceProvider.java >diff -N src/org/eclipse/gmf/runtime/lite/properties/PropertySourceProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/properties/PropertySourceProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,63 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.properties; >+ >+import org.eclipse.emf.common.notify.AdapterFactory; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.ui.views.properties.IPropertySource; >+import org.eclipse.ui.views.properties.IPropertySourceProvider; >+ >+ >+public class PropertySourceProvider implements IPropertySourceProvider { >+ private AdapterFactoryContentProvider adapterFactoryContentProvider; >+ >+ public PropertySourceProvider(AdapterFactory domainAdapterFactory) { >+ adapterFactoryContentProvider = new AdapterFactoryContentProvider(domainAdapterFactory); >+ } >+ >+ public IPropertySource getPropertySource(Object object) { >+ if (object instanceof IPropertySource) { >+ return (IPropertySource) object; >+ } >+ View view = getNotationElement(object); >+ if (view == null) { >+ return adapterFactoryContentProvider.getPropertySource(object); >+ } >+ //XXX: compose with view properties >+ EObject domainElement = view.getElement(); >+ if (domainElement == null && view instanceof Edge) { >+ Edge edge = (Edge) view; >+ domainElement = edge.getTarget().getElement(); >+ } >+ return adapterFactoryContentProvider.getPropertySource(domainElement); >+ } >+ >+ private View getNotationElement(Object object) { >+ View view = null; >+ if (object instanceof View) { >+ view = (View) object; >+ } else if (object instanceof EditPart) { >+ EditPart editPart = (EditPart) object; >+ if (editPart.getModel() instanceof View) { >+ view = (View) editPart.getModel(); >+ } >+ } >+ if (view != null) { >+ return view; >+ } >+ return null; >+ } >+} >Index: src/org/eclipse/gmf/internal/runtime/lite/Activator.java >=================================================================== >RCS file: src/org/eclipse/gmf/internal/runtime/lite/Activator.java >diff -N src/org/eclipse/gmf/internal/runtime/lite/Activator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/internal/runtime/lite/Activator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,90 @@ >+package org.eclipse.gmf.internal.runtime.lite; >+ >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.ui.plugin.AbstractUIPlugin; >+import org.osgi.framework.BundleContext; >+ >+/** >+ * The activator class controls the plug-in life cycle >+ */ >+public class Activator extends AbstractUIPlugin { >+ >+ // The plug-in ID >+ public static final String PLUGIN_ID = "org.eclipse.gmf.runtime.lite"; >+ >+ // The shared instance >+ private static Activator plugin; >+ >+ /** >+ * The constructor >+ */ >+ public Activator() { >+ plugin = this; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) >+ */ >+ public void start(BundleContext context) throws Exception { >+ super.start(context); >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) >+ */ >+ public void stop(BundleContext context) throws Exception { >+ plugin = null; >+ super.stop(context); >+ } >+ >+ /** >+ * Returns the shared instance >+ * >+ * @return the shared instance >+ */ >+ public static Activator getDefault() { >+ return plugin; >+ } >+ >+ public void logError(String error) { >+ logError(error, null); >+ } >+ >+ /** >+ * @param throwable actual error or null could be passed >+ */ >+ public void logError(String error, Throwable throwable) { >+ log(error, throwable, IStatus.ERROR); >+ } >+ >+ private void debug(String message, Throwable throwable) { >+ if (!isDebugging()) { >+ return; >+ } >+ if (message != null) { >+ System.err.println(message); >+ } >+ if (throwable != null) { >+ throwable.printStackTrace(); >+ } >+ } >+ >+ public void logWarning(String error) { >+ logWarning(error, null); >+ } >+ >+ public void logWarning(String error, Throwable throwable) { >+ log(error, throwable, IStatus.WARNING); >+ } >+ >+ private void log(String error, Throwable throwable, int severity) { >+ if (error == null && throwable != null) { >+ error = throwable.getMessage(); >+ } >+ getLog().log(new Status(severity, getBundle().getSymbolicName(), IStatus.OK, error, throwable)); >+ debug(error, throwable); >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/IViewService.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/IViewService.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/IViewService.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/IViewService.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,22 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * Service that knows how to find a view that corresponds to the given notational element. >+ */ >+public interface IViewService { >+ public View findView(EObject domainElement); >+} >Index: plugin.properties >=================================================================== >RCS file: plugin.properties >diff -N plugin.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,12 @@ >+############################################################################### >+# Copyright (c) 2006 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 >+############################################################################### >+pluginName = GMF Pure-GEF Runtime >+providerName = Eclipse.org >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ElementDescriptor.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ElementDescriptor.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ElementDescriptor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ElementDescriptor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,33 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import org.eclipse.emf.ecore.EObject; >+ >+ >+public class ElementDescriptor { >+ private final EObject myElement; >+ private final int myVisualID; >+ >+ public ElementDescriptor(EObject element, int visualID) { >+ myElement = element; >+ myVisualID = visualID; >+ } >+ >+ public EObject getElement() { >+ return myElement; >+ } >+ >+ public int getVisualID() { >+ return myVisualID; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/properties/UndoablePropertySheetEntry.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/properties/UndoablePropertySheetEntry.java >diff -N src/org/eclipse/gmf/runtime/lite/properties/UndoablePropertySheetEntry.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/properties/UndoablePropertySheetEntry.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,125 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.properties; >+ >+import java.util.EventObject; >+ >+import org.eclipse.gef.commands.CommandStack; >+import org.eclipse.gef.commands.CommandStackListener; >+import org.eclipse.gef.commands.CompoundCommand; >+import org.eclipse.gef.commands.ForwardUndoCompoundCommand; >+import org.eclipse.ui.views.properties.IPropertySource; >+import org.eclipse.ui.views.properties.PropertySheetEntry; >+ >+/** >+ * Copied from <code>org.eclipse.gef.ui.properties.UndoablePropertySheetEntry</code> to provide EMF compatibility. >+ */ >+public class UndoablePropertySheetEntry extends PropertySheetEntry { >+ private CommandStackListener commandStackListener; >+ >+ private CommandStack stack; >+ >+ private UndoablePropertySheetEntry() { >+ } >+ >+ /** >+ * Constructs the root entry using the given command stack. >+ * @param stack the command stack >+ */ >+ public UndoablePropertySheetEntry(CommandStack stack) { >+ setCommandStack(stack); >+ } >+ >+ protected PropertySheetEntry createChildEntry() { >+ return new UndoablePropertySheetEntry(); >+ } >+ >+ public void dispose() { >+ if (stack != null) >+ stack.removeCommandStackListener(commandStackListener); >+ super.dispose(); >+ } >+ >+ CommandStack getCommandStack() { >+ //only the root has, and is listening too, the command stack >+ if (getParent() != null) { >+ return ((UndoablePropertySheetEntry)getParent()).getCommandStack(); >+ } >+ return stack; >+ } >+ >+ public void resetPropertyValue() { >+ CompoundCommand cc = new CompoundCommand(); >+ ResetValueCommand restoreCmd; >+ >+ if (getParent() == null) { >+ // root does not have a default value >+ return; >+ } >+ >+ // Use our parent's values to reset our values. >+ boolean change = false; >+ Object[] objects = getParent().getValues(); >+ for (int i = 0; i < objects.length; i++) { >+ IPropertySource source = getPropertySource(objects[i]); >+ if (source.isPropertySet(getDescriptor().getId())) { >+ //source.resetPropertyValue(getDescriptor()getId()); >+ restoreCmd = new ResetValueCommand(); >+ restoreCmd.setTarget(source); >+ restoreCmd.setPropertyId(getDescriptor().getId()); >+ cc.add(restoreCmd); >+ change = true; >+ } >+ } >+ if (change) { >+ getCommandStack().execute(cc); >+ refreshFromRoot(); >+ } >+ } >+ >+ void setCommandStack(CommandStack stack) { >+ this.stack = stack; >+ commandStackListener = new CommandStackListener() { >+ public void commandStackChanged(EventObject e) { >+ refreshFromRoot(); >+ } >+ }; >+ stack.addCommandStackListener(commandStackListener); >+ } >+ >+ protected void valueChanged(PropertySheetEntry child) { >+ valueChanged((UndoablePropertySheetEntry)child, >+ new ForwardUndoCompoundCommand()); >+ } >+ >+ void valueChanged(UndoablePropertySheetEntry child, CompoundCommand command) { >+ CompoundCommand cc = new CompoundCommand(); >+ command.add(cc); >+ >+ SetValueCommand setCommand; >+ for (int i = 0; i < getValues().length; i++) { >+ setCommand = new SetValueCommand(child.getDisplayName()); >+ setCommand.setTarget(getPropertySource(getValues()[i])); >+ setCommand.setPropertyId(child.getDescriptor().getId()); >+ setCommand.setPropertyValue(child.getValues()[i]); >+ cc.add(setCommand); >+ } >+ >+ // inform our parent >+ if (getParent() != null) { >+ ((UndoablePropertySheetEntry)getParent()).valueChanged(this, command); >+ }else { >+ //I am the root entry >+ stack.execute(command); >+ } >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/requests/CreateRequestEx.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/requests/CreateRequestEx.java >diff -N src/org/eclipse/gmf/runtime/lite/requests/CreateRequestEx.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/requests/CreateRequestEx.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.requests; >+ >+import org.eclipse.gef.requests.CreateRequest; >+ >+/** >+ * A Request to create a new object of one of the specified types (Visual IDs). >+ */ >+public class CreateRequestEx extends CreateRequest { >+ private final int[] visualIds; >+ >+ /** >+ * Creates a new request to create an object of the given object types. >+ */ >+ public CreateRequestEx(int[] visualIds) { >+ this.visualIds = visualIds; >+ } >+ >+ /** >+ * Returns the types (Visual IDs) of objects whose creation is requested. >+ */ >+ public int[] getVisualIds() { >+ return visualIds; >+ } >+ >+ public void setCreatedObject(Object createdObject) { >+ ((ModelCreationFactory)getFactory()).setCreatedObject(createdObject); >+ } >+} >Index: .classpath >=================================================================== >RCS file: .classpath >diff -N .classpath >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .classpath 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<classpath> >+ <classpathentry kind="src" path="src"/> >+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> >+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> >+ <classpathentry kind="output" path="bin"/> >+</classpath> >Index: src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java >diff -N src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/parts/DiagramEditor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,318 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.parts; >+ >+import java.io.IOException; >+import java.util.ArrayList; >+import java.util.Collections; >+import java.util.EventObject; >+import java.util.Iterator; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.emf.common.notify.AdapterFactory; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory; >+import org.eclipse.gef.DefaultEditDomain; >+import org.eclipse.gef.GraphicalViewer; >+import org.eclipse.gef.RootEditPart; >+import org.eclipse.gef.commands.CommandStack; >+import org.eclipse.gef.commands.CommandStackListener; >+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart; >+import org.eclipse.gef.editparts.ScalableRootEditPart; >+import org.eclipse.gef.editparts.ZoomManager; >+import org.eclipse.gef.palette.PaletteRoot; >+import org.eclipse.gef.ui.actions.SelectionAction; >+import org.eclipse.gef.ui.actions.StackAction; >+import org.eclipse.gef.ui.actions.UpdateAction; >+import org.eclipse.gef.ui.actions.WorkbenchPartAction; >+import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; >+import org.eclipse.gmf.internal.runtime.lite.Activator; >+import org.eclipse.gmf.runtime.lite.properties.PropertySourceProvider; >+import org.eclipse.gmf.runtime.lite.properties.UndoablePropertySheetEntry; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.ui.IEditorInput; >+import org.eclipse.ui.IEditorPart; >+import org.eclipse.ui.IEditorSite; >+import org.eclipse.ui.ISelectionListener; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.PartInitException; >+import org.eclipse.ui.views.contentoutline.IContentOutlinePage; >+import org.eclipse.ui.views.properties.IPropertySheetPage; >+import org.eclipse.ui.views.properties.PropertySheetPage; >+ >+/** >+ * Common functionality of all diagram editors generated with the lite generator. >+ */ >+public abstract class DiagramEditor extends GraphicalEditorWithFlyoutPalette { >+ private static class UpdatableActionGroup { >+ public void addAction(UpdateAction action) { >+ assert action != null; >+ myActions.add(action); >+ } >+ >+ public void removeAction(UpdateAction action) { >+ myActions.remove(action); >+ } >+ >+ public void update() { >+ for (Iterator it = myActions.iterator(); it.hasNext();) { >+ UpdateAction next = (UpdateAction) it.next(); >+ next.update(); >+ } >+ } >+ >+ private ArrayList myActions = new ArrayList(); >+ } >+ >+ private TransactionalEditingDomain editingDomain; >+ >+ private boolean isDirty = false; >+ >+ private PaletteRoot paletteRoot; >+ >+ private PropertySheetPage undoablePropertySheetPage; >+ >+ private UpdatableActionGroup stackActions = new UpdatableActionGroup(); >+ >+ private CommandStackListener commandStackListener = new CommandStackListener() { >+ public void commandStackChanged(EventObject event) { >+ stackActions.update(); >+ setDirty(((CommandStack) event.getSource()).isDirty()); >+ } >+ }; >+ >+ private UpdatableActionGroup editPartActions = new UpdatableActionGroup(); >+ >+ private ISelectionListener selectionListener = new ISelectionListener() { >+ public void selectionChanged(IWorkbenchPart part, ISelection selection) { >+ editPartActions.update(); >+ } >+ }; >+ >+ private UpdatableActionGroup editorActions = new UpdatableActionGroup(); >+ >+ protected void firePropertyChange(int propertyId) { >+ super.firePropertyChange(propertyId); >+ editorActions.update(); >+ } >+ >+ /** >+ * Adds an action to this editor's <code>ActionRegistry</code>. (This is >+ * a helper method.) >+ * >+ * @param action >+ * the action to add. >+ */ >+ protected void addAction(IAction action) { >+ getActionRegistry().registerAction(action); >+ } >+ >+ /** >+ * Adds an editor action to this editor. >+ * >+ * <p> >+ * Editor actions are actions that depend and work on the editor. >+ * >+ * @param action >+ * the editor action >+ */ >+ protected void addEditorAction(WorkbenchPartAction action) { >+ getActionRegistry().registerAction(action); >+ editorActions.addAction(action); >+ } >+ >+ /** >+ * Adds an <code>EditPart</code> action to this editor. >+ * >+ * <p> >+ * <code>EditPart</code> actions are actions that depend and work on the >+ * selected <code>EditPart</code>s. >+ * >+ * @param action >+ * the <code>EditPart</code> action >+ */ >+ protected void addEditPartAction(SelectionAction action) { >+ getActionRegistry().registerAction(action); >+ editPartActions.addAction(action); >+ } >+ >+ /** >+ * Adds an <code>CommandStack</code> action to this editor. >+ * >+ * <p> >+ * <code>CommandStack</code> actions are actions that depend and work on >+ * the <code>CommandStack</code>. >+ * >+ * @param action >+ * the <code>CommandStack</code> action >+ */ >+ protected void addStackAction(StackAction action) { >+ getActionRegistry().registerAction(action); >+ stackActions.addAction(action); >+ } >+ >+ public void init(IEditorSite site, IEditorInput input) throws PartInitException { >+ setSite(site); >+ setInput(input); >+ setEditDomain(new DefaultEditDomain(this)); >+ >+ // add CommandStackListener >+ getCommandStack().addCommandStackListener(getStackActionsListener()); >+ >+ // add selection change listener >+ getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(getSelectionListener()); >+ } >+ >+ public void dispose() { >+ // remove CommandStackListener >+ getCommandStack().removeCommandStackListener(getStackActionsListener()); >+ >+ // remove selection listener >+ getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(getSelectionListener()); >+ >+ // dispose the ActionRegistry (will dispose all actions) >+ getActionRegistry().dispose(); >+ >+ } >+ >+ protected void save(IProgressMonitor progressMonitor) throws CoreException { >+ if (progressMonitor == null) { >+ progressMonitor = new NullProgressMonitor(); >+ } >+ progressMonitor.beginTask("Saving", getEditingDomain().getResourceSet().getResources().size()); >+ try { >+ for(Iterator it = getEditingDomain().getResourceSet().getResources().iterator(); it.hasNext(); ) { >+ Resource next = (Resource)it.next(); >+ if (next.isLoaded() && next.isModified()) { >+ next.save(Collections.EMPTY_MAP); >+ } >+ progressMonitor.worked(1); >+ } >+ } catch (IOException e) { >+ IStatus status = new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), 0, "Error writing file.", e); >+ throw new CoreException(status); >+ } finally { >+ progressMonitor.done(); >+ } >+ } >+ >+ public boolean isSaveAsAllowed() { >+ // TODO: should be allowed. >+ return false; >+ } >+ >+ public void doSaveAs() { >+ // TODO: Implement. >+ } >+ >+ public Object getAdapter(Class type) { >+ if (type == IPropertySheetPage.class) { >+ return getPropertySheetPage(); >+ } else if (type == IContentOutlinePage.class) { >+ return getOutlinePage(); >+ } else if (type == ZoomManager.class) { >+ return getZoomManager(); >+ } >+ return super.getAdapter(type); >+ } >+ >+ protected ZoomManager getZoomManager() { >+ return getZoomManager(getGraphicalViewer()); >+ } >+ >+ private ZoomManager getZoomManager(GraphicalViewer viewer) { >+ // get zoom manager from root edit part >+ RootEditPart rootEditPart = viewer.getRootEditPart(); >+ ZoomManager zoomManager = null; >+ if (rootEditPart instanceof ScalableFreeformRootEditPart) { >+ zoomManager = ((ScalableFreeformRootEditPart) rootEditPart).getZoomManager(); >+ } else if (rootEditPart instanceof ScalableRootEditPart) { >+ zoomManager = ((ScalableRootEditPart) rootEditPart).getZoomManager(); >+ } >+ return zoomManager; >+ } >+ >+ protected PaletteRoot getPaletteRoot() { >+ if (paletteRoot == null) { >+ paletteRoot = new PaletteRoot(); >+ configurePalette(paletteRoot); >+ } >+ return paletteRoot; >+ } >+ >+ protected abstract void configurePalette(PaletteRoot paletteRoot); >+ >+ protected CommandStackListener getStackActionsListener() { >+ return commandStackListener; >+ } >+ >+ protected IContentOutlinePage getOutlinePage() { >+ //TODO: outline page missing >+ return null; >+ } >+ >+ protected PropertySheetPage getPropertySheetPage() { >+ if (undoablePropertySheetPage == null) { >+ undoablePropertySheetPage = new PropertySheetPage(); >+ UndoablePropertySheetEntry rootEntry = new UndoablePropertySheetEntry(getCommandStack()); >+ rootEntry.setPropertySourceProvider(new PropertySourceProvider(getDomainAdapterFactory())); >+ undoablePropertySheetPage.setRootEntry(rootEntry); >+ } >+ >+ return undoablePropertySheetPage; >+ } >+ >+ private ISelectionListener getSelectionListener() { >+ return selectionListener; >+ } >+ >+ public boolean isDirty() { >+ return isDirty; >+ } >+ >+ private void setDirty(boolean dirty) { >+ if (isDirty != dirty) { >+ isDirty = dirty; >+ firePropertyChange(IEditorPart.PROP_DIRTY); >+ } >+ } >+ >+ protected TransactionalEditingDomain getEditingDomain() { >+ if (editingDomain == null) { >+ editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain(); >+ //editingDomain.setAdapterFactory(getDomainAdapterFactory()); >+ editingDomain.getResourceSet().eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(editingDomain)); >+ } >+ return editingDomain; >+ } >+ >+ protected abstract AdapterFactory getDomainAdapterFactory(); >+ >+ public void setFocus() { >+ getGraphicalViewer().getControl().setFocus(); >+ } >+ >+ public final void createPartControl(Composite parent) { >+ super.createPartControl(parent); >+ // initialize actions >+ createActions(); >+ } >+ >+} >Index: src/org/eclipse/gmf/runtime/lite/services/ParserUtil.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/services/ParserUtil.java >diff -N src/org/eclipse/gmf/runtime/lite/services/ParserUtil.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/services/ParserUtil.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,183 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.services; >+ >+import org.eclipse.emf.ecore.EAttribute; >+import org.eclipse.emf.ecore.EDataType; >+import org.eclipse.emf.ecore.EEnum; >+import org.eclipse.emf.ecore.EEnumLiteral; >+ >+ >+public class ParserUtil { >+ private ParserUtil() { >+ } >+ >+ public static Object parseValue(EAttribute feature, Object value) throws IllegalArgumentException { >+ if (value == null) { >+ throw new IllegalArgumentException(); >+ } >+ EDataType type = feature.getEAttributeType(); >+ Class iClass = type.getInstanceClass(); >+ if (Boolean.TYPE.equals(iClass) || Boolean.class.equals(iClass)) { >+ if (value instanceof Boolean) { >+ // ok >+ } else if (value instanceof String) { >+ value = Boolean.valueOf((String) value); >+ } else { >+ throw new IllegalArgumentException("Value of type Boolean is expected"); >+ } >+ } else if (Character.TYPE.equals(iClass) || Character.class.equals(iClass)) { >+ if (value instanceof Character) { >+ // ok >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ throw new IllegalArgumentException(); //XXX: ? >+ } else { >+ value = new Character(s.charAt(0)); >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Character is expected"); >+ } >+ } else if (Byte.TYPE.equals(iClass) || Byte.class.equals(iClass)) { >+ if (value instanceof Byte) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Byte(((Number) value).byteValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Byte.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ throw new IllegalArgumentException("String value does not convert to Byte value"); >+ } >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Byte is expected"); >+ } >+ } else if (Short.TYPE.equals(iClass) || Short.class.equals(iClass)) { >+ if (value instanceof Short) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Short(((Number) value).shortValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Short.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ throw new IllegalArgumentException("String value does not convert to Short value"); >+ } >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Short is expected"); >+ } >+ } else if (Integer.TYPE.equals(iClass) || Integer.class.equals(iClass)) { >+ if (value instanceof Integer) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Integer(((Number) value).intValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Integer.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ throw new IllegalArgumentException("String value does not convert to Integer value"); >+ } >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Integer is expected"); >+ } >+ } else if (Long.TYPE.equals(iClass) || Long.class.equals(iClass)) { >+ if (value instanceof Long) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Long(((Number) value).longValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Long.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ throw new IllegalArgumentException("String value does not convert to Long value"); >+ } >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Long is expected"); >+ } >+ } else if (Float.TYPE.equals(iClass) || Float.class.equals(iClass)) { >+ if (value instanceof Float) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Float(((Number) value).floatValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Float.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ throw new IllegalArgumentException("String value does not convert to Float value"); >+ } >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Float is expected"); >+ } >+ } else if (Double.TYPE.equals(iClass) || Double.class.equals(iClass)) { >+ if (value instanceof Double) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Double(((Number) value).doubleValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Double.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ throw new IllegalArgumentException("String value does not convert to Double value"); >+ } >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type Double is expected"); >+ } >+ } else if (String.class.equals(iClass)) { >+ value = String.valueOf(value); >+ } else if (type instanceof EEnum) { >+ if (value instanceof String) { >+ EEnumLiteral literal = ((EEnum) type).getEEnumLiteralByLiteral((String) value); >+ if (literal == null) { >+ throw new IllegalArgumentException("Unknown literal: " + value); >+ } else { >+ value = literal.getInstance(); >+ } >+ } else { >+ throw new IllegalArgumentException("Value of type String is expected"); >+ } >+ } else { >+ throw new IllegalArgumentException("Unsupported type"); >+ } >+ return value; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/ReplaceNotationalElementCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/ReplaceNotationalElementCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/ReplaceNotationalElementCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/ReplaceNotationalElementCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,81 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.emf.common.command.AbstractCommand; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class ReplaceNotationalElementCommand extends AbstractCommand { >+ private final CreateNotationalElementCommand createCommand; >+ private final RemoveNotationalElementCommand removeCommand; >+ private final View obsoleteView; >+ >+ public ReplaceNotationalElementCommand(View parentView, CreateNotationalElementCommand createCommand, View obsoleteView) { >+ this.createCommand = createCommand; >+ this.obsoleteView = obsoleteView; >+ this.removeCommand = obsoleteView instanceof Edge ? new RemoveNotationalEdgeCommand(parentView, obsoleteView) : new RemoveNotationalElementCommand(parentView, obsoleteView); >+ } >+ >+ public boolean canExecute() { >+ return createCommand != null && createCommand.canExecute() && removeCommand != null && removeCommand.canExecute(); >+ } >+ >+ public boolean canUndo() { >+ return createCommand != null && createCommand.canUndo() && removeCommand != null && removeCommand.canUndo(); >+ } >+ >+ public void execute() { >+ createCommand.execute(); >+ removeCommand.execute(); >+ View createdView = createCommand.getCreatedView(); >+ if (createdView != null && obsoleteView != null && createdView.eClass().equals(obsoleteView.eClass())) { >+ if (NotationPackage.eINSTANCE.getNode().equals(createdView.eClass())) { >+ copy(obsoleteView, createdView, NotationPackage.eINSTANCE.getNode_LayoutConstraint()); >+ } else if (NotationPackage.eINSTANCE.getEdge().equals(createdView.eClass())) { >+ copy(obsoleteView, createdView, NotationPackage.eINSTANCE.getEdge_Bendpoints()); >+ } >+ } >+ } >+ >+ private void copy(EObject source, EObject target, EStructuralFeature feature) { >+ EObject oldValue = (EObject) source.eGet(feature); >+ if (oldValue == null) { >+ return; //nothing to copy >+ } >+ EObject newValue = (EObject) target.eGet(feature); >+ if (newValue != null && !newValue.eClass().equals(oldValue.eClass())) { >+ return; //incompatible instances. >+ } >+ target.eSet(feature, oldValue); >+ } >+ >+ public void undo() { >+ View createdView = createCommand.getCreatedView(); >+ if (createdView != null && obsoleteView != null && createdView.eClass().equals(obsoleteView.eClass())) { >+ if (NotationPackage.eINSTANCE.getNode().equals(createdView.eClass())) { >+ copy(obsoleteView, createdView, NotationPackage.eINSTANCE.getNode_LayoutConstraint()); >+ } else if (NotationPackage.eINSTANCE.getEdge().equals(createdView.eClass())) { >+ copy(obsoleteView, createdView, NotationPackage.eINSTANCE.getEdge_Bendpoints()); >+ } >+ } >+ removeCommand.undo(); >+ createCommand.undo(); >+ } >+ >+ public void redo() { >+ execute(); >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/requests/ModelCreationFactory.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/requests/ModelCreationFactory.java >diff -N src/org/eclipse/gmf/runtime/lite/requests/ModelCreationFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/requests/ModelCreationFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,36 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.requests; >+ >+import org.eclipse.gef.requests.CreationFactory; >+ >+ >+public class ModelCreationFactory implements CreationFactory { >+ private Object createdObject; >+ private final Class createdObjectType; >+ >+ public ModelCreationFactory(Class objectType) { >+ createdObjectType = objectType; >+ } >+ >+ public Object getNewObject() { >+ return createdObject; >+ } >+ >+ public Object getObjectType() { >+ return createdObjectType; >+ } >+ >+ public void setCreatedObject(Object createdObject) { >+ this.createdObject = createdObject; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/AbstractNotationModelRefresher.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/AbstractNotationModelRefresher.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/AbstractNotationModelRefresher.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/AbstractNotationModelRefresher.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,111 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import java.util.Iterator; >+ >+import org.eclipse.emf.common.command.Command; >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.transaction.NotificationFilter; >+import org.eclipse.emf.transaction.ResourceSetChangeEvent; >+import org.eclipse.emf.transaction.ResourceSetListenerImpl; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * Listens to the given transactional editing domain in order to update the notational model to reflect changes in the domain model. >+ */ >+public abstract class AbstractNotationModelRefresher extends ResourceSetListenerImpl { >+ private NotificationFilter myFilter; >+ private TransactionalEditingDomain myEditingDomain; >+ >+ public AbstractNotationModelRefresher() { >+ myFilter = createFilter(); >+ } >+ >+ public void install(TransactionalEditingDomain editingDomain) { >+ if (this.myEditingDomain != null && !this.myEditingDomain.equals(editingDomain)) { >+ throw new IllegalStateException("Already listening to another editing domain"); >+ } >+ this.myEditingDomain = editingDomain; >+ this.myEditingDomain.addResourceSetListener(this); >+ } >+ >+ public boolean isInstalled() { >+ return myEditingDomain != null; >+ } >+ >+ public void uninstall() { >+ if (isInstalled()) { >+ myEditingDomain.removeResourceSetListener(this); >+ myEditingDomain = null; >+ } >+ } >+ >+ public boolean isPrecommitOnly() { >+ return true; >+ } >+ >+ public Command transactionAboutToCommit(ResourceSetChangeEvent event) { >+ if (shouldHandleNotification(event)) { >+ return buildRefreshNotationModelCommand(); >+ } >+ return null; >+ } >+ >+ public NotificationFilter getFilter() { >+ return myFilter; >+ } >+ >+ /** >+ * Creates and returns the command that will update the notational model to reflect changes in the domain model. >+ */ >+ public abstract Command buildRefreshNotationModelCommand(); >+ >+ private boolean shouldHandleNotification(ResourceSetChangeEvent event) { >+ for(Iterator it = event.getNotifications().iterator(); it.hasNext(); ) { >+ Notification next = (Notification) it.next(); >+ if (shouldHandleNotification(next)) { >+ return true; >+ } >+ } >+ return false; >+ } >+ >+ /** >+ * This method may be overridden in subclasses to filter unneeded notifications that passed the NotificationFilter. >+ * By default, it is assumed that all notifications that passed through the NotificationFilter could trigger the update. >+ */ >+ protected boolean shouldHandleNotification(Notification nofitication) { >+ return true; >+ } >+ >+ protected int getVisualID(View view) { >+ try { >+ return Integer.parseInt(view.getType()); >+ } catch (NumberFormatException e) { >+ return -1; >+ } >+ } >+ >+ /** >+ * Returns a command that will create a notational element to represent the domain model element described by the given <code>ElementDescriptor</code>. >+ */ >+ protected abstract CreateNotationalElementCommand getCreateNotationalElementCommand(ElementDescriptor descriptor); >+ >+ protected abstract NotificationFilter createFilter(); >+ >+ protected abstract boolean shouldCreateView(ElementDescriptor descriptor); >+ >+ protected abstract View getHost(); >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/EditPartRegistryBasedViewService.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/EditPartRegistryBasedViewService.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/EditPartRegistryBasedViewService.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/EditPartRegistryBasedViewService.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,90 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update.canonical; >+ >+import java.util.Iterator; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gef.EditPartViewer; >+import org.eclipse.gef.editparts.AbstractEditPart; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * Implementation of {@link IViewService} that uses EditPartRegistry to match views with domain elements. >+ * In order for this service to work correctly, edit parts must register themselves against domain elements in {@link AbstractEditPart#registerModel()} method. >+ */ >+public class EditPartRegistryBasedViewService implements IViewService { >+ private final EditPartViewer myViewer; >+ >+ public EditPartRegistryBasedViewService(EditPartViewer viewer) { >+ myViewer = viewer; >+ } >+ >+ public View findView(EObject modelElement) { >+ if (modelElement == null) { >+ return null; >+ } >+ EditPart editPart = (EditPart) myViewer.getEditPartRegistry().get(modelElement); >+ if (editPart != null && editPart.getModel() instanceof View) { >+ return (View) editPart.getModel(); >+ } >+ View parentView = findView(modelElement.eContainer()); >+ if (parentView != null) { >+ View result = findNode(parentView, modelElement); >+ if (result != null) { >+ return result; >+ } >+ } >+ return findEdge(modelElement); >+ } >+ >+ /** >+ * Finds a notational node that corresponds to the given underlying domain element in a subtree starting from the given parent element. >+ * @generated >+ */ >+ private View findNode(View parentView, EObject modelElement) { >+ for(Iterator it = parentView.getChildren().iterator(); it.hasNext(); ) { >+ View next = (View) it.next(); >+ if (!next.isSetElement() || next.getElement() == parentView) { >+ View result = findNode(next, modelElement); >+ if (result != null) { >+ return result; >+ } >+ } >+ if (next.isSetElement() && next.getElement() == modelElement) { >+ return next; >+ } >+ } >+ return null; >+ } >+ >+ /** >+ * Finds a notational edge that corresponds to the given underlying domain element. >+ * @generated >+ */ >+ private View findEdge(EObject modelElement) { >+ for(Iterator it = getDiagram().getEdges().iterator(); it.hasNext(); ) { >+ Edge next = (Edge) it.next(); >+ if (next.isSetElement() && next.getElement() == modelElement) { >+ return next; >+ } >+ } >+ return null; >+ } >+ >+ private Diagram getDiagram() { >+ return (Diagram) myViewer.getContents().getModel(); >+ } >+} >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: META-INF/MANIFEST.MF >diff -N META-INF/MANIFEST.MF >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ META-INF/MANIFEST.MF 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,26 @@ >+Manifest-Version: 1.0 >+Bundle-ManifestVersion: 2 >+Bundle-Name: %pluginName >+Bundle-SymbolicName: org.eclipse.gmf.runtime.lite >+Bundle-Version: 1.0.0 >+Bundle-Activator: org.eclipse.gmf.internal.runtime.lite.Activator >+Bundle-Localization: plugin >+Require-Bundle: org.eclipse.ui, >+ org.eclipse.core.runtime, >+ org.eclipse.emf.common, >+ org.eclipse.gmf.runtime.notation, >+ org.eclipse.emf.ecore, >+ org.eclipse.ui.views, >+ org.eclipse.gef, >+ org.eclipse.emf.edit, >+ org.eclipse.emf.transaction, >+ org.eclipse.emf.workspace, >+ org.eclipse.emf.edit.ui >+Eclipse-LazyStart: true >+Bundle-Vendor: %providerName >+Export-Package: org.eclipse.gmf.runtime.lite.commands, >+ org.eclipse.gmf.runtime.lite.edit.parts.update, >+ org.eclipse.gmf.runtime.lite.edit.parts.update.canonical, >+ org.eclipse.gmf.runtime.lite.edit.policies, >+ org.eclipse.gmf.runtime.lite.properties, >+ org.eclipse.gmf.runtime.lite.requests >Index: src/org/eclipse/gmf/runtime/lite/properties/SetValueCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/properties/SetValueCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/properties/SetValueCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/properties/SetValueCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,102 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.properties; >+ >+import java.text.MessageFormat; >+ >+import org.eclipse.emf.edit.provider.IItemPropertySource; >+import org.eclipse.gef.commands.Command; >+import org.eclipse.ui.views.properties.IPropertySource; >+import org.eclipse.ui.views.properties.IPropertySource2; >+ >+/** >+ * Copied from <code>org.eclipse.gef.ui.properties.SetValueCommand</code> to provide EMF compatibility. >+ */ >+class SetValueCommand extends Command { >+ protected Object propertyValue; >+ protected Object propertyName; >+ protected Object undoValue; >+ protected boolean resetOnUndo; >+ protected IPropertySource target; >+ >+ public SetValueCommand() { >+ super(""); //$NON-NLS-1$ >+ } >+ >+ public SetValueCommand(String propLabel) { >+ super(MessageFormat.format("Set {0} property", new Object[]{propLabel}).trim()); >+ } >+ >+ public boolean canExecute() { >+ return true; >+ } >+ >+ public void execute() { >+ /* >+ * Fix for Bug# 54250 >+ * IPropertySource.isPropertySet(String) returns false both when there is no default >+ * value, and when there is a default value and the property is set to that value. >+ * To correctly determine if a reset should be done during undo, we compare the >+ * return value of isPropertySet(String) before and after setPropertyValue(...) is >+ * invoked. If they are different (it must have been false before and true after -- >+ * it cannot be the other way around), then that means we need to reset. >+ */ >+ boolean wasPropertySet = getTarget().isPropertySet(propertyName); >+ undoValue = getTarget().getPropertyValue(propertyName); >+ if (undoValue instanceof IPropertySource) { >+ undoValue = ((IPropertySource) undoValue).getEditableValue(); >+ } else if (undoValue instanceof IItemPropertySource) { >+ undoValue = ((IItemPropertySource) undoValue).getEditableValue(propertyName); >+ } >+ if (propertyValue instanceof IPropertySource) { >+ propertyValue = ((IPropertySource) propertyValue).getEditableValue(); >+ } >+ getTarget().setPropertyValue(propertyName, propertyValue); >+ if (getTarget() instanceof IPropertySource2) { >+ resetOnUndo = !wasPropertySet >+ && ((IPropertySource2) getTarget()).isPropertyResettable(propertyName); >+ } else { >+ resetOnUndo = !wasPropertySet && getTarget().isPropertySet(propertyName); >+ } >+ if (resetOnUndo) { >+ undoValue = null; >+ } >+ } >+ >+ public IPropertySource getTarget() { >+ return target; >+ } >+ >+ public void setTarget(IPropertySource aTarget) { >+ target = aTarget; >+ } >+ >+ public void redo() { >+ execute(); >+ } >+ >+ public void setPropertyId(Object pName) { >+ propertyName = pName; >+ } >+ >+ public void setPropertyValue(Object val) { >+ propertyValue = val; >+ } >+ >+ public void undo() { >+ if (resetOnUndo) { >+ getTarget().resetPropertyValue(propertyName); >+ } else { >+ getTarget().setPropertyValue(propertyName, undoValue); >+ } >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalElementCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalElementCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalElementCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/RemoveNotationalElementCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,94 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import java.util.Iterator; >+ >+import org.eclipse.emf.common.command.AbstractCommand; >+import org.eclipse.emf.common.command.CompoundCommand; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class RemoveNotationalElementCommand extends AbstractCommand { >+ private final View childView; >+ private final View parentView; >+ private EObject domainElement; >+ private CompoundCommand removeEdgeCommands; >+ >+ public RemoveNotationalElementCommand(View parentView, View childView) { >+ this.parentView = parentView; >+ this.childView = childView; >+ } >+ >+ protected boolean prepare() { >+ if (!parentView.getChildren().contains(childView)) { >+ return false; >+ } >+ removeEdgeCommands = new CompoundCommand(); >+ for(Iterator it = childView.getSourceEdges().iterator(); it.hasNext(); ) { >+ Edge next = (Edge) it.next(); >+ removeEdgeCommands.append(new RemoveNotationalEdgeCommand(childView.getDiagram(), next)); >+ } >+ for(Iterator it = childView.getTargetEdges().iterator(); it.hasNext(); ) { >+ Edge next = (Edge) it.next(); >+ removeEdgeCommands.append(new RemoveNotationalEdgeCommand(childView.getDiagram(), next)); >+ } >+ if (removeEdgeCommands.isEmpty()) { >+ return true; >+ } >+ return removeEdgeCommands.canExecute(); >+ } >+ >+ public boolean canUndo() { >+ return true; >+ } >+ >+ public void execute() { >+ parentView.removeChild(childView); >+ if (!removeEdgeCommands.isEmpty()) { >+ removeEdgeCommands.execute(); >+ } >+ sweepElement(); >+ } >+ >+ protected void sweepElement() { >+ if (childView.isSetElement()) { >+ domainElement = childView.getElement(); >+ childView.setElement(null); >+ } >+ } >+ >+ public void redo() { >+ execute(); >+ } >+ >+ public void undo() { >+ restoreElement(); >+ removeEdgeCommands.undo(); >+ parentView.insertChild(childView); >+ } >+ >+ protected void restoreElement() { >+ if (childView.isSetElement()) { >+ childView.setElement(domainElement); >+ } >+ } >+ >+ protected final View getChildView() { >+ return childView; >+ } >+ >+ protected final View getParent() { >+ return parentView; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeSourceCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeSourceCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeSourceCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeSourceCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,49 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.emf.common.command.AbstractCommand; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class ReconnectNotationalEdgeSourceCommand extends AbstractCommand { >+ private final Edge edge; >+ private final View newSource; >+ private View oldSource; >+ >+ public ReconnectNotationalEdgeSourceCommand(Edge edge, View newSource) { >+ this.edge = edge; >+ this.newSource = newSource; >+ } >+ >+ public boolean canExecute() { >+ return newSource != null; >+ } >+ >+ public boolean canUndo() { >+ return oldSource != null; >+ } >+ >+ public void execute() { >+ oldSource = edge.getSource(); >+ edge.setSource(newSource); >+ } >+ >+ public void redo() { >+ execute(); >+ } >+ >+ public void undo() { >+ edge.setSource(oldSource); >+ oldSource = null; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/requests/CreateConnectionRequestEx.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/requests/CreateConnectionRequestEx.java >diff -N src/org/eclipse/gmf/runtime/lite/requests/CreateConnectionRequestEx.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/requests/CreateConnectionRequestEx.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,40 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.requests; >+ >+import org.eclipse.gef.requests.CreateConnectionRequest; >+ >+ >+/** >+ * A Request to create a connection of one of the specified types (Visual IDs). >+ */ >+public class CreateConnectionRequestEx extends CreateConnectionRequest { >+ private final int[] visualIds; >+ >+ /** >+ * Creates a new request to create a connection of the given object types. >+ */ >+ public CreateConnectionRequestEx(int[] visualIds) { >+ this.visualIds = visualIds; >+ } >+ >+ /** >+ * Returns the types (Visual IDs) of objects whose creation is requested. >+ */ >+ public int[] getVisualIds() { >+ return visualIds; >+ } >+ >+ public void setCreatedObject(Object createdObject) { >+ ((ModelCreationFactory)getFactory()).setCreatedObject(createdObject); >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/RefreshAdapter.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/RefreshAdapter.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/RefreshAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/RefreshAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update; >+ >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.common.notify.impl.AdapterImpl; >+import org.eclipse.emf.ecore.EStructuralFeature; >+ >+public class RefreshAdapter extends AdapterImpl { >+ private final IUpdatableEditPart myHost; >+ >+ public RefreshAdapter(IUpdatableEditPart editPart) { >+ myHost = editPart; >+ } >+ >+ public void notifyChanged(Notification msg) { >+ super.notifyChanged(msg); >+ if (msg.isTouch()) { >+ return; >+ } >+ IUpdatableEditPart.Refresher refresher = myHost.getRefresher((EStructuralFeature) msg.getFeature(), msg); >+ if (refresher != null) { >+ refresher.refresh(); >+ } >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalElementCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalElementCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalElementCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalElementCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,36 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.emf.common.command.AbstractCommand; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public abstract class CreateNotationalElementCommand extends AbstractCommand { >+ private final View parent; >+ private View createdView; >+ >+ public CreateNotationalElementCommand(View parent) { >+ this.parent = parent; >+ } >+ >+ protected void setCreatedView(View createdView) { >+ this.createdView = createdView; >+ } >+ >+ public View getCreatedView() { >+ return createdView; >+ } >+ >+ protected final View getParent() { >+ return parent; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/edit/parts/update/UpdateManager.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/edit/parts/update/UpdateManager.java >diff -N src/org/eclipse/gmf/runtime/lite/edit/parts/update/UpdateManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/edit/parts/update/UpdateManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,68 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.edit.parts.update; >+ >+import java.util.Collection; >+import java.util.Collections; >+import java.util.Iterator; >+ >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.emf.ecore.util.EContentAdapter; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gef.EditPartViewer; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class UpdateManager extends EContentAdapter { >+ private final EditPartViewer myViewer; >+ >+ public UpdateManager(EditPartViewer viewer) { >+ myViewer = viewer; >+ } >+ >+ public void notifyChanged(Notification msg) { >+ super.notifyChanged(msg); >+ if (msg.isTouch()) { >+ return; >+ } >+ Collection affectedEditParts = findAffectedParts(msg); >+ for(Iterator it = affectedEditParts.iterator(); it.hasNext(); ) { >+ IUpdatableEditPart next = (IUpdatableEditPart) it.next(); >+ IUpdatableEditPart.Refresher refresher = next.getRefresher((EStructuralFeature)msg.getFeature(), msg); >+ if (refresher != null) { >+ refresher.refresh(); >+ } >+ } >+ } >+ >+ private Collection/*<IUpdatableEditPart>*/ findAffectedParts(Notification msg) { >+ Object notifier = msg.getNotifier(); >+ if (notifier instanceof EObject) { >+ org.eclipse.gmf.runtime.notation.View view = getView((EObject) notifier); >+ if (view != null) { >+ EditPart affectedEditPart = (EditPart) myViewer.getEditPartRegistry().get(view); >+ if (affectedEditPart != null) { >+ return Collections.singleton(affectedEditPart); >+ } >+ } >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ private View getView(EObject offspring) { >+ while (offspring != null && offspring instanceof View == false) { >+ offspring = offspring.eContainer(); >+ } >+ return (View) offspring; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeTargetCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeTargetCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeTargetCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/ReconnectNotationalEdgeTargetCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,49 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.emf.common.command.AbstractCommand; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+public class ReconnectNotationalEdgeTargetCommand extends AbstractCommand { >+ private final Edge edge; >+ private final View newTarget; >+ private View oldTarget; >+ >+ public ReconnectNotationalEdgeTargetCommand(Edge edge, View newTarget) { >+ this.edge = edge; >+ this.newTarget = newTarget; >+ } >+ >+ public boolean canExecute() { >+ return newTarget != null; >+ } >+ >+ public boolean canUndo() { >+ return oldTarget != null; >+ } >+ >+ public void execute() { >+ oldTarget = edge.getTarget(); >+ edge.setTarget(newTarget); >+ } >+ >+ public void redo() { >+ execute(); >+ } >+ >+ public void undo() { >+ edge.setTarget(oldTarget); >+ oldTarget = null; >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalEdgeCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalEdgeCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalEdgeCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/CreateNotationalEdgeCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,55 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+ >+public class CreateNotationalEdgeCommand extends CreateNotationalElementCommand { >+ private final View source; >+ private final View target; >+ >+ public CreateNotationalEdgeCommand(Diagram parent, Edge edge, View source, View target) { >+ super(parent); >+ this.source = source; >+ this.target = target; >+ setCreatedView(edge); >+ } >+ >+ public boolean canExecute() { >+ return getParent() != null && getCreatedView() != null && source != null && target != null; >+ } >+ >+ public boolean canUndo() { >+ return true; >+ } >+ >+ public void execute() { >+ Edge createdEdge = (Edge) getCreatedView(); >+ ((Diagram) getParent()).insertEdge(createdEdge); >+ createdEdge.setSource(source); >+ createdEdge.setTarget(target); >+ } >+ >+ public void undo() { >+ Edge createdEdge = (Edge) getCreatedView(); >+ ((Diagram) getParent()).removeEdge(createdEdge); >+ createdEdge.setSource(null); >+ createdEdge.setTarget(null); >+ } >+ >+ public void redo() { >+ execute(); >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/commands/WrappingCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/commands/WrappingCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/commands/WrappingCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/commands/WrappingCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,61 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.commands; >+ >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.operations.IUndoableOperation; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.workspace.EMFCommandOperation; >+import org.eclipse.gef.commands.Command; >+import org.eclipse.gmf.internal.runtime.lite.Activator; >+ >+public class WrappingCommand extends Command { >+ private final IUndoableOperation operation; >+ >+ public WrappingCommand(TransactionalEditingDomain editingDomain, >+ org.eclipse.emf.common.command.Command emfCommand) { >+ this.operation = new EMFCommandOperation(editingDomain, emfCommand); >+ } >+ >+ public void execute() { >+ try { >+ operation.execute(new NullProgressMonitor(), null); >+ } catch (ExecutionException e) { >+ Activator.getDefault().logError("exception occurred while executing operation", e); >+ } >+ } >+ >+ public boolean canExecute() { >+ return operation.canExecute(); >+ } >+ >+ public void undo() { >+ try { >+ operation.undo(new NullProgressMonitor(), null); >+ } catch (ExecutionException e) { >+ Activator.getDefault().logError("exception occurred while undoing operation", e); >+ } >+ } >+ >+ public boolean canUndo() { >+ return operation.canUndo(); >+ } >+ >+ public void redo() { >+ try { >+ operation.redo(new NullProgressMonitor(), null); >+ } catch (ExecutionException e) { >+ Activator.getDefault().logError("exception occurred while redoing operation", e); >+ } >+ } >+} >Index: src/org/eclipse/gmf/runtime/lite/properties/ResetValueCommand.java >=================================================================== >RCS file: src/org/eclipse/gmf/runtime/lite/properties/ResetValueCommand.java >diff -N src/org/eclipse/gmf/runtime/lite/properties/ResetValueCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/runtime/lite/properties/ResetValueCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,97 @@ >+/** >+ * Copyright (c) 2006 Eclipse.org >+ * >+ * 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: >+ * bblajer - initial API and implementation >+ */ >+package org.eclipse.gmf.runtime.lite.properties; >+ >+import org.eclipse.emf.edit.provider.IItemPropertySource; >+import org.eclipse.gef.commands.Command; >+import org.eclipse.ui.views.properties.IPropertySource; >+import org.eclipse.ui.views.properties.IPropertySource2; >+ >+/** >+ * Copied from <code>org.eclipse.gef.ui.properties.ResetValueCommand</code> to provide EMF compatibility. >+ */ >+class ResetValueCommand extends Command { >+ /** the property that has to be reset */ >+ protected Object propertyName; >+ /** the current non-default value of the property */ >+ protected Object undoValue; >+ /** the property source whose property has to be reset */ >+ protected IPropertySource target; >+ >+ /** >+ * Default Constructor: Sets the label for the Command >+ */ >+ public ResetValueCommand() { >+ super("Restore Default Value"); >+ } >+ >+ /** >+ * Returns <code>true</code> IFF:<br> >+ * 1) the target and property have been specified<br> >+ * 2) the property has a default value<br> >+ * 3) the value set for that property is not the default >+ */ >+ public boolean canExecute() { >+ boolean answer = false; >+ if (target != null && propertyName != null) { >+ answer = target.isPropertySet(propertyName); >+ if (target instanceof IPropertySource2) { >+ answer = answer >+ && (((IPropertySource2) target).isPropertyResettable(propertyName)); >+ } >+ } >+ return answer; >+ } >+ >+ /** >+ * Caches the undo value and invokes redo() >+ */ >+ public void execute() { >+ undoValue = target.getPropertyValue(propertyName); >+ if (undoValue instanceof IPropertySource) { >+ undoValue = ((IPropertySource) undoValue).getEditableValue(); >+ } else if (undoValue instanceof IItemPropertySource) { >+ undoValue = ((IItemPropertySource) undoValue).getEditableValue(propertyName); >+ } >+ redo(); >+ } >+ >+ /** >+ * Sets the IPropertySource. >+ * @param propSource the IPropertySource whose property has to be reset >+ */ >+ public void setTarget(IPropertySource propSource) { >+ target = propSource; >+ } >+ >+ /** >+ * Resets the specified property on the specified IPropertySource >+ */ >+ public void redo() { >+ target.resetPropertyValue(propertyName); >+ } >+ >+ /** >+ * Sets the property that is to be reset. >+ * @param pName the property to be reset >+ */ >+ public void setPropertyId(Object pName) { >+ propertyName = pName; >+ } >+ >+ /** >+ * Restores the non-default value that was reset. >+ */ >+ public void undo() { >+ target.setPropertyValue(propertyName, undoValue); >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 155040
: 49066