diff options
author | Eike Stepper | 2013-02-06 06:54:59 +0000 |
---|---|---|
committer | Eike Stepper | 2013-02-13 19:57:58 +0000 |
commit | 5d8a3a502af57da4c700d80d2134fa3a0da28cc3 (patch) | |
tree | c163424563f6e653a11e55129ee33aa55768164f | |
parent | 952a1237848fa4247652aa27fd910746500c270f (diff) | |
download | cdo-5d8a3a502af57da4c700d80d2134fa3a0da28cc3.tar.gz cdo-5d8a3a502af57da4c700d80d2134fa3a0da28cc3.tar.xz cdo-5d8a3a502af57da4c700d80d2134fa3a0da28cc3.zip |
Fix line endings
6 files changed, 3460 insertions, 3460 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf/src/templates/EMFFragmentTemplate.xpt b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf/src/templates/EMFFragmentTemplate.xpt index db8052a6e0..e88b13f78f 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf/src/templates/EMFFragmentTemplate.xpt +++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf/src/templates/EMFFragmentTemplate.xpt @@ -1,398 +1,398 @@ -«REM»
- Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- Martin Fluegge - initial API and implementation
-
-«ENDREM»
-
-«IMPORT emf»
-«IMPORT genmodel»
-«IMPORT ecore»
-«IMPORT dawngenmodel»
-«IMPORT dawnEmfGenmodel»
-
-«EXTENSION org::eclipse::emf::cdo::dawn::codegen::util::Utils»
-
-«DEFINE main FOR DawnEMFGenerator»
-
- «setDiagramPackage(this.emfGenModel.modelPluginID)»
-
- «EXPAND dawnEditor FOR this»
- «EXPAND dawnWizard FOR this»
- «EXPAND fragmentXML FOR this»
- «EXPAND manifestMF FOR this»
- «EXPAND buildPROPERTIES FOR this»
- «EXPAND classpath FOR this»
-«ENDDEFINE»
-
-«REM»############################################ Extended Editor ##################################################################«ENDREM»
-«DEFINE dawnEditor FOR DawnEMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/presentation/"+this.dawnEditorClassName+".java"»
-package «this.emfGenModel.modelPluginID».presentation;
-
-import «this.emfGenModel.modelPluginID».presentation.«this.emfGenModel.modelName»Editor;
-
-import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
-import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
-import org.eclipse.emf.cdo.dawn.emf.editors.impl.DawnEMFEditorSupport;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.dawn.ui.DawnLabelProvider;
-import org.eclipse.emf.cdo.dawn.ui.DawnSelectionViewerAdapterFactoryContentProvider;
-import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-
-public class «this.dawnEditorClassName» extends «this.emfGenModel.modelName»Editor implements IDawnEditor
-{
- private IDawnEditorSupport dawnEditorSupport;
-
- public static String ID = "«this.emfGenModel.modelPluginID».presentation.«this.dawnEditorClassName»ID";
-
- public «this.dawnEditorClassName»()
- {
- super();
- dawnEditorSupport = new DawnEMFEditorSupport(this);
- }
-
- @Override
- protected void setInput(IEditorInput input)
- {
- super.setInput(input);
- if (input instanceof DawnEditorInput)
- {
- dawnEditorSupport.setView(((DawnEditorInput)input).getView());
- dawnEditorSupport.registerListeners();
- }
- }
-
- @Override
- protected void setInputWithNotify(IEditorInput input)
- {
- super.setInput(input);
- if (input instanceof DawnEditorInput)
- {
- CDOResource resource = ((DawnEditorInput)input).getResource();
- URI uri = URI.createURI(((DawnEditorInput)input).getURI().toString());
-
- if (resource == null || resource.cdoView() == null)
- {
- ResourceSet resourceSet = editingDomain.getResourceSet();
- CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, uri.toString());
-
- resource = (CDOResource)resourceSet.getResource(uri, true);
-
- if (resource == null || resource.cdoView() == null)
- {
- resource = transaction.getOrCreateResource(uri.toString());
- }
- }
-
- ((DawnEditorInput)input).setResource(resource);
- dawnEditorSupport.setView(((DawnEditorInput)input).getView());
- dawnEditorSupport.registerListeners();
- }
- }
-
- @Override
- public void createPages()
- {
- super.createPages();
-
- selectionViewer.setContentProvider(new DawnSelectionViewerAdapterFactoryContentProvider(adapterFactory,
- ((DawnEditorInput)getEditorInput()).getResource()));
- selectionViewer
- .setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
- parentViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
- listViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
- treeViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
- tableViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
- treeViewerWithColumns.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(),
- selectionViewer));
-
- CDOResource resource = ((DawnEditorInput)getEditorInput()).getResource();
-
- selectionViewer.setInput(resource.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(resource), true);
-
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- }
-
- @Override
- public void doSave(IProgressMonitor progressMonitor)
- {
- CDOView view = dawnEditorSupport.getView();
- if (view instanceof CDOTransaction)
- {
- if (view.hasConflict())
- {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict",
- "Your Resource is in conflict and cannot be committed");
- }
- else
- {
- super.doSave(progressMonitor);
- }
- }
- }
-
- public String getContributorID()
- {
- return null;
- }
-
- public CDOView getView()
- {
- return dawnEditorSupport.getView();
- }
-
- public void setDirty()
- {
- dawnEditorSupport.setDirty(true);
- }
-
- @Override
- public void dispose()
- {
- try
- {
- super.dispose();
- }
- finally
- {
- dawnEditorSupport.close();
- }
- }
-
- public String getContributorId()
- {
- return ID;
- }
-
- public IDawnEditorSupport getDawnEditorSupport()
- {
- return dawnEditorSupport;
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-«REM»############################################ Extended Wizard ##################################################################«ENDREM»
-«DEFINE dawnWizard FOR DawnEMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/presentation/"+"Dawn"+this.emfGenModel.modelName+"ModelWizard.java"»
-package «this.emfGenModel.modelPluginID».presentation;
-
-import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage;
-import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import java.util.Collections;
-
-public class Dawn«this.emfGenModel.modelName»ModelWizard extends «this.emfGenModel.modelName»ModelWizard implements INewWizard
-{
- private DawnCreateNewResourceWizardPage newResourceCreationPage;
-
- private CDOView view;
-
- private CDOResource resource;
-
- public Dawn«this.emfGenModel.modelName»ModelWizard()
- {
- super();
- CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
- PreferenceConstants.getServerName());
- CDOSession session = CDOConnectionUtil.instance.openSession();
- view = CDOConnectionUtil.instance.openView(session);
- }
-
- @Override
- public void addPages()
- {
- newResourceCreationPage = new DawnCreateNewResourceWizardPage("«getEMFFileName(this.emfGenModel.genPackages)»", true, view);
- addPage(newResourceCreationPage);
-
- initialObjectCreationPage = new «this.emfGenModel.modelName»ModelWizardInitialObjectCreationPage("Whatever2");
- initialObjectCreationPage.setTitle(«this.emfGenModel.modelName»EditorPlugin.INSTANCE.getString("_UI_«this.emfGenModel.modelName»ModelWizard_label"));
- initialObjectCreationPage.setDescription(«this.emfGenModel.modelName»EditorPlugin.INSTANCE
- .getString("_UI_Wizard_initial_object_description"));
- addPage(initialObjectCreationPage);
- }
-
- @Override
- public boolean performFinish()
- {
- try
- {
- // Do the work within an operation.
- //
- WorkspaceModifyOperation operation = new WorkspaceModifyOperation()
- {
-
- @Override
- protected void execute(IProgressMonitor progressMonitor)
- {
- try
- {
- ResourceSet resourceSet = new ResourceSetImpl();
-
- URI resourceURI = newResourceCreationPage.getURI();
-
- CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet,
- resourceURI.toString());
-
- resource = transaction.getOrCreateResource(resourceURI.path());
-
- EObject rootObject = createInitialModel();
- if (rootObject != null)
- {
- resource.getContents().add(rootObject);
- }
-
- resource.save(Collections.EMPTY_MAP);
- transaction.close();
- }
- catch (Exception exception)
- {
- «this.emfGenModel.modelName»EditorPlugin.INSTANCE.log(exception);
- throw new RuntimeException(exception);
- }
- finally
- {
- progressMonitor.done();
- }
- }
- };
-
- getContainer().run(false, false, operation);
-
- openEditor(newResourceCreationPage.getURI());
-
- return true;
- }
- catch (Exception exception)
- {
- «this.emfGenModel.modelName»EditorPlugin.INSTANCE.log(exception);
- return false;
- }
- }
-
- private void openEditor(URI uri)
- {
- IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
- IWorkbenchPage page = workbenchWindow.getActivePage();
- DawnEditorInput dawnEditorInput = new DawnEditorInput(uri);
- try
- {
- page.openEditor(dawnEditorInput, «this.dawnEditorClassName».ID);
- }
- catch (PartInitException exception)
- {
- MessageDialog.openError(workbenchWindow.getShell(),
- «this.emfGenModel.modelName»EditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
- throw new RuntimeException(exception);
- }
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-«REM»########################################## fragment.xml ####################################################################«ENDREM»
-«DEFINE fragmentXML FOR DawnEMFGenerator»
-«FILE "fragment.xml"»<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<fragment>
- <extension point="org.eclipse.ui.newWizards">
- <wizard
- id="«this.emfGenModel.modelPluginID».presentation.Dawn«this.emfGenModel.modelName»ModelWizardID"
- name="Dawn «this.emfGenModel.modelName» Model"
- class="«this.emfGenModel.modelPluginID».presentation.Dawn«this.emfGenModel.modelName»ModelWizard"
- category="org.eclipse.emf.cdo.dawn.ui.category.examples"
- icon="platform:/plugin/«this.emfGenModel.editPluginID»/icons/full/obj16/«this.emfGenModel.modelName»ModelFile.gif">
- <description>A Dawn editor for «this.emfGenModel.modelName» models</description>
- <selection class="org.eclipse.core.resources.IResource"/>
- </wizard>
- </extension>
-
- <extension point="org.eclipse.ui.editors">
- <editor
- id="«this.emfGenModel.modelPluginID».presentation.«this.dawnEditorClassName»ID"
- name="Dawn «this.emfGenModel.modelName» model Editor"
- icon="platform:/plugin/«this.emfGenModel.editPluginID»/icons/full/obj16/«this.emfGenModel.modelName»ModelFile.gif"
- extensions="«getEMFFileName(this.emfGenModel.genPackages)»"
- class="«this.emfGenModel.modelPluginID».presentation.«this.dawnEditorClassName»"
- contributorClass="«this.emfGenModel.modelPluginID».presentation.«this.emfGenModel.modelName»ActionBarContributor">
- </editor>
- </extension>
-</fragment>
-
-«ENDFILE»
-«ENDDEFINE»
-«REM»##############################################################################################################«ENDREM»
-«DEFINE manifestMF FOR DawnEMFGenerator»
-«FILE "META-INF/MANIFEST.MF"»Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Dawn
-Bundle-SymbolicName: «this.fragmentName»;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Fragment-Host: «this.emfGenModel.editorPluginID»
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.dawn.util;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.ui;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.emf.cdo.dawn.emf;bundle-version="[2.0.0,3.0.0)"
-«ENDFILE»
-«ENDDEFINE»
-
-
-«DEFINE buildPROPERTIES FOR DawnEMFGenerator»
-«FILE "build.properties"»source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- fragment.xml
-«ENDFILE»
-«ENDDEFINE»
-«REM»################################### . classpath ###########################################################################«ENDREM»
-
-«DEFINE classpath FOR DawnEMFGenerator»
-«FILE ".classpath"»<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
-«ENDFILE»
-«ENDDEFINE»
-
+«REM» + Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + Martin Fluegge - initial API and implementation + +«ENDREM» + +«IMPORT emf» +«IMPORT genmodel» +«IMPORT ecore» +«IMPORT dawngenmodel» +«IMPORT dawnEmfGenmodel» + +«EXTENSION org::eclipse::emf::cdo::dawn::codegen::util::Utils» + +«DEFINE main FOR DawnEMFGenerator» + + «setDiagramPackage(this.emfGenModel.modelPluginID)» + + «EXPAND dawnEditor FOR this» + «EXPAND dawnWizard FOR this» + «EXPAND fragmentXML FOR this» + «EXPAND manifestMF FOR this» + «EXPAND buildPROPERTIES FOR this» + «EXPAND classpath FOR this» +«ENDDEFINE» + +«REM»############################################ Extended Editor ##################################################################«ENDREM» +«DEFINE dawnEditor FOR DawnEMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/presentation/"+this.dawnEditorClassName+".java"» +package «this.emfGenModel.modelPluginID».presentation; + +import «this.emfGenModel.modelPluginID».presentation.«this.emfGenModel.modelName»Editor; + +import org.eclipse.emf.cdo.dawn.editors.IDawnEditor; +import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport; +import org.eclipse.emf.cdo.dawn.emf.editors.impl.DawnEMFEditorSupport; +import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput; +import org.eclipse.emf.cdo.dawn.ui.DawnLabelProvider; +import org.eclipse.emf.cdo.dawn.ui.DawnSelectionViewerAdapterFactoryContentProvider; +import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.transaction.CDOTransaction; +import org.eclipse.emf.cdo.view.CDOView; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorInput; + +public class «this.dawnEditorClassName» extends «this.emfGenModel.modelName»Editor implements IDawnEditor +{ + private IDawnEditorSupport dawnEditorSupport; + + public static String ID = "«this.emfGenModel.modelPluginID».presentation.«this.dawnEditorClassName»ID"; + + public «this.dawnEditorClassName»() + { + super(); + dawnEditorSupport = new DawnEMFEditorSupport(this); + } + + @Override + protected void setInput(IEditorInput input) + { + super.setInput(input); + if (input instanceof DawnEditorInput) + { + dawnEditorSupport.setView(((DawnEditorInput)input).getView()); + dawnEditorSupport.registerListeners(); + } + } + + @Override + protected void setInputWithNotify(IEditorInput input) + { + super.setInput(input); + if (input instanceof DawnEditorInput) + { + CDOResource resource = ((DawnEditorInput)input).getResource(); + URI uri = URI.createURI(((DawnEditorInput)input).getURI().toString()); + + if (resource == null || resource.cdoView() == null) + { + ResourceSet resourceSet = editingDomain.getResourceSet(); + CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, uri.toString()); + + resource = (CDOResource)resourceSet.getResource(uri, true); + + if (resource == null || resource.cdoView() == null) + { + resource = transaction.getOrCreateResource(uri.toString()); + } + } + + ((DawnEditorInput)input).setResource(resource); + dawnEditorSupport.setView(((DawnEditorInput)input).getView()); + dawnEditorSupport.registerListeners(); + } + } + + @Override + public void createPages() + { + super.createPages(); + + selectionViewer.setContentProvider(new DawnSelectionViewerAdapterFactoryContentProvider(adapterFactory, + ((DawnEditorInput)getEditorInput()).getResource())); + selectionViewer + .setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer)); + parentViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer)); + listViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer)); + treeViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer)); + tableViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer)); + treeViewerWithColumns.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), + selectionViewer)); + + CDOResource resource = ((DawnEditorInput)getEditorInput()).getResource(); + + selectionViewer.setInput(resource.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(resource), true); + + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + } + + @Override + public void doSave(IProgressMonitor progressMonitor) + { + CDOView view = dawnEditorSupport.getView(); + if (view instanceof CDOTransaction) + { + if (view.hasConflict()) + { + MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict", + "Your Resource is in conflict and cannot be committed"); + } + else + { + super.doSave(progressMonitor); + } + } + } + + public String getContributorID() + { + return null; + } + + public CDOView getView() + { + return dawnEditorSupport.getView(); + } + + public void setDirty() + { + dawnEditorSupport.setDirty(true); + } + + @Override + public void dispose() + { + try + { + super.dispose(); + } + finally + { + dawnEditorSupport.close(); + } + } + + public String getContributorId() + { + return ID; + } + + public IDawnEditorSupport getDawnEditorSupport() + { + return dawnEditorSupport; + } +} +«ENDFILE» +«ENDDEFINE» +«REM»############################################ Extended Wizard ##################################################################«ENDREM» +«DEFINE dawnWizard FOR DawnEMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/presentation/"+"Dawn"+this.emfGenModel.modelName+"ModelWizard.java"» +package «this.emfGenModel.modelPluginID».presentation; + +import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants; +import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput; +import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage; +import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.session.CDOSession; +import org.eclipse.emf.cdo.transaction.CDOTransaction; +import org.eclipse.emf.cdo.view.CDOView; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import java.util.Collections; + +public class Dawn«this.emfGenModel.modelName»ModelWizard extends «this.emfGenModel.modelName»ModelWizard implements INewWizard +{ + private DawnCreateNewResourceWizardPage newResourceCreationPage; + + private CDOView view; + + private CDOResource resource; + + public Dawn«this.emfGenModel.modelName»ModelWizard() + { + super(); + CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(), + PreferenceConstants.getServerName()); + CDOSession session = CDOConnectionUtil.instance.openSession(); + view = CDOConnectionUtil.instance.openView(session); + } + + @Override + public void addPages() + { + newResourceCreationPage = new DawnCreateNewResourceWizardPage("«getEMFFileName(this.emfGenModel.genPackages)»", true, view); + addPage(newResourceCreationPage); + + initialObjectCreationPage = new «this.emfGenModel.modelName»ModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(«this.emfGenModel.modelName»EditorPlugin.INSTANCE.getString("_UI_«this.emfGenModel.modelName»ModelWizard_label")); + initialObjectCreationPage.setDescription(«this.emfGenModel.modelName»EditorPlugin.INSTANCE + .getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + @Override + public boolean performFinish() + { + try + { + // Do the work within an operation. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() + { + + @Override + protected void execute(IProgressMonitor progressMonitor) + { + try + { + ResourceSet resourceSet = new ResourceSetImpl(); + + URI resourceURI = newResourceCreationPage.getURI(); + + CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, + resourceURI.toString()); + + resource = transaction.getOrCreateResource(resourceURI.path()); + + EObject rootObject = createInitialModel(); + if (rootObject != null) + { + resource.getContents().add(rootObject); + } + + resource.save(Collections.EMPTY_MAP); + transaction.close(); + } + catch (Exception exception) + { + «this.emfGenModel.modelName»EditorPlugin.INSTANCE.log(exception); + throw new RuntimeException(exception); + } + finally + { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + openEditor(newResourceCreationPage.getURI()); + + return true; + } + catch (Exception exception) + { + «this.emfGenModel.modelName»EditorPlugin.INSTANCE.log(exception); + return false; + } + } + + private void openEditor(URI uri) + { + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + DawnEditorInput dawnEditorInput = new DawnEditorInput(uri); + try + { + page.openEditor(dawnEditorInput, «this.dawnEditorClassName».ID); + } + catch (PartInitException exception) + { + MessageDialog.openError(workbenchWindow.getShell(), + «this.emfGenModel.modelName»EditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + throw new RuntimeException(exception); + } + } +} +«ENDFILE» +«ENDDEFINE» +«REM»########################################## fragment.xml ####################################################################«ENDREM» +«DEFINE fragmentXML FOR DawnEMFGenerator» +«FILE "fragment.xml"»<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<fragment> + <extension point="org.eclipse.ui.newWizards"> + <wizard + id="«this.emfGenModel.modelPluginID».presentation.Dawn«this.emfGenModel.modelName»ModelWizardID" + name="Dawn «this.emfGenModel.modelName» Model" + class="«this.emfGenModel.modelPluginID».presentation.Dawn«this.emfGenModel.modelName»ModelWizard" + category="org.eclipse.emf.cdo.dawn.ui.category.examples" + icon="platform:/plugin/«this.emfGenModel.editPluginID»/icons/full/obj16/«this.emfGenModel.modelName»ModelFile.gif"> + <description>A Dawn editor for «this.emfGenModel.modelName» models</description> + <selection class="org.eclipse.core.resources.IResource"/> + </wizard> + </extension> + + <extension point="org.eclipse.ui.editors"> + <editor + id="«this.emfGenModel.modelPluginID».presentation.«this.dawnEditorClassName»ID" + name="Dawn «this.emfGenModel.modelName» model Editor" + icon="platform:/plugin/«this.emfGenModel.editPluginID»/icons/full/obj16/«this.emfGenModel.modelName»ModelFile.gif" + extensions="«getEMFFileName(this.emfGenModel.genPackages)»" + class="«this.emfGenModel.modelPluginID».presentation.«this.dawnEditorClassName»" + contributorClass="«this.emfGenModel.modelPluginID».presentation.«this.emfGenModel.modelName»ActionBarContributor"> + </editor> + </extension> +</fragment> + +«ENDFILE» +«ENDDEFINE» +«REM»##############################################################################################################«ENDREM» +«DEFINE manifestMF FOR DawnEMFGenerator» +«FILE "META-INF/MANIFEST.MF"»Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Dawn +Bundle-SymbolicName: «this.fragmentName»;singleton:=true +Bundle-Version: 1.0.0.qualifier +Fragment-Host: «this.emfGenModel.editorPluginID» +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.cdo.dawn.util;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.cdo.ui;bundle-version="[4.0.0,5.0.0)", + org.eclipse.emf.cdo.dawn.emf;bundle-version="[2.0.0,3.0.0)" +«ENDFILE» +«ENDDEFINE» + + +«DEFINE buildPROPERTIES FOR DawnEMFGenerator» +«FILE "build.properties"»source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.xml +«ENDFILE» +«ENDDEFINE» +«REM»################################### . classpath ###########################################################################«ENDREM» + +«DEFINE classpath FOR DawnEMFGenerator» +«FILE ".classpath"»<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> +«ENDFILE» +«ENDDEFINE» + diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt index e26f678e54..7a8ea17c0d 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt +++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src/templates/GMFFragmentTemplate.xpt @@ -1,1046 +1,1046 @@ -«REM»
- Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- Martin Fluegge - initial API and implementation
-
-«ENDREM»
-
-«IMPORT gmfgen»
-«IMPORT gmfgraph»
-«IMPORT emf»
-«IMPORT genmodel»
-«IMPORT ecore»
-«IMPORT dawngenmodel»
-«IMPORT dawnGmfGenmodel»
-
-«EXTENSION org::eclipse::emf::cdo::dawn::codegen::util::Utils»
-
-«DEFINE main FOR DawnGMFGenerator»
- «setDiagramPackage(this.GMFGenEditorGenerator.packageNamePrefix)»
-
- «EXPAND dawnEditor FOR this»
- «EXPAND dawnEditPart FOR this»
- «EXPAND dawnEditPartFactory FOR this»
- «EXPAND dawnCanonicalEditingPolicy FOR this»
- «EXPAND dawnCreationWizard FOR this»
- «EXPAND dawnEditorUtil FOR this»
- «EXPAND dawnDocumentProvider FOR this»
- «EXPAND dawnEditPartProvider FOR this»
- «EXPAND fragmentXML FOR this»
- «EXPAND dawnEditPolicyProvider FOR this»
- «EXPAND manifestMF FOR this»
- «EXPAND buildPROPERTIES FOR this.GMFGenEditorGenerator»
- «EXPAND classpath FOR this.GMFGenEditorGenerator»
-
-«ENDDEFINE»
-
-«REM»############################################ Extended Editor ##################################################################«ENDREM»
-«DEFINE dawnEditor FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorClassName+".java"»
-
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
-import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
-import org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.ui.CDOEditorInput;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.net4j.util.transaction.TransactionException;
-
-import org.eclipse.emf.common.ui.URIEditorInput;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditorClassName» extends «GMFGenEditorGenerator.editor.className» implements IDawnEditor
-{
- public static String ID = "«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»";
-
- private IDawnEditorSupport dawnEditorSupport;
-
- «EXPAND generatedComment -»
- public «this.dawnEditorClassName» ()
- {
- super();
- setDocumentProvider(new «this.dawnDocumentProviderClassName»());
- setDawnEditorSupport(new DawnGMFEditorSupport(this));
- }
-
- «EXPAND generatedComment -»
- @Override
- public void setInput(IEditorInput input)
- {
- try
- {
- doSetInput(input, true);
- }
- catch (CoreException x)
- {
- x.printStackTrace(System.err);
- String title = x.getMessage();
- String msg = x.getMessage();
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
-
- dawnEditorSupport.setView(((DawnEditorInput)input).getView());
- }
-
- «EXPAND generatedComment -»
- @Override
- protected void initializeGraphicalViewer()
- {
- super.initializeGraphicalViewer();
- dawnEditorSupport.registerListeners();
- }
-
- «EXPAND generatedComment -»
- @Override
- public void doSave(IProgressMonitor monitor)
- {
- try
- {
- dawnEditorSupport.setDirty(false);
- updateState(getEditorInput());
- validateState(getEditorInput());
- performSave(false, monitor);
- }
- catch (TransactionException e)
- {
- if (e.getMessage().contains("conflict"))
- {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict",
- "Your Resource is in conflict and cannot be committed");
- }
- else
- {
- throw e;
- }
- }
- }
-
- «EXPAND generatedComment -»
- @Override
- public boolean isDirty()
- {
- return dawnEditorSupport.isDirty();
- }
-
- «EXPAND generatedComment -»
- public String getContributorID()
- {
- return ID;
- }
-
- «EXPAND generatedComment -»
- @Override
- protected void setDocumentProvider(IEditorInput input)
- {
- if (input instanceof IFileEditorInput || input instanceof URIEditorInput || input instanceof CDOEditorInput)
- {
- setDocumentProvider(getDocumentProvider());
- }
- else
- {
- super.setDocumentProvider(input);
- }
- }
-
- «EXPAND generatedComment -»
- @Override
- public void dispose()
- {
- try
- {
- super.dispose();
- }
- finally
- {
- dawnEditorSupport.close();
- }
- }
-
- «EXPAND generatedComment -»
- public CDOView getView()
- {
- return dawnEditorSupport.getView();
- }
-
- «EXPAND generatedComment -»
- public void setDirty()
- {
- dawnEditorSupport.setDirty(true);
- ((AbstractDocumentProvider)getDocumentProvider()).changed(getEditorInput());
- }
-
- public void setDawnEditorSupport(IDawnEditorSupport dawnEditorSupport)
- {
- this.dawnEditorSupport = dawnEditorSupport;
- }
-
- public IDawnEditorSupport getDawnEditorSupport()
- {
- return dawnEditorSupport;
- }
-}
-
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXEditPart ##################################################################«ENDREM»
-«DEFINE dawnEditPart FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnDiagramEditPartClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»;
-
-import org.eclipse.emf.cdo.dawn.gmf.synchronize.DawnConflictHelper;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-«EXPAND generatedComment -»
-public class «this.dawnDiagramEditPartClassName» extends «this.GMFGenEditorGenerator.diagram.editPartClassName»
-{
-
- «EXPAND generatedComment -»
- public «this.dawnDiagramEditPartClassName»(View view)
- {
- super(view);
- }
-
- «EXPAND generatedComment -»
- @Override
- protected void removeChild(EditPart child)
- {
- if (DawnConflictHelper.isConflicted((EObject)child.getModel()))
- {
- return;
- }
- super.removeChild(child);
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXEditPartFactory ##################################################################«ENDREM»
-«DEFINE dawnEditPartFactory FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnEditPartFactoryClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»;
-
-
-import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName»;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditPartFactoryClassName» extends «this.GMFGenEditorGenerator.diagram.editPartFactoryClassName»
-{
- «EXPAND generatedComment -»
- public «this.dawnEditPartFactoryClassName»()
- {
- super();
- }
-
- «EXPAND generatedComment -»
- @Override
- public EditPart createEditPart(EditPart context, Object model)
- {
- if (model instanceof View)
- {
- View view = (View)model;
- switch («this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName».getVisualID(view))
- {
- case «this.dawnDiagramEditPartClassName».VISUAL_ID:
- return new «this.dawnDiagramEditPartClassName»(view);
- }
- }
-
- return super.createEditPart(context, model);
- }
-}
-
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXCanonicalEditingPolicy ##################################################################«ENDREM»
-«DEFINE dawnCanonicalEditingPolicy FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/edit/policies/"+this.dawnCanonicalEditingPolicyClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName»;
-
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.notation.View;
-
-import java.util.ArrayList;
-import java.util.List;
-
-«EXPAND generatedComment -»
-public class «this.dawnCanonicalEditingPolicyClassName» extends «this.GMFGenEditorGenerator.diagram.canonicalEditPolicyClassName»
-{
- «EXPAND generatedComment -»
- public «this.dawnCanonicalEditingPolicyClassName»()
- {
- super();
- }
-
- @Override
- protected CreateViewRequest getCreateViewRequest(List<ViewDescriptor> descriptors)
- {
- List<View> viewChildren = getViewChildren();
-
- List<ViewDescriptor> tbr = new ArrayList<CreateViewRequest.ViewDescriptor>();
-
- for (ViewDescriptor desc : descriptors)
- {
- EObject obj = (EObject)((CanonicalElementAdapter)desc.getElementAdapter()).getRealObject();
-
- boolean found = false;
-
- for (View view : viewChildren)
- {
- if (view.getElement().equals(obj))
- {
- found = true;
- break;
- }
- }
- if (!found)
- {
- tbr.add(desc);
- }
- }
-
- descriptors.removeAll(tbr);
-
- return new CreateViewRequest(descriptors);
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXCreationWizard ##################################################################«ENDREM»
-«DEFINE dawnCreationWizard FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnCreationWizardClassName+".java"»
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
-import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewDiagramResourceWizardPage;
-import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage;
-import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import java.lang.reflect.InvocationTargetException;
-
-«EXPAND generatedComment -»
-public class «this.dawnCreationWizardClassName» extends «this.GMFGenEditorGenerator.diagram.creationWizardClassName»
-{
- private CDOView view;
-
- private DawnCreateNewDiagramResourceWizardPage dawnDiagramModelFilePage;
-
- private DawnCreateNewResourceWizardPage dawnDomainModelFilePage;
-
- «EXPAND generatedComment -»
- public «this.dawnCreationWizardClassName»()
- {
- super();
- CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
- PreferenceConstants.getServerName());
- CDOSession session = CDOConnectionUtil.instance.openSession();
- view = CDOConnectionUtil.instance.openView(session);
- }
-
- «EXPAND generatedComment -»
- @Override
- public boolean performFinish()
- {
- IRunnableWithProgress op = new WorkspaceModifyOperation(null)
- {
- @Override
- protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException
- {
- URI diagramResourceURI = dawnDiagramModelFilePage.getURI();
- URI domainModelResourceURI = dawnDomainModelFilePage.getURI();
-
- diagram = «this.dawnEditorUtilClassName».createDiagram(diagramResourceURI, domainModelResourceURI, monitor);
-
- if (isOpenNewlyCreatedDiagramEditor() && diagram != null)
- {
- try
- {
- «this.dawnEditorUtilClassName».openDiagram(diagram);
- }
- catch (PartInitException e)
- {
- ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»OpenEditorError, null,
- e.getStatus());
- }
- }
- }
- };
- try
- {
- getContainer().run(false, true, op);
- }
- catch (InterruptedException e)
- {
- return false;
- }
- catch (InvocationTargetException e)
- {
- if (e.getTargetException() instanceof CoreException)
- {
- ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»CreationError, null,
- ((CoreException)e.getTargetException()).getStatus());
- }
- else
- {
- «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
- }
- return false;
- }
- return diagram != null;
- }
-
- «EXPAND generatedComment -»
- @Override
- public void addPages()
- {
-
- dawnDiagramModelFilePage = new DawnCreateNewDiagramResourceWizardPage("«this.GMFGenEditorGenerator.diagramFileExtension»", false, view);
- dawnDiagramModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageTitle);
- dawnDiagramModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageDescription);
- dawnDiagramModelFilePage.setCreateAutomaticResourceName(true);
- addPage(dawnDiagramModelFilePage);
-
- dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("«this.GMFGenEditorGenerator.domainFileExtension»", true, view)
- {
- @Override
- public void setVisible(boolean visible)
- {
- if (visible)
- {
- URI uri = dawnDiagramModelFilePage.getURI();
- String fileName = uri.lastSegment();
- fileName = fileName.substring(0, fileName.length() - ".«this.GMFGenEditorGenerator.diagramFileExtension»".length()); //$NON-NLS-1$
- fileName += ".«this.GMFGenEditorGenerator.domainFileExtension»";
- dawnDomainModelFilePage.setResourceNamePrefix(fileName);
- dawnDomainModelFilePage.setResourcePath(dawnDiagramModelFilePage.getResourcePath());
- }
- super.setVisible(visible);
- }
- };
- dawnDomainModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageTitle);
- dawnDomainModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageDescription);
-
- dawnDomainModelFilePage.setResourceValidationType(DawnCreateNewResourceWizardPage.VALIDATION_WARN);
- addPage(dawnDomainModelFilePage);
- }
-
- «EXPAND generatedComment -»
- @Override
- public void dispose()
- {
- view.close();
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXEditorUtil ##################################################################«ENDREM»
-«DEFINE dawnEditorUtil FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorUtilClassName+".java"»
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.commands.CreateSemanticResourceRecordingCommand;
-import «this.GMFGenEditorGenerator.diagram.domainDiagramElement.genPackage.basePackage».«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.ePackage.name».«this.GMFGenEditorGenerator.domainGenModel.modelName»Factory;
-
-
-import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnDiagramEditPartClassName»;
-import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
-import org.eclipse.emf.cdo.dawn.transaction.DawnGMFEditingDomainFactory;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-import java.io.IOException;
-import java.util.Collections;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditorUtilClassName» extends «this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»
-{
-
- «EXPAND generatedComment -»
- public static boolean openDiagram(Resource diagram) throws PartInitException
- {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- return null != page.openEditor(new DawnEditorInput(diagram.getURI()), «this.dawnEditorClassName».ID);
- }
-
- «EXPAND generatedComment -»
- public static void runWizard(Shell shell, Wizard wizard, String settingsKey)
- {
- IDialogSettings pluginDialogSettings = «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().getDialogSettings();
- IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
- if (wizardDialogSettings == null)
- {
- wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
- }
- wizard.setDialogSettings(wizardDialogSettings);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
- dialog.open();
- }
-
- «EXPAND generatedComment -»
- public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor)
- {
- TransactionalEditingDomain editingDomain = DawnGMFEditingDomainFactory.getInstance().createEditingDomain();
-
- progressMonitor.beginTask(Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramProgressTask, 3);
-
- CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
- PreferenceConstants.getServerName());
- CDOConnectionUtil.instance.openSession();
- ResourceSet resourceSet = editingDomain.getResourceSet();
-
- CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, diagramURI.toString());
-
- final Resource diagramResource = resourceSet.createResource(diagramURI);
-
-
- CreateSemanticResourceRecordingCommand createSemanticResourceCommand = new CreateSemanticResourceRecordingCommand(
- editingDomain, transaction, modelURI.path());
-
- editingDomain.getCommandStack().execute(createSemanticResourceCommand);
- final Resource modelResource = createSemanticResourceCommand.getResource();
-
- final String diagramName = diagramURI.lastSegment();
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
- Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramCommandLabel, Collections.EMPTY_LIST)
- {
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
- {
- EObject model = null;
- if (modelResource.getContents().size() > 0)
- {
- model = modelResource.getContents().get(0);
- }
- else
- {
- model = createInitialModel();
- attachModelToResource(model, modelResource);
- }
-
- Diagram diagram = ViewService.createDiagram(model, «this.dawnDiagramEditPartClassName».MODEL_ID,
- «this.GMFGenEditorGenerator.plugin.activatorClassName».DIAGRAM_PREFERENCES_HINT);
- if (diagram != null)
- {
- diagramResource.getContents().add(diagram);
- diagram.setName(diagramName);
- diagram.setElement(model);
- }
-
- try
- {
- modelResource.save(Collections.EMPTY_MAP);
- diagramResource.save(Collections.EMPTY_MAP);
- }
- catch (IOException e)
- {
- «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
- }
-
- return CommandResult.newOKCommandResult();
- }
- };
- try
- {
- OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
- }
- catch (ExecutionException e)
- {
- «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
- }
- setCharset(WorkspaceSynchronizer.getFile(modelResource));
- setCharset(WorkspaceSynchronizer.getFile(diagramResource));
- return diagramResource;
- }
-
- «EXPAND generatedComment -»
- private static EObject createInitialModel()
- {
- return «this.GMFGenEditorGenerator.domainGenModel.modelName»Factory.eINSTANCE.create«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.name»();
- }
-
- «EXPAND generatedComment -»
- private static void attachModelToResource(EObject model, Resource resource)
- {
- resource.getContents().add(model);
- }
-}
-
-
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXDocumentProvider ##################################################################«ENDREM»
-«DEFINE dawnDocumentProvider FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnDocumentProviderClassName+".java"»
-package «this.GMFGenEditorGenerator.editor.packageName»;
-
-import org.eclipse.emf.cdo.dawn.transaction.DawnDiagramEditingDomainFactory;
-import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
-import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
-import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-«EXPAND generatedComment -»
-public class «this.dawnDocumentProviderClassName» extends «this.GMFGenEditorGenerator.diagram.documentProviderClassName»
-{
-
- «EXPAND generatedComment -»
- public «this.dawnDocumentProviderClassName» ()
- {
- super();
- }
-
- «EXPAND generatedComment -»
- @Override
- protected IDocument createEmptyDocument()
- {
- DiagramDocument document = new DiagramDocument();
- document.setEditingDomain(createEditingDomain());
- return document;
- }
-
- «EXPAND generatedComment -»
- private TransactionalEditingDomain createEditingDomain()
- {
- TransactionalEditingDomain editingDomain = DawnDiagramEditingDomainFactory.getInstance().createEditingDomain();
-
- editingDomain.setID("«this.GMFGenEditorGenerator.diagram.editingDomainID»"); //$NON-NLS-1$
- final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(
- editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD)).and(
- NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
- editingDomain.getResourceSet().eAdapters().add(new Adapter()
- {
- private Notifier myTarger;
-
- public Notifier getTarget()
- {
- return myTarger;
- }
-
- public boolean isAdapterForType(Object type)
- {
- return false;
- }
-
- public void notifyChanged(Notification notification)
- {
- if (diagramResourceModifiedFilter.matches(notification))
- {
- Object value = notification.getNewValue();
- if (value instanceof Resource)
- {
- ((Resource)value).setTrackingModification(true);
- }
- }
- }
-
- public void setTarget(Notifier newTarget)
- {
- myTarger = newTarget;
- }
- });
-
- return editingDomain;
- }
-
-
- «EXPAND generatedComment -»
- @Override
- protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException
- {
- IDiagramDocument diagramDocument = (IDiagramDocument)document;
- TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
- if (element instanceof FileEditorInput)
- {
- IStorage storage = ((FileEditorInput)element).getStorage();
- Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor());
- document.setContent(diagram);
- }
- else if (element instanceof URIEditorInput)
- {
- URIEditorInput editorInput = (URIEditorInput)element;
-
- URI uri = editorInput.getURI();
- Resource resource = null;
- try
- {
- URI dawnURI = URI.createURI(uri.toString().replace("cdo", "dawn"));
- resource = domain.getResourceSet().getResource(dawnURI, false);
- if (resource == null)
- {
- resource = domain.getResourceSet().getResource(dawnURI, true);
- }
-
- if (editorInput instanceof DawnEditorInput)
- {
- ((DawnEditorInput)editorInput).setResource((CDOResource)resource);
- }
- if (!resource.isLoaded())
- {
- try
- {
- Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
- resource.load(options);
- }
- catch (IOException e)
- {
- resource.unload();
- throw e;
- }
- }
- if (uri.fragment() != null)
- {
- EObject rootElement = resource.getEObject(uri.fragment());
- if (rootElement instanceof Diagram)
- {
- Diagram diagram = (Diagram)rootElement;
- DawnDiagramUpdater.initializeElement(diagram);
- document.setContent(diagram);
-
- return;
- }
- }
- else
- {
- for (Iterator<?> it = resource.getContents().iterator(); it.hasNext();)
- {
- Object rootElement = it.next();
- if (rootElement instanceof Diagram)
- {
- Diagram diagram = (Diagram)rootElement;
- DawnDiagramUpdater.initializeElement(diagram);
- document.setContent(diagram);
-
- return;
- }
- }
- }
- throw new RuntimeException(Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_NoDiagramInResourceError);
- }
- catch (Exception e)
- {
- CoreException thrownExcp = null;
- if (e instanceof CoreException)
- {
- thrownExcp = (CoreException)e;
- }
- else
- {
- String msg = e.getLocalizedMessage();
- thrownExcp = new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0,
- msg != null ? msg : Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_DiagramLoadingError, e));
- }
- throw thrownExcp;
- }
- }
- else
- {
- throw new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0, NLS.bind(
- Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_IncorrectInputError, new Object[] { element,
- "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- }
-
- «EXPAND generatedComment -»
- @Override
- public void changed(Object element)
- {
- if (element instanceof IEditorInput)
- {
- fireElementDirtyStateChanged(element, true);
- }
- }
-}
-«ENDFILE»
-«ENDDEFINE»
-
-
-«REM»############################################ DawnXXXEditPartProvider ##################################################################«ENDREM»
-«DEFINE dawnEditPartProvider FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/providers/"+this.dawnEditPartProviderClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.providersPackageName»;
-
-import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnEditPartFactoryClassName»;
-import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»;
-
-«EXPAND generatedComment -»
-public class «this.dawnEditPartProviderClassName» extends «this.GMFGenEditorGenerator.diagram.editPartProviderClassName»
-{
-
- «EXPAND generatedComment -»
- public «this.dawnEditPartProviderClassName»()
- {
- super();
- setFactory(new «this.dawnEditPartFactoryClassName»());
- }
-}
-
-
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»############################################ DawnXXXEditPolicyProvider ##################################################################«ENDREM»
-«DEFINE dawnEditPolicyProvider FOR DawnGMFGenerator»
-«FILE "src/"+getDiagramPackagePath()+"/providers/"+dawnEditPolicyProviderClassName+".java"»
-package «this.GMFGenEditorGenerator.diagram.providersPackageName»;
-
-import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.GMFGenEditorGenerator.diagram.editPartClassName»;
-import «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName».«this.dawnCanonicalEditingPolicyClassName»;
-import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-
-«EXPAND generatedComment -»
-public class «dawnEditPolicyProviderClassName» extends AbstractProvider implements IEditPolicyProvider
-{
- public static String ID = "«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»";
-
- «EXPAND generatedComment -»
- public boolean provides(IOperation operation)
- {
- if (operation instanceof CreateEditPoliciesOperation)
- {
- CreateEditPoliciesOperation editPoliciesOperation = (CreateEditPoliciesOperation)operation;
- if (editPoliciesOperation.getEditPart() instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName»)
- {
- return true;
- }
- }
- return false;
- }
-
- «EXPAND generatedComment -»
- public void createEditPolicies(EditPart editPart)
- {
- if (editPart instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName»)
- {
- editPart.installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new «this.dawnCanonicalEditingPolicyClassName»());
- }
- }
-}
-
-«ENDFILE»
-«ENDDEFINE»
-
-«REM»########################################## fragment.xml ####################################################################«ENDREM»
-«DEFINE fragmentXML FOR DawnGMFGenerator»
-«FILE "fragment.xml"»<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<fragment>
-<extension
- point="org.eclipse.ui.editors">
- <editor
-
- class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"
- contributorClass="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.editor.actionBarContributorClassName»"
- default="true"
- extensions="«this.GMFGenEditorGenerator.diagramFileExtension»"
- icon="«this.GMFGenEditorGenerator.editor.iconPath»"
- id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"
- matchingStrategy="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.matchingStrategyClassName»"
- name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- category="org.eclipse.ui.Examples"
- class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»"
- icon="«this.GMFGenEditorGenerator.editor.iconPath»"
- id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»"
- name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram">
- <description>
- description body text
- </description>
- </wizard>
-
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders">
- <provider
- class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»"
- documentType="org.eclipse.gmf.runtime.diagram.ui.editor.IDocument"
- id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»"
- inputTypes="org.eclipse.emf.common.ui.URIEditorInput">
- </provider>
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»">
- <Priority
- name="Low">
- </Priority>
- </editpolicyProvider>
- </extension>
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPartProviderClassName»">
- <Priority name="Medium"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="«this.GMFGenEditorGenerator.modelID»"/>
- </object>
- <context views="generated-diagram"/>
- </editpartProvider>
- </extension>
-</fragment>
-
-«ENDFILE»
-«ENDDEFINE»
-
-
-
-«REM»##############################################################################################################«ENDREM»
-«DEFINE manifestMF FOR DawnGMFGenerator»
-«FILE "META-INF/MANIFEST.MF"»Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Dawn «this.GMFGenEditorGenerator.plugin.name»
-Bundle-SymbolicName: «this.fragmentName»;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Fragment-Host: «this.GMFGenEditorGenerator.plugin.iD»;bundle-version="0.2.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.dawn.util;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.ui;bundle-version="[3.0.0,5.0.0)",
- org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.0.0,3.0.0)"
-«ENDFILE»
-«ENDDEFINE»
-
-
-«DEFINE buildPROPERTIES FOR GenEditorGenerator»
-«FILE "build.properties"»source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- fragment.xml
-«ENDFILE»
-«ENDDEFINE»
-«REM»################################### . classpath ###########################################################################«ENDREM»
-
-«DEFINE classpath FOR GenEditorGenerator»
-«FILE ".classpath"»<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
-«ENDFILE»
-«ENDDEFINE»
-
-«DEFINE generatedComment FOR Object-»
-«REM»/**
- *@generated
- */«ENDREM»
- «ENDDEFINE»
-
+«REM» + Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + Martin Fluegge - initial API and implementation + +«ENDREM» + +«IMPORT gmfgen» +«IMPORT gmfgraph» +«IMPORT emf» +«IMPORT genmodel» +«IMPORT ecore» +«IMPORT dawngenmodel» +«IMPORT dawnGmfGenmodel» + +«EXTENSION org::eclipse::emf::cdo::dawn::codegen::util::Utils» + +«DEFINE main FOR DawnGMFGenerator» + «setDiagramPackage(this.GMFGenEditorGenerator.packageNamePrefix)» + + «EXPAND dawnEditor FOR this» + «EXPAND dawnEditPart FOR this» + «EXPAND dawnEditPartFactory FOR this» + «EXPAND dawnCanonicalEditingPolicy FOR this» + «EXPAND dawnCreationWizard FOR this» + «EXPAND dawnEditorUtil FOR this» + «EXPAND dawnDocumentProvider FOR this» + «EXPAND dawnEditPartProvider FOR this» + «EXPAND fragmentXML FOR this» + «EXPAND dawnEditPolicyProvider FOR this» + «EXPAND manifestMF FOR this» + «EXPAND buildPROPERTIES FOR this.GMFGenEditorGenerator» + «EXPAND classpath FOR this.GMFGenEditorGenerator» + +«ENDDEFINE» + +«REM»############################################ Extended Editor ##################################################################«ENDREM» +«DEFINE dawnEditor FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorClassName+".java"» + +package «this.GMFGenEditorGenerator.editor.packageName»; + +import org.eclipse.emf.cdo.dawn.editors.IDawnEditor; +import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport; +import org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport; +import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput; +import org.eclipse.emf.cdo.ui.CDOEditorInput; +import org.eclipse.emf.cdo.view.CDOView; + +import org.eclipse.net4j.util.transaction.TransactionException; + +import org.eclipse.emf.common.ui.URIEditorInput; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IFileEditorInput; + +«EXPAND generatedComment -» +public class «this.dawnEditorClassName» extends «GMFGenEditorGenerator.editor.className» implements IDawnEditor +{ + public static String ID = "«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»"; + + private IDawnEditorSupport dawnEditorSupport; + + «EXPAND generatedComment -» + public «this.dawnEditorClassName» () + { + super(); + setDocumentProvider(new «this.dawnDocumentProviderClassName»()); + setDawnEditorSupport(new DawnGMFEditorSupport(this)); + } + + «EXPAND generatedComment -» + @Override + public void setInput(IEditorInput input) + { + try + { + doSetInput(input, true); + } + catch (CoreException x) + { + x.printStackTrace(System.err); + String title = x.getMessage(); + String msg = x.getMessage(); + Shell shell = getSite().getShell(); + ErrorDialog.openError(shell, title, msg, x.getStatus()); + } + + dawnEditorSupport.setView(((DawnEditorInput)input).getView()); + } + + «EXPAND generatedComment -» + @Override + protected void initializeGraphicalViewer() + { + super.initializeGraphicalViewer(); + dawnEditorSupport.registerListeners(); + } + + «EXPAND generatedComment -» + @Override + public void doSave(IProgressMonitor monitor) + { + try + { + dawnEditorSupport.setDirty(false); + updateState(getEditorInput()); + validateState(getEditorInput()); + performSave(false, monitor); + } + catch (TransactionException e) + { + if (e.getMessage().contains("conflict")) + { + MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict", + "Your Resource is in conflict and cannot be committed"); + } + else + { + throw e; + } + } + } + + «EXPAND generatedComment -» + @Override + public boolean isDirty() + { + return dawnEditorSupport.isDirty(); + } + + «EXPAND generatedComment -» + public String getContributorID() + { + return ID; + } + + «EXPAND generatedComment -» + @Override + protected void setDocumentProvider(IEditorInput input) + { + if (input instanceof IFileEditorInput || input instanceof URIEditorInput || input instanceof CDOEditorInput) + { + setDocumentProvider(getDocumentProvider()); + } + else + { + super.setDocumentProvider(input); + } + } + + «EXPAND generatedComment -» + @Override + public void dispose() + { + try + { + super.dispose(); + } + finally + { + dawnEditorSupport.close(); + } + } + + «EXPAND generatedComment -» + public CDOView getView() + { + return dawnEditorSupport.getView(); + } + + «EXPAND generatedComment -» + public void setDirty() + { + dawnEditorSupport.setDirty(true); + ((AbstractDocumentProvider)getDocumentProvider()).changed(getEditorInput()); + } + + public void setDawnEditorSupport(IDawnEditorSupport dawnEditorSupport) + { + this.dawnEditorSupport = dawnEditorSupport; + } + + public IDawnEditorSupport getDawnEditorSupport() + { + return dawnEditorSupport; + } +} + +«ENDFILE» +«ENDDEFINE» + + +«REM»############################################ DawnXXXEditPart ##################################################################«ENDREM» +«DEFINE dawnEditPart FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnDiagramEditPartClassName+".java"» +package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»; + +import org.eclipse.emf.cdo.dawn.gmf.synchronize.DawnConflictHelper; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.notation.View; + +«EXPAND generatedComment -» +public class «this.dawnDiagramEditPartClassName» extends «this.GMFGenEditorGenerator.diagram.editPartClassName» +{ + + «EXPAND generatedComment -» + public «this.dawnDiagramEditPartClassName»(View view) + { + super(view); + } + + «EXPAND generatedComment -» + @Override + protected void removeChild(EditPart child) + { + if (DawnConflictHelper.isConflicted((EObject)child.getModel())) + { + return; + } + super.removeChild(child); + } +} +«ENDFILE» +«ENDDEFINE» + + +«REM»############################################ DawnXXXEditPartFactory ##################################################################«ENDREM» +«DEFINE dawnEditPartFactory FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/edit/parts/"+this.dawnEditPartFactoryClassName+".java"» +package «this.GMFGenEditorGenerator.diagram.editPartsPackageName»; + + +import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName»; + +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.notation.View; + +«EXPAND generatedComment -» +public class «this.dawnEditPartFactoryClassName» extends «this.GMFGenEditorGenerator.diagram.editPartFactoryClassName» +{ + «EXPAND generatedComment -» + public «this.dawnEditPartFactoryClassName»() + { + super(); + } + + «EXPAND generatedComment -» + @Override + public EditPart createEditPart(EditPart context, Object model) + { + if (model instanceof View) + { + View view = (View)model; + switch («this.GMFGenEditorGenerator.diagram.visualIDRegistryClassName».getVisualID(view)) + { + case «this.dawnDiagramEditPartClassName».VISUAL_ID: + return new «this.dawnDiagramEditPartClassName»(view); + } + } + + return super.createEditPart(context, model); + } +} + +«ENDFILE» +«ENDDEFINE» + + +«REM»############################################ DawnXXXCanonicalEditingPolicy ##################################################################«ENDREM» +«DEFINE dawnCanonicalEditingPolicy FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/edit/policies/"+this.dawnCanonicalEditingPolicyClassName+".java"» +package «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName»; + + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor; +import org.eclipse.gmf.runtime.notation.View; + +import java.util.ArrayList; +import java.util.List; + +«EXPAND generatedComment -» +public class «this.dawnCanonicalEditingPolicyClassName» extends «this.GMFGenEditorGenerator.diagram.canonicalEditPolicyClassName» +{ + «EXPAND generatedComment -» + public «this.dawnCanonicalEditingPolicyClassName»() + { + super(); + } + + @Override + protected CreateViewRequest getCreateViewRequest(List<ViewDescriptor> descriptors) + { + List<View> viewChildren = getViewChildren(); + + List<ViewDescriptor> tbr = new ArrayList<CreateViewRequest.ViewDescriptor>(); + + for (ViewDescriptor desc : descriptors) + { + EObject obj = (EObject)((CanonicalElementAdapter)desc.getElementAdapter()).getRealObject(); + + boolean found = false; + + for (View view : viewChildren) + { + if (view.getElement().equals(obj)) + { + found = true; + break; + } + } + if (!found) + { + tbr.add(desc); + } + } + + descriptors.removeAll(tbr); + + return new CreateViewRequest(descriptors); + } +} +«ENDFILE» +«ENDDEFINE» + +«REM»############################################ DawnXXXCreationWizard ##################################################################«ENDREM» +«DEFINE dawnCreationWizard FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnCreationWizardClassName+".java"» +package «this.GMFGenEditorGenerator.editor.packageName»; + +import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants; +import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewDiagramResourceWizardPage; +import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage; +import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil; +import org.eclipse.emf.cdo.session.CDOSession; +import org.eclipse.emf.cdo.view.CDOView; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import java.lang.reflect.InvocationTargetException; + +«EXPAND generatedComment -» +public class «this.dawnCreationWizardClassName» extends «this.GMFGenEditorGenerator.diagram.creationWizardClassName» +{ + private CDOView view; + + private DawnCreateNewDiagramResourceWizardPage dawnDiagramModelFilePage; + + private DawnCreateNewResourceWizardPage dawnDomainModelFilePage; + + «EXPAND generatedComment -» + public «this.dawnCreationWizardClassName»() + { + super(); + CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(), + PreferenceConstants.getServerName()); + CDOSession session = CDOConnectionUtil.instance.openSession(); + view = CDOConnectionUtil.instance.openView(session); + } + + «EXPAND generatedComment -» + @Override + public boolean performFinish() + { + IRunnableWithProgress op = new WorkspaceModifyOperation(null) + { + @Override + protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException + { + URI diagramResourceURI = dawnDiagramModelFilePage.getURI(); + URI domainModelResourceURI = dawnDomainModelFilePage.getURI(); + + diagram = «this.dawnEditorUtilClassName».createDiagram(diagramResourceURI, domainModelResourceURI, monitor); + + if (isOpenNewlyCreatedDiagramEditor() && diagram != null) + { + try + { + «this.dawnEditorUtilClassName».openDiagram(diagram); + } + catch (PartInitException e) + { + ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»OpenEditorError, null, + e.getStatus()); + } + } + } + }; + try + { + getContainer().run(false, true, op); + } + catch (InterruptedException e) + { + return false; + } + catch (InvocationTargetException e) + { + if (e.getTargetException() instanceof CoreException) + { + ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»CreationError, null, + ((CoreException)e.getTargetException()).getStatus()); + } + else + { + «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$ + } + return false; + } + return diagram != null; + } + + «EXPAND generatedComment -» + @Override + public void addPages() + { + + dawnDiagramModelFilePage = new DawnCreateNewDiagramResourceWizardPage("«this.GMFGenEditorGenerator.diagramFileExtension»", false, view); + dawnDiagramModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageTitle); + dawnDiagramModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DiagramModelFilePageDescription); + dawnDiagramModelFilePage.setCreateAutomaticResourceName(true); + addPage(dawnDiagramModelFilePage); + + dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("«this.GMFGenEditorGenerator.domainFileExtension»", true, view) + { + @Override + public void setVisible(boolean visible) + { + if (visible) + { + URI uri = dawnDiagramModelFilePage.getURI(); + String fileName = uri.lastSegment(); + fileName = fileName.substring(0, fileName.length() - ".«this.GMFGenEditorGenerator.diagramFileExtension»".length()); //$NON-NLS-1$ + fileName += ".«this.GMFGenEditorGenerator.domainFileExtension»"; + dawnDomainModelFilePage.setResourceNamePrefix(fileName); + dawnDomainModelFilePage.setResourcePath(dawnDiagramModelFilePage.getResourcePath()); + } + super.setVisible(visible); + } + }; + dawnDomainModelFilePage.setTitle(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageTitle); + dawnDomainModelFilePage.setDescription(Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»_DomainModelFilePageDescription); + + dawnDomainModelFilePage.setResourceValidationType(DawnCreateNewResourceWizardPage.VALIDATION_WARN); + addPage(dawnDomainModelFilePage); + } + + «EXPAND generatedComment -» + @Override + public void dispose() + { + view.close(); + } +} +«ENDFILE» +«ENDDEFINE» + +«REM»############################################ DawnXXXEditorUtil ##################################################################«ENDREM» +«DEFINE dawnEditorUtil FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnEditorUtilClassName+".java"» +package «this.GMFGenEditorGenerator.editor.packageName»; + +import org.eclipse.emf.cdo.dawn.commands.CreateSemanticResourceRecordingCommand; +import «this.GMFGenEditorGenerator.diagram.domainDiagramElement.genPackage.basePackage».«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.ePackage.name».«this.GMFGenEditorGenerator.domainGenModel.modelName»Factory; + + +import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnDiagramEditPartClassName»; +import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants; +import org.eclipse.emf.cdo.dawn.transaction.DawnGMFEditingDomainFactory; +import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput; +import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil; +import org.eclipse.emf.cdo.transaction.CDOTransaction; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.operations.OperationHistoryFactory; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.diagram.core.services.ViewService; +import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; + +import java.io.IOException; +import java.util.Collections; + +«EXPAND generatedComment -» +public class «this.dawnEditorUtilClassName» extends «this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName» +{ + + «EXPAND generatedComment -» + public static boolean openDiagram(Resource diagram) throws PartInitException + { + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + return null != page.openEditor(new DawnEditorInput(diagram.getURI()), «this.dawnEditorClassName».ID); + } + + «EXPAND generatedComment -» + public static void runWizard(Shell shell, Wizard wizard, String settingsKey) + { + IDialogSettings pluginDialogSettings = «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().getDialogSettings(); + IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey); + if (wizardDialogSettings == null) + { + wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey); + } + wizard.setDialogSettings(wizardDialogSettings); + WizardDialog dialog = new WizardDialog(shell, wizard); + dialog.create(); + dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); + dialog.open(); + } + + «EXPAND generatedComment -» + public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor) + { + TransactionalEditingDomain editingDomain = DawnGMFEditingDomainFactory.getInstance().createEditingDomain(); + + progressMonitor.beginTask(Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramProgressTask, 3); + + CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(), + PreferenceConstants.getServerName()); + CDOConnectionUtil.instance.openSession(); + ResourceSet resourceSet = editingDomain.getResourceSet(); + + CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, diagramURI.toString()); + + final Resource diagramResource = resourceSet.createResource(diagramURI); + + + CreateSemanticResourceRecordingCommand createSemanticResourceCommand = new CreateSemanticResourceRecordingCommand( + editingDomain, transaction, modelURI.path()); + + editingDomain.getCommandStack().execute(createSemanticResourceCommand); + final Resource modelResource = createSemanticResourceCommand.getResource(); + + final String diagramName = diagramURI.lastSegment(); + AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, + Messages.«this.GMFGenEditorGenerator.diagram.diagramEditorUtilClassName»_CreateDiagramCommandLabel, Collections.EMPTY_LIST) + { + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException + { + EObject model = null; + if (modelResource.getContents().size() > 0) + { + model = modelResource.getContents().get(0); + } + else + { + model = createInitialModel(); + attachModelToResource(model, modelResource); + } + + Diagram diagram = ViewService.createDiagram(model, «this.dawnDiagramEditPartClassName».MODEL_ID, + «this.GMFGenEditorGenerator.plugin.activatorClassName».DIAGRAM_PREFERENCES_HINT); + if (diagram != null) + { + diagramResource.getContents().add(diagram); + diagram.setName(diagramName); + diagram.setElement(model); + } + + try + { + modelResource.save(Collections.EMPTY_MAP); + diagramResource.save(Collections.EMPTY_MAP); + } + catch (IOException e) + { + «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$ + } + + return CommandResult.newOKCommandResult(); + } + }; + try + { + OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null); + } + catch (ExecutionException e) + { + «this.GMFGenEditorGenerator.plugin.activatorClassName».getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$ + } + setCharset(WorkspaceSynchronizer.getFile(modelResource)); + setCharset(WorkspaceSynchronizer.getFile(diagramResource)); + return diagramResource; + } + + «EXPAND generatedComment -» + private static EObject createInitialModel() + { + return «this.GMFGenEditorGenerator.domainGenModel.modelName»Factory.eINSTANCE.create«this.GMFGenEditorGenerator.diagram.domainDiagramElement.ecoreClass.name»(); + } + + «EXPAND generatedComment -» + private static void attachModelToResource(EObject model, Resource resource) + { + resource.getContents().add(model); + } +} + + +«ENDFILE» +«ENDDEFINE» + +«REM»############################################ DawnXXXDocumentProvider ##################################################################«ENDREM» +«DEFINE dawnDocumentProvider FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/part/"+this.dawnDocumentProviderClassName+".java"» +package «this.GMFGenEditorGenerator.editor.packageName»; + +import org.eclipse.emf.cdo.dawn.transaction.DawnDiagramEditingDomainFactory; +import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput; +import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater; +import org.eclipse.emf.cdo.eresource.CDOResource; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.ui.URIEditorInput; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.transaction.NotificationFilter; +import org.eclipse.emf.transaction.TransactionalEditingDomain; + +import org.eclipse.core.resources.IStorage; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil; +import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.osgi.util.NLS; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.part.FileEditorInput; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +«EXPAND generatedComment -» +public class «this.dawnDocumentProviderClassName» extends «this.GMFGenEditorGenerator.diagram.documentProviderClassName» +{ + + «EXPAND generatedComment -» + public «this.dawnDocumentProviderClassName» () + { + super(); + } + + «EXPAND generatedComment -» + @Override + protected IDocument createEmptyDocument() + { + DiagramDocument document = new DiagramDocument(); + document.setEditingDomain(createEditingDomain()); + return document; + } + + «EXPAND generatedComment -» + private TransactionalEditingDomain createEditingDomain() + { + TransactionalEditingDomain editingDomain = DawnDiagramEditingDomainFactory.getInstance().createEditingDomain(); + + editingDomain.setID("«this.GMFGenEditorGenerator.diagram.editingDomainID»"); //$NON-NLS-1$ + final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter( + editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD)).and( + NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES)); + editingDomain.getResourceSet().eAdapters().add(new Adapter() + { + private Notifier myTarger; + + public Notifier getTarget() + { + return myTarger; + } + + public boolean isAdapterForType(Object type) + { + return false; + } + + public void notifyChanged(Notification notification) + { + if (diagramResourceModifiedFilter.matches(notification)) + { + Object value = notification.getNewValue(); + if (value instanceof Resource) + { + ((Resource)value).setTrackingModification(true); + } + } + } + + public void setTarget(Notifier newTarget) + { + myTarger = newTarget; + } + }); + + return editingDomain; + } + + + «EXPAND generatedComment -» + @Override + protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException + { + IDiagramDocument diagramDocument = (IDiagramDocument)document; + TransactionalEditingDomain domain = diagramDocument.getEditingDomain(); + if (element instanceof FileEditorInput) + { + IStorage storage = ((FileEditorInput)element).getStorage(); + Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor()); + document.setContent(diagram); + } + else if (element instanceof URIEditorInput) + { + URIEditorInput editorInput = (URIEditorInput)element; + + URI uri = editorInput.getURI(); + Resource resource = null; + try + { + URI dawnURI = URI.createURI(uri.toString().replace("cdo", "dawn")); + resource = domain.getResourceSet().getResource(dawnURI, false); + if (resource == null) + { + resource = domain.getResourceSet().getResource(dawnURI, true); + } + + if (editorInput instanceof DawnEditorInput) + { + ((DawnEditorInput)editorInput).setResource((CDOResource)resource); + } + if (!resource.isLoaded()) + { + try + { + Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions()); + resource.load(options); + } + catch (IOException e) + { + resource.unload(); + throw e; + } + } + if (uri.fragment() != null) + { + EObject rootElement = resource.getEObject(uri.fragment()); + if (rootElement instanceof Diagram) + { + Diagram diagram = (Diagram)rootElement; + DawnDiagramUpdater.initializeElement(diagram); + document.setContent(diagram); + + return; + } + } + else + { + for (Iterator<?> it = resource.getContents().iterator(); it.hasNext();) + { + Object rootElement = it.next(); + if (rootElement instanceof Diagram) + { + Diagram diagram = (Diagram)rootElement; + DawnDiagramUpdater.initializeElement(diagram); + document.setContent(diagram); + + return; + } + } + } + throw new RuntimeException(Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_NoDiagramInResourceError); + } + catch (Exception e) + { + CoreException thrownExcp = null; + if (e instanceof CoreException) + { + thrownExcp = (CoreException)e; + } + else + { + String msg = e.getLocalizedMessage(); + thrownExcp = new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0, + msg != null ? msg : Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_DiagramLoadingError, e)); + } + throw thrownExcp; + } + } + else + { + throw new CoreException(new Status(IStatus.ERROR, «this.GMFGenEditorGenerator.plugin.activatorClassName».ID, 0, NLS.bind( + Messages.«this.GMFGenEditorGenerator.diagram.documentProviderClassName»_IncorrectInputError, new Object[] { element, + "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$ + null)); + } + } + + «EXPAND generatedComment -» + @Override + public void changed(Object element) + { + if (element instanceof IEditorInput) + { + fireElementDirtyStateChanged(element, true); + } + } +} +«ENDFILE» +«ENDDEFINE» + + +«REM»############################################ DawnXXXEditPartProvider ##################################################################«ENDREM» +«DEFINE dawnEditPartProvider FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/providers/"+this.dawnEditPartProviderClassName+".java"» +package «this.GMFGenEditorGenerator.diagram.providersPackageName»; + +import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.dawnEditPartFactoryClassName»; +import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»; + +«EXPAND generatedComment -» +public class «this.dawnEditPartProviderClassName» extends «this.GMFGenEditorGenerator.diagram.editPartProviderClassName» +{ + + «EXPAND generatedComment -» + public «this.dawnEditPartProviderClassName»() + { + super(); + setFactory(new «this.dawnEditPartFactoryClassName»()); + } +} + + +«ENDFILE» +«ENDDEFINE» + +«REM»############################################ DawnXXXEditPolicyProvider ##################################################################«ENDREM» +«DEFINE dawnEditPolicyProvider FOR DawnGMFGenerator» +«FILE "src/"+getDiagramPackagePath()+"/providers/"+dawnEditPolicyProviderClassName+".java"» +package «this.GMFGenEditorGenerator.diagram.providersPackageName»; + +import «this.GMFGenEditorGenerator.diagram.editPartsPackageName».«this.GMFGenEditorGenerator.diagram.editPartClassName»; +import «this.GMFGenEditorGenerator.diagram.editPoliciesPackageName».«this.dawnCanonicalEditingPolicyClassName»; +import «this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.plugin.activatorClassName»; + +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; +import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation; +import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider; + +«EXPAND generatedComment -» +public class «dawnEditPolicyProviderClassName» extends AbstractProvider implements IEditPolicyProvider +{ + public static String ID = "«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»"; + + «EXPAND generatedComment -» + public boolean provides(IOperation operation) + { + if (operation instanceof CreateEditPoliciesOperation) + { + CreateEditPoliciesOperation editPoliciesOperation = (CreateEditPoliciesOperation)operation; + if (editPoliciesOperation.getEditPart() instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName») + { + return true; + } + } + return false; + } + + «EXPAND generatedComment -» + public void createEditPolicies(EditPart editPart) + { + if (editPart instanceof «this.GMFGenEditorGenerator.diagram.editPartClassName») + { + editPart.installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new «this.dawnCanonicalEditingPolicyClassName»()); + } + } +} + +«ENDFILE» +«ENDDEFINE» + +«REM»########################################## fragment.xml ####################################################################«ENDREM» +«DEFINE fragmentXML FOR DawnGMFGenerator» +«FILE "fragment.xml"»<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<fragment> +<extension + point="org.eclipse.ui.editors"> + <editor + + class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»" + contributorClass="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.editor.actionBarContributorClassName»" + default="true" + extensions="«this.GMFGenEditorGenerator.diagramFileExtension»" + icon="«this.GMFGenEditorGenerator.editor.iconPath»" + id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnEditorClassName»" + matchingStrategy="«this.GMFGenEditorGenerator.editor.packageName».«this.GMFGenEditorGenerator.diagram.matchingStrategyClassName»" + name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram"> + </editor> + </extension> + <extension + point="org.eclipse.ui.newWizards"> + <wizard + category="org.eclipse.ui.Examples" + class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»" + icon="«this.GMFGenEditorGenerator.editor.iconPath»" + id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnCreationWizardClassName»" + name="Dawn «this.GMFGenEditorGenerator.modelID» Diagram"> + <description> + description body text + </description> + </wizard> + + </extension> + <extension + point="org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders"> + <provider + class="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»" + documentType="org.eclipse.gmf.runtime.diagram.ui.editor.IDocument" + id="«this.GMFGenEditorGenerator.editor.packageName».«this.dawnDocumentProviderClassName»" + inputTypes="org.eclipse.emf.common.ui.URIEditorInput"> + </provider> + </extension> + <extension + point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders"> + <editpolicyProvider + class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPolicyProviderClassName»"> + <Priority + name="Low"> + </Priority> + </editpolicyProvider> + </extension> + <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider"> + <?gmfgen generated="true"?> + <editpartProvider class="«this.GMFGenEditorGenerator.diagram.providersPackageName».«this.dawnEditPartProviderClassName»"> + <Priority name="Medium"/> + <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram"> + <method name="getType()" value="«this.GMFGenEditorGenerator.modelID»"/> + </object> + <context views="generated-diagram"/> + </editpartProvider> + </extension> +</fragment> + +«ENDFILE» +«ENDDEFINE» + + + +«REM»##############################################################################################################«ENDREM» +«DEFINE manifestMF FOR DawnGMFGenerator» +«FILE "META-INF/MANIFEST.MF"»Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Dawn «this.GMFGenEditorGenerator.plugin.name» +Bundle-SymbolicName: «this.fragmentName»;singleton:=true +Bundle-Version: 1.0.0.qualifier +Fragment-Host: «this.GMFGenEditorGenerator.plugin.iD»;bundle-version="0.2.0" +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.cdo.dawn.util;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.cdo.ui;bundle-version="[3.0.0,5.0.0)", + org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.0.0,3.0.0)" +«ENDFILE» +«ENDDEFINE» + + +«DEFINE buildPROPERTIES FOR GenEditorGenerator» +«FILE "build.properties"»source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.xml +«ENDFILE» +«ENDDEFINE» +«REM»################################### . classpath ###########################################################################«ENDREM» + +«DEFINE classpath FOR GenEditorGenerator» +«FILE ".classpath"»<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> +«ENDFILE» +«ENDDEFINE» + +«DEFINE generatedComment FOR Object-» +«REM»/** + *@generated + */«ENDREM» + «ENDDEFINE» + diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java index 9adc98ce17..ea464892c6 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java @@ -1,505 +1,505 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Martin Fluegge - initial API and implementation
- *
- */
-package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
-
-import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceItemSemanticEditPolicy;
-import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
-import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
-import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.RoundedRectangle;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.ToolbarLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.swt.graphics.Color;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @generated
- */
-public class AInterfaceEditPart extends ShapeNodeEditPart
-{
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2001;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public AInterfaceEditPart(View view)
- {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies()
- {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AInterfaceItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable
- // editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy()
- {
-
- ConstrainedToolbarLayoutEditPolicy lep = new ConstrainedToolbarLayoutEditPolicy()
- {
-
- protected EditPolicy createChildEditPolicy(EditPart child)
- {
- if (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null)
- {
- if (child instanceof ITextAwareEditPart)
- {
- return new AcoreTextSelectionEditPolicy();
- }
- }
- return super.createChildEditPolicy(child);
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape()
- {
- AInterfaceFigure figure = new AInterfaceFigure();
- return primaryShape = figure;
- }
-
- /**
- * @generated
- */
- public AInterfaceFigure getPrimaryShape()
- {
- return (AInterfaceFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart)
- {
- if (childEditPart instanceof AInterfaceNameEditPart)
- {
- ((AInterfaceNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureAInterfaceNameFigure());
- return true;
- }
- if (childEditPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart)
- {
- IFigure pane = getPrimaryShape().getFigureInterfaceAttributes();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((AInterfaceAAttributeInterfaceCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart)
- {
- IFigure pane = getPrimaryShape().getFigureInterfaceOperations();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((AInterfaceAOperationInterfaceCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart)
- {
- if (childEditPart instanceof AInterfaceNameEditPart)
- {
- return true;
- }
- if (childEditPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart)
- {
- IFigure pane = getPrimaryShape().getFigureInterfaceAttributes();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.remove(((AInterfaceAAttributeInterfaceCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart)
- {
- IFigure pane = getPrimaryShape().getFigureInterfaceOperations();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.remove(((AInterfaceAOperationInterfaceCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index)
- {
- if (addFixedChild(childEditPart))
- {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart)
- {
- if (removeFixedChild(childEditPart))
- {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart)
- {
- if (editPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart)
- {
- return getPrimaryShape().getFigureInterfaceAttributes();
- }
- if (editPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart)
- {
- return getPrimaryShape().getFigureInterfaceOperations();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate()
- {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
- return result;
- }
-
- /**
- * Creates figure for this edit part. Body of this method does not depend on settings in generation model so you may
- * safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure()
- {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape)
- {
- if (nodeShape.getLayoutManager() == null)
- {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- public IFigure getContentPane()
- {
- if (contentPane != null)
- {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- protected void setForegroundColor(Color color)
- {
- if (primaryShape != null)
- {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- protected void setBackgroundColor(Color color)
- {
- if (primaryShape != null)
- {
- primaryShape.setBackgroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineWidth(int width)
- {
- if (primaryShape instanceof Shape)
- {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style)
- {
- if (primaryShape instanceof Shape)
- {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart()
- {
- return getChildBySemanticHint(AcoreVisualIDRegistry.getType(AInterfaceNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget()
- {
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(AcoreElementTypes.AClassImplementedInterfaces_4002);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType)
- {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == AcoreElementTypes.AClassImplementedInterfaces_4002)
- {
- types.add(AcoreElementTypes.AClass_2002);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public EditPart getTargetEditPart(Request request)
- {
- if (request instanceof CreateViewAndElementRequest)
- {
- CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor()
- .getCreateElementRequestAdapter();
- IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
- if (type == AcoreElementTypes.AAttribute_3001)
- {
- return getChildBySemanticHint(AcoreVisualIDRegistry
- .getType(AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID));
- }
- if (type == AcoreElementTypes.AOperation_3002)
- {
- return getChildBySemanticHint(AcoreVisualIDRegistry
- .getType(AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID));
- }
- }
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- public class AInterfaceFigure extends RoundedRectangle
- {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureAInterfaceNameFigure;
-
- /**
- * @generated
- */
- private RectangleFigure fFigureInterfaceAttributes;
-
- /**
- * @generated
- */
- private RectangleFigure fFigureInterfaceOperations;
-
- /**
- * @generated
- */
- public AInterfaceFigure()
- {
-
- ToolbarLayout layoutThis = new ToolbarLayout();
- layoutThis.setStretchMinorAxis(true);
- layoutThis.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
-
- layoutThis.setSpacing(0);
- layoutThis.setVertical(true);
-
- this.setLayoutManager(layoutThis);
-
- this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12)));
- this.setLineWidth(1);
- this.setBackgroundColor(THIS_BACK);
- createContents();
- }
-
- /**
- * @generated
- */
- private void createContents()
- {
-
- WrappingLabel aInterfaceTypeLabelFigure0 = new WrappingLabel();
- aInterfaceTypeLabelFigure0.setText("«Interface»");
-
- this.add(aInterfaceTypeLabelFigure0);
-
- fFigureAInterfaceNameFigure = new WrappingLabel();
- fFigureAInterfaceNameFigure.setText("<...>");
-
- this.add(fFigureAInterfaceNameFigure);
-
- fFigureInterfaceAttributes = new RectangleFigure();
- fFigureInterfaceAttributes.setLineWidth(1);
-
- this.add(fFigureInterfaceAttributes);
- fFigureInterfaceAttributes.setLayoutManager(new StackLayout());
-
- fFigureInterfaceOperations = new RectangleFigure();
- fFigureInterfaceOperations.setLineWidth(1);
-
- this.add(fFigureInterfaceOperations);
- fFigureInterfaceOperations.setLayoutManager(new StackLayout());
-
- }
-
- /**
- * @generated
- */
- private boolean myUseLocalCoordinates = false;
-
- /**
- * @generated
- */
- protected boolean useLocalCoordinates()
- {
- return myUseLocalCoordinates;
- }
-
- /**
- * @generated
- */
- protected void setUseLocalCoordinates(boolean useLocalCoordinates)
- {
- myUseLocalCoordinates = useLocalCoordinates;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureAInterfaceNameFigure()
- {
- return fFigureAInterfaceNameFigure;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getFigureInterfaceAttributes()
- {
- return fFigureInterfaceAttributes;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getFigureInterfaceOperations()
- {
- return fFigureInterfaceOperations;
- }
-
- }
-
- /**
- * @generated
- */
- static final Color THIS_BACK = new Color(null, 250, 250, 190);
-
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Martin Fluegge - initial API and implementation + * + */ +package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts; + +import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceItemSemanticEditPolicy; +import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy; +import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry; +import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.draw2d.RoundedRectangle; +import org.eclipse.draw2d.Shape; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.ToolbarLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.swt.graphics.Color; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +/** + * @generated + */ +public class AInterfaceEditPart extends ShapeNodeEditPart +{ + + /** + * @generated + */ + public static final int VISUAL_ID = 2001; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public AInterfaceEditPart(View view) + { + super(view); + } + + /** + * @generated + */ + protected void createDefaultEditPolicies() + { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AInterfaceItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable + // editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() + { + + ConstrainedToolbarLayoutEditPolicy lep = new ConstrainedToolbarLayoutEditPolicy() + { + + protected EditPolicy createChildEditPolicy(EditPart child) + { + if (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null) + { + if (child instanceof ITextAwareEditPart) + { + return new AcoreTextSelectionEditPolicy(); + } + } + return super.createChildEditPolicy(child); + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() + { + AInterfaceFigure figure = new AInterfaceFigure(); + return primaryShape = figure; + } + + /** + * @generated + */ + public AInterfaceFigure getPrimaryShape() + { + return (AInterfaceFigure)primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) + { + if (childEditPart instanceof AInterfaceNameEditPart) + { + ((AInterfaceNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureAInterfaceNameFigure()); + return true; + } + if (childEditPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart) + { + IFigure pane = getPrimaryShape().getFigureInterfaceAttributes(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((AInterfaceAAttributeInterfaceCompartmentEditPart)childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart) + { + IFigure pane = getPrimaryShape().getFigureInterfaceOperations(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((AInterfaceAOperationInterfaceCompartmentEditPart)childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) + { + if (childEditPart instanceof AInterfaceNameEditPart) + { + return true; + } + if (childEditPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart) + { + IFigure pane = getPrimaryShape().getFigureInterfaceAttributes(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.remove(((AInterfaceAAttributeInterfaceCompartmentEditPart)childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart) + { + IFigure pane = getPrimaryShape().getFigureInterfaceOperations(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.remove(((AInterfaceAOperationInterfaceCompartmentEditPart)childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + protected void addChildVisual(EditPart childEditPart, int index) + { + if (addFixedChild(childEditPart)) + { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + protected void removeChildVisual(EditPart childEditPart) + { + if (removeFixedChild(childEditPart)) + { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) + { + if (editPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart) + { + return getPrimaryShape().getFigureInterfaceAttributes(); + } + if (editPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart) + { + return getPrimaryShape().getFigureInterfaceOperations(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() + { + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40); + return result; + } + + /** + * Creates figure for this edit part. Body of this method does not depend on settings in generation model so you may + * safely remove <i>generated</i> tag and modify it. + * + * @generated + */ + protected NodeFigure createNodeFigure() + { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) + { + if (nodeShape.getLayoutManager() == null) + { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + public IFigure getContentPane() + { + if (contentPane != null) + { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + protected void setForegroundColor(Color color) + { + if (primaryShape != null) + { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + protected void setBackgroundColor(Color color) + { + if (primaryShape != null) + { + primaryShape.setBackgroundColor(color); + } + } + + /** + * @generated + */ + protected void setLineWidth(int width) + { + if (primaryShape instanceof Shape) + { + ((Shape)primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + protected void setLineType(int style) + { + if (primaryShape instanceof Shape) + { + ((Shape)primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + public EditPart getPrimaryChildEditPart() + { + return getChildBySemanticHint(AcoreVisualIDRegistry.getType(AInterfaceNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List<IElementType> getMARelTypesOnTarget() + { + ArrayList<IElementType> types = new ArrayList<IElementType>(1); + types.add(AcoreElementTypes.AClassImplementedInterfaces_4002); + return types; + } + + /** + * @generated + */ + public List<IElementType> getMATypesForSource(IElementType relationshipType) + { + LinkedList<IElementType> types = new LinkedList<IElementType>(); + if (relationshipType == AcoreElementTypes.AClassImplementedInterfaces_4002) + { + types.add(AcoreElementTypes.AClass_2002); + } + return types; + } + + /** + * @generated + */ + public EditPart getTargetEditPart(Request request) + { + if (request instanceof CreateViewAndElementRequest) + { + CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor() + .getCreateElementRequestAdapter(); + IElementType type = (IElementType)adapter.getAdapter(IElementType.class); + if (type == AcoreElementTypes.AAttribute_3001) + { + return getChildBySemanticHint(AcoreVisualIDRegistry + .getType(AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID)); + } + if (type == AcoreElementTypes.AOperation_3002) + { + return getChildBySemanticHint(AcoreVisualIDRegistry + .getType(AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID)); + } + } + return super.getTargetEditPart(request); + } + + /** + * @generated + */ + public class AInterfaceFigure extends RoundedRectangle + { + + /** + * @generated + */ + private WrappingLabel fFigureAInterfaceNameFigure; + + /** + * @generated + */ + private RectangleFigure fFigureInterfaceAttributes; + + /** + * @generated + */ + private RectangleFigure fFigureInterfaceOperations; + + /** + * @generated + */ + public AInterfaceFigure() + { + + ToolbarLayout layoutThis = new ToolbarLayout(); + layoutThis.setStretchMinorAxis(true); + layoutThis.setMinorAlignment(ToolbarLayout.ALIGN_CENTER); + + layoutThis.setSpacing(0); + layoutThis.setVertical(true); + + this.setLayoutManager(layoutThis); + + this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12))); + this.setLineWidth(1); + this.setBackgroundColor(THIS_BACK); + createContents(); + } + + /** + * @generated + */ + private void createContents() + { + + WrappingLabel aInterfaceTypeLabelFigure0 = new WrappingLabel(); + aInterfaceTypeLabelFigure0.setText("«Interface»"); + + this.add(aInterfaceTypeLabelFigure0); + + fFigureAInterfaceNameFigure = new WrappingLabel(); + fFigureAInterfaceNameFigure.setText("<...>"); + + this.add(fFigureAInterfaceNameFigure); + + fFigureInterfaceAttributes = new RectangleFigure(); + fFigureInterfaceAttributes.setLineWidth(1); + + this.add(fFigureInterfaceAttributes); + fFigureInterfaceAttributes.setLayoutManager(new StackLayout()); + + fFigureInterfaceOperations = new RectangleFigure(); + fFigureInterfaceOperations.setLineWidth(1); + + this.add(fFigureInterfaceOperations); + fFigureInterfaceOperations.setLayoutManager(new StackLayout()); + + } + + /** + * @generated + */ + private boolean myUseLocalCoordinates = false; + + /** + * @generated + */ + protected boolean useLocalCoordinates() + { + return myUseLocalCoordinates; + } + + /** + * @generated + */ + protected void setUseLocalCoordinates(boolean useLocalCoordinates) + { + myUseLocalCoordinates = useLocalCoordinates; + } + + /** + * @generated + */ + public WrappingLabel getFigureAInterfaceNameFigure() + { + return fFigureAInterfaceNameFigure; + } + + /** + * @generated + */ + public RectangleFigure getFigureInterfaceAttributes() + { + return fFigureInterfaceAttributes; + } + + /** + * @generated + */ + public RectangleFigure getFigureInterfaceOperations() + { + return fFigureInterfaceOperations; + } + + } + + /** + * @generated + */ + static final Color THIS_BACK = new Color(null, 250, 250, 190); + +} diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen index 75aff6fd4d..d646ecbf8c 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen @@ -1,740 +1,740 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<gmfgen:GenEditorGenerator xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" copyrightText="Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
 Martin Fluegge - initial API and implementation
">
- <diagram
- visualID="1000"
- editPartClassName="ACoreRootEditPart"
- itemSemanticEditPolicyClassName="ACoreRootItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ACoreRootCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationProviderPriority="Low">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ACoreRootEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <domainDiagramElement
- href="acore.genmodel#//acore/ACoreRoot"/>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3001"
- editPartClassName="AAttributeEditPart"
- itemSemanticEditPolicyClassName="AAttributeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AAttributeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AAttributeGraphicalNodeEditPolicy"
- createCommandClassName="AAttributeCreateCommand"
- containers="//@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AAttributeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AAttribute"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}:{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3002"
- editPartClassName="AOperationEditPart"
- itemSemanticEditPolicyClassName="AOperationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AOperationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AOperationGraphicalNodeEditPolicy"
- createCommandClassName="AOperationCreateCommand"
- containers="//@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AOperationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AOperation"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}():{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3003"
- editPartClassName="AAttribute2EditPart"
- itemSemanticEditPolicyClassName="AAttribute2ItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AAttribute2CanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AAttribute2GraphicalNodeEditPolicy"
- createCommandClassName="AAttribute2CreateCommand"
- containers="//@diagram/@compartments.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="//@diagram/@childNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AAttribute"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}:{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3004"
- editPartClassName="AOperation2EditPart"
- itemSemanticEditPolicyClassName="AOperation2ItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AOperation2CanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AOperation2GraphicalNodeEditPolicy"
- createCommandClassName="AOperation2CreateCommand"
- containers="//@diagram/@compartments.3">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="//@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AOperation"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}():{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <topLevelNodes
- visualID="2001"
- editPartClassName="AInterfaceEditPart"
- itemSemanticEditPolicyClassName="AInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AInterfaceCanonicalEditPolicy"
- compartments="//@diagram/@compartments.0 //@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="AInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="AInterfaceCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AInterfaceEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- layoutType="TOOLBAR_LAYOUT"
- className="AInterfaceFigure"
- classBody="
/**
 * @generated
 */
public class AInterfaceFigure extends org.eclipse.draw2d.RoundedRectangle {


	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAInterfaceNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceOperations; 


	/**
	 * @generated
	 */
	public AInterfaceFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12)
, getMapMode().DPtoLP(12)
));
this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel aInterfaceTypeLabelFigure0 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
aInterfaceTypeLabelFigure0.setText("«Interface»");

this.add(aInterfaceTypeLabelFigure0);



fFigureAInterfaceNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAInterfaceNameFigure.setText("<...>");

this.add(fFigureAInterfaceNameFigure);



fFigureInterfaceAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceAttributes.setLineWidth(1);

this.add(fFigureInterfaceAttributes);
fFigureInterfaceAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureInterfaceOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceOperations.setLineWidth(1);

this.add(fFigureInterfaceOperations);
fFigureInterfaceOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAInterfaceNameFigure() {
		return fFigureAInterfaceNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceAttributes() {
		return fFigureInterfaceAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceOperations() {
		return fFigureInterfaceOperations;
	}


}

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

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedBackground="true"/>
- </viewmap>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AInterface"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/interfaces"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/interfaces"/>
- </modelFacet>
- <labels
- visualID="5001"
- editPartClassName="AInterfaceNameEditPart"
- itemSemanticEditPolicyClassName="AInterfaceNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureAInterfaceNameFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0">
- <metaFeatures
- href="acore.genmodel#//acore/ABasicClass/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2002"
- editPartClassName="AClassEditPart"
- itemSemanticEditPolicyClassName="AClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AClassCanonicalEditPolicy"
- compartments="//@diagram/@compartments.2 //@diagram/@compartments.3"
- graphicalNodeEditPolicyClassName="AClassGraphicalNodeEditPolicy"
- createCommandClassName="AClassCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AClassEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- layoutType="TOOLBAR_LAYOUT"
- className="AClassFigure"
- classBody="
/**
 * @generated
 */
public class AClassFigure extends org.eclipse.draw2d.RectangleFigure {


	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAClassNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassOperations; 


	/**
	 * @generated
	 */
	public AClassFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


fFigureAClassNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAClassNameFigure.setText("<...>");

this.add(fFigureAClassNameFigure);



fFigureClassAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureClassAttributes.setLineWidth(1);

this.add(fFigureClassAttributes);
fFigureClassAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureClassOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureClassOperations.setLineWidth(1);

this.add(fFigureClassOperations);
fFigureClassOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassAttributes() {
		return fFigureClassAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAClassNameFigure() {
		return fFigureAClassNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassOperations() {
		return fFigureClassOperations;
	}


}

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

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedBackground="true"/>
- </viewmap>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AClass"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/classes"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/classes"/>
- </modelFacet>
- <labels
- visualID="5002"
- editPartClassName="AClassNameEditPart"
- itemSemanticEditPolicyClassName="AClassNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureAClassNameFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0">
- <metaFeatures
- href="acore.genmodel#//acore/ABasicClass/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4001"
- editPartClassName="AClassSubClassesEditPart"
- itemSemanticEditPolicyClassName="AClassSubClassesItemSemanticEditPolicy"
- createCommandClassName="AClassSubClassesCreateCommand"
- reorientCommandClassName="AClassSubClassesReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassSubClassesFigure"
- classBody="
/**
 * @generated
 */
public class AClassSubClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassSubClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/subClasses"/>
- </modelFacet>
- </links>
- <links
- visualID="4002"
- editPartClassName="AClassImplementedInterfacesEditPart"
- itemSemanticEditPolicyClassName="AClassImplementedInterfacesItemSemanticEditPolicy"
- createCommandClassName="AClassImplementedInterfacesCreateCommand"
- reorientCommandClassName="AClassImplementedInterfacesReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassImplementedInterfacesFigure"
- classBody="
/**
 * @generated
 */
public class AClassImplementedInterfacesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassImplementedInterfacesFigure() {
		this.setLineWidth(1);
this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
df.setLineWidth(1);
		return df;
	}




}

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/implementedInterfaces"/>
- </modelFacet>
- </links>
- <links
- visualID="4003"
- editPartClassName="AClassAssociationsEditPart"
- itemSemanticEditPolicyClassName="AClassAssociationsItemSemanticEditPolicy"
- createCommandClassName="AClassAssociationsCreateCommand"
- reorientCommandClassName="AClassAssociationsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/associations"/>
- </modelFacet>
- </links>
- <links
- visualID="4004"
- editPartClassName="AClassAggregationsEditPart"
- itemSemanticEditPolicyClassName="AClassAggregationsItemSemanticEditPolicy"
- createCommandClassName="AClassAggregationsCreateCommand"
- reorientCommandClassName="AClassAggregationsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassAggregationClassesFigure"
- classBody="
/**
 * @generated
 */
public class AClassAggregationClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassAggregationClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/aggregations"/>
- </modelFacet>
- </links>
- <links
- visualID="4005"
- editPartClassName="AClassCompositionsEditPart"
- itemSemanticEditPolicyClassName="AClassCompositionsItemSemanticEditPolicy"
- createCommandClassName="AClassCompositionsCreateCommand"
- reorientCommandClassName="AClassCompositionsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassCompositionClassesFigure"
- classBody="
/**
 * @generated
 */
public class AClassCompositionClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassCompositionClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 0, 0, 0);

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/compositions"/>
- </modelFacet>
- </links>
- <compartments
- visualID="7001"
- editPartClassName="AInterfaceAAttributeInterfaceCompartmentEditPart"
- itemSemanticEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.0"
- title="AAttributeInterfaceCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureInterfaceAttributes"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <compartments
- visualID="7002"
- editPartClassName="AInterfaceAOperationInterfaceCompartmentEditPart"
- itemSemanticEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.1"
- title="AOperationInterfaceCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureInterfaceOperations"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <compartments
- visualID="7003"
- editPartClassName="AClassAAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="AClassAAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AClassAAttributeCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.2"
- title="AAttributeCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureClassAttributes"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <compartments
- visualID="7004"
- editPartClassName="AClassAOperationClassCompartmentEditPart"
- itemSemanticEditPolicyClassName="AClassAOperationClassCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AClassAOperationClassCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.3"
- title="AOperationClassCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureClassOperations"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <palette>
- <groups
- title="Node"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AClass"
- description="Create new AClass"
- genNodes="//@diagram/@topLevelNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AInterface"
- description="Create new AInterface"
- genNodes="//@diagram/@topLevelNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AAttribute"
- description="Create an Attribute"
- genNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AOperation"
- description="Create an Operation"
- genNodes="//@diagram/@childNodes.1 //@diagram/@childNodes.3"/>
- </groups>
- <groups
- title="Connections"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="inherits"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png"
- genLinks="//@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="implements"
- description="Create new AClassImplementedInterfaces"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png"
- genLinks="//@diagram/@links.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="association"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png"
- genLinks="//@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="aggregation"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png"
- genLinks="//@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="composition"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png"
- genLinks="//@diagram/@links.4"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
- name="Acore Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- </preferencePages>
- </diagram>
- <plugin>
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor/>
- <navigator>
- <childReferences
- child="//@diagram"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@childNodes.0"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@childNodes.1"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@topLevelNodes.0"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@childNodes.2"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@childNodes.3"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@topLevelNodes.1"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.0"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.0"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.0"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.1"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.1"
- child="//@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.1"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.2"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.2"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.2"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.3"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.3"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.3"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.4"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.4"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.4"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- </navigator>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="acore.genmodel#/"/>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="//@diagram/@childNodes.0/@labelModelFacet //@diagram/@childNodes.1/@labelModelFacet //@diagram/@topLevelNodes.0/@labels.0/@modelFacet //@diagram/@childNodes.2/@labelModelFacet //@diagram/@childNodes.3/@labelModelFacet //@diagram/@topLevelNodes.1/@labels.0/@modelFacet"/>
- </labelParsers>
- <contextMenus
- context="//@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
- </contextMenus>
-</gmfgen:GenEditorGenerator>
+<?xml version="1.0" encoding="UTF-8"?> +<gmfgen:GenEditorGenerator xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" copyrightText="Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
 Martin Fluegge - initial API and implementation
"> + <diagram + visualID="1000" + editPartClassName="ACoreRootEditPart" + itemSemanticEditPolicyClassName="ACoreRootItemSemanticEditPolicy" + canonicalEditPolicyClassName="ACoreRootCanonicalEditPolicy" + iconProviderPriority="Low" + validationProviderPriority="Low"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="ACoreRootEditHelper"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/> + <domainDiagramElement + href="acore.genmodel#//acore/ACoreRoot"/> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3001" + editPartClassName="AAttributeEditPart" + itemSemanticEditPolicyClassName="AAttributeItemSemanticEditPolicy" + canonicalEditPolicyClassName="AAttributeCanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AAttributeGraphicalNodeEditPolicy" + createCommandClassName="AAttributeCreateCommand" + containers="//@diagram/@compartments.0"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AAttributeEditHelper"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AAttribute"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}:{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3002" + editPartClassName="AOperationEditPart" + itemSemanticEditPolicyClassName="AOperationItemSemanticEditPolicy" + canonicalEditPolicyClassName="AOperationCanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AOperationGraphicalNodeEditPolicy" + createCommandClassName="AOperationCreateCommand" + containers="//@diagram/@compartments.1"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AOperationEditHelper"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AOperation"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}():{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3003" + editPartClassName="AAttribute2EditPart" + itemSemanticEditPolicyClassName="AAttribute2ItemSemanticEditPolicy" + canonicalEditPolicyClassName="AAttribute2CanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AAttribute2GraphicalNodeEditPolicy" + createCommandClassName="AAttribute2CreateCommand" + containers="//@diagram/@compartments.2"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:SpecializationType" + metamodelType="//@diagram/@childNodes.0/@elementType"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AAttribute"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}:{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3004" + editPartClassName="AOperation2EditPart" + itemSemanticEditPolicyClassName="AOperation2ItemSemanticEditPolicy" + canonicalEditPolicyClassName="AOperation2CanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AOperation2GraphicalNodeEditPolicy" + createCommandClassName="AOperation2CreateCommand" + containers="//@diagram/@compartments.3"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:SpecializationType" + metamodelType="//@diagram/@childNodes.1/@elementType"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AOperation"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}():{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <topLevelNodes + visualID="2001" + editPartClassName="AInterfaceEditPart" + itemSemanticEditPolicyClassName="AInterfaceItemSemanticEditPolicy" + canonicalEditPolicyClassName="AInterfaceCanonicalEditPolicy" + compartments="//@diagram/@compartments.0 //@diagram/@compartments.1" + graphicalNodeEditPolicyClassName="AInterfaceGraphicalNodeEditPolicy" + createCommandClassName="AInterfaceCreateCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AInterfaceEditHelper"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + layoutType="TOOLBAR_LAYOUT" + className="AInterfaceFigure" + classBody="
/**
 * @generated
 */
public class AInterfaceFigure extends org.eclipse.draw2d.RoundedRectangle {


	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAInterfaceNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceOperations; 


	/**
	 * @generated
	 */
	public AInterfaceFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12)
, getMapMode().DPtoLP(12)
));
this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel aInterfaceTypeLabelFigure0 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
aInterfaceTypeLabelFigure0.setText("«Interface»");

this.add(aInterfaceTypeLabelFigure0);



fFigureAInterfaceNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAInterfaceNameFigure.setText("<...>");

this.add(fFigureAInterfaceNameFigure);



fFigureInterfaceAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceAttributes.setLineWidth(1);

this.add(fFigureInterfaceAttributes);
fFigureInterfaceAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureInterfaceOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceOperations.setLineWidth(1);

this.add(fFigureInterfaceOperations);
fFigureInterfaceOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAInterfaceNameFigure() {
		return fFigureAInterfaceNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceAttributes() {
		return fFigureInterfaceAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceOperations() {
		return fFigureInterfaceOperations;
	}


}

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

"> + <attributes + xsi:type="gmfgen:StyleAttributes" + fixedBackground="true"/> + </viewmap> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AInterface"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ACoreRoot/interfaces"/> + <childMetaFeature + href="acore.genmodel#//acore/ACoreRoot/interfaces"/> + </modelFacet> + <labels + visualID="5001" + editPartClassName="AInterfaceNameEditPart" + itemSemanticEditPolicyClassName="AInterfaceNameItemSemanticEditPolicy" + elementIcon="true"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureAInterfaceNameFigure" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0"> + <metaFeatures + href="acore.genmodel#//acore/ABasicClass/name"/> + </modelFacet> + </labels> + </topLevelNodes> + <topLevelNodes + visualID="2002" + editPartClassName="AClassEditPart" + itemSemanticEditPolicyClassName="AClassItemSemanticEditPolicy" + canonicalEditPolicyClassName="AClassCanonicalEditPolicy" + compartments="//@diagram/@compartments.2 //@diagram/@compartments.3" + graphicalNodeEditPolicyClassName="AClassGraphicalNodeEditPolicy" + createCommandClassName="AClassCreateCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AClassEditHelper"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + layoutType="TOOLBAR_LAYOUT" + className="AClassFigure" + classBody="
/**
 * @generated
 */
public class AClassFigure extends org.eclipse.draw2d.RectangleFigure {


	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAClassNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassOperations; 


	/**
	 * @generated
	 */
	public AClassFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


fFigureAClassNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAClassNameFigure.setText("<...>");

this.add(fFigureAClassNameFigure);



fFigureClassAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureClassAttributes.setLineWidth(1);

this.add(fFigureClassAttributes);
fFigureClassAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureClassOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureClassOperations.setLineWidth(1);

this.add(fFigureClassOperations);
fFigureClassOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassAttributes() {
		return fFigureClassAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAClassNameFigure() {
		return fFigureAClassNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassOperations() {
		return fFigureClassOperations;
	}


}

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

"> + <attributes + xsi:type="gmfgen:StyleAttributes" + fixedBackground="true"/> + </viewmap> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AClass"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ACoreRoot/classes"/> + <childMetaFeature + href="acore.genmodel#//acore/ACoreRoot/classes"/> + </modelFacet> + <labels + visualID="5002" + editPartClassName="AClassNameEditPart" + itemSemanticEditPolicyClassName="AClassNameItemSemanticEditPolicy" + elementIcon="true"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureAClassNameFigure" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0"> + <metaFeatures + href="acore.genmodel#//acore/ABasicClass/name"/> + </modelFacet> + </labels> + </topLevelNodes> + <links + visualID="4001" + editPartClassName="AClassSubClassesEditPart" + itemSemanticEditPolicyClassName="AClassSubClassesItemSemanticEditPolicy" + createCommandClassName="AClassSubClassesCreateCommand" + reorientCommandClassName="AClassSubClassesReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassSubClassesFigure" + classBody="
/**
 * @generated
 */
public class AClassSubClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassSubClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/subClasses"/> + </modelFacet> + </links> + <links + visualID="4002" + editPartClassName="AClassImplementedInterfacesEditPart" + itemSemanticEditPolicyClassName="AClassImplementedInterfacesItemSemanticEditPolicy" + createCommandClassName="AClassImplementedInterfacesCreateCommand" + reorientCommandClassName="AClassImplementedInterfacesReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassImplementedInterfacesFigure" + classBody="
/**
 * @generated
 */
public class AClassImplementedInterfacesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassImplementedInterfacesFigure() {
		this.setLineWidth(1);
this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
df.setLineWidth(1);
		return df;
	}




}

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/implementedInterfaces"/> + </modelFacet> + </links> + <links + visualID="4003" + editPartClassName="AClassAssociationsEditPart" + itemSemanticEditPolicyClassName="AClassAssociationsItemSemanticEditPolicy" + createCommandClassName="AClassAssociationsCreateCommand" + reorientCommandClassName="AClassAssociationsReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/associations"/> + </modelFacet> + </links> + <links + visualID="4004" + editPartClassName="AClassAggregationsEditPart" + itemSemanticEditPolicyClassName="AClassAggregationsItemSemanticEditPolicy" + createCommandClassName="AClassAggregationsCreateCommand" + reorientCommandClassName="AClassAggregationsReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassAggregationClassesFigure" + classBody="
/**
 * @generated
 */
public class AClassAggregationClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassAggregationClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/aggregations"/> + </modelFacet> + </links> + <links + visualID="4005" + editPartClassName="AClassCompositionsEditPart" + itemSemanticEditPolicyClassName="AClassCompositionsItemSemanticEditPolicy" + createCommandClassName="AClassCompositionsCreateCommand" + reorientCommandClassName="AClassCompositionsReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassCompositionClassesFigure" + classBody="
/**
 * @generated
 */
public class AClassCompositionClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassCompositionClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 0, 0, 0);

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/compositions"/> + </modelFacet> + </links> + <compartments + visualID="7001" + editPartClassName="AInterfaceAAttributeInterfaceCompartmentEditPart" + itemSemanticEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.0" + title="AAttributeInterfaceCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.0"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureInterfaceAttributes" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <compartments + visualID="7002" + editPartClassName="AInterfaceAOperationInterfaceCompartmentEditPart" + itemSemanticEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.1" + title="AOperationInterfaceCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.0"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureInterfaceOperations" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <compartments + visualID="7003" + editPartClassName="AClassAAttributeCompartmentEditPart" + itemSemanticEditPolicyClassName="AClassAAttributeCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AClassAAttributeCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.2" + title="AAttributeCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.1"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureClassAttributes" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <compartments + visualID="7004" + editPartClassName="AClassAOperationClassCompartmentEditPart" + itemSemanticEditPolicyClassName="AClassAOperationClassCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AClassAOperationClassCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.3" + title="AOperationClassCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.1"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureClassOperations" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <palette> + <groups + title="Node" + collapse="true"> + <entries + xsi:type="gmfgen:ToolEntry" + title="AClass" + description="Create new AClass" + genNodes="//@diagram/@topLevelNodes.1"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="AInterface" + description="Create new AInterface" + genNodes="//@diagram/@topLevelNodes.0"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="AAttribute" + description="Create an Attribute" + genNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.2"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="AOperation" + description="Create an Operation" + genNodes="//@diagram/@childNodes.1 //@diagram/@childNodes.3"/> + </groups> + <groups + title="Connections" + collapse="true"> + <entries + xsi:type="gmfgen:ToolEntry" + title="inherits" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png" + genLinks="//@diagram/@links.0"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="implements" + description="Create new AClassImplementedInterfaces" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png" + genLinks="//@diagram/@links.1"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="association" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png" + genLinks="//@diagram/@links.2"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="aggregation" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png" + genLinks="//@diagram/@links.3"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="composition" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png" + genLinks="//@diagram/@links.4"/> + </groups> + </palette> + <preferencePages + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general" + name="Acore Diagram"> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance" + name="Appearance" + kind="Appearance"/> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections" + name="Connections" + kind="Connections"/> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing" + name="Printing" + kind="Printing"/> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid" + name="Rulers And Grid" + kind="RulersAndGrid"/> + </preferencePages> + </diagram> + <plugin> + <requiredPlugins>org.eclipse.draw2d</requiredPlugins> + <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins> + </plugin> + <editor/> + <navigator> + <childReferences + child="//@diagram"/> + <childReferences + parent="//@diagram/@topLevelNodes.0" + child="//@diagram/@childNodes.0"/> + <childReferences + parent="//@diagram/@topLevelNodes.0" + child="//@diagram/@childNodes.1"/> + <childReferences + parent="//@diagram" + child="//@diagram/@topLevelNodes.0"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@childNodes.2"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@childNodes.3"/> + <childReferences + parent="//@diagram" + child="//@diagram/@topLevelNodes.1"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.0" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.0" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.0" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.0" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.0" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.1" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.1" + child="//@diagram/@topLevelNodes.0" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.0" + child="//@diagram/@links.1" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.1" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.1" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.2" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.2" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.2" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.2" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.2" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.3" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.3" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.3" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.3" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.3" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.4" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.4" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.4" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.4" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.4" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + </navigator> + <diagramUpdater/> + <propertySheet> + <tabs + xsi:type="gmfgen:GenStandardPropertyTab" + iD="appearance"/> + <tabs + xsi:type="gmfgen:GenStandardPropertyTab" + iD="diagram"/> + <tabs + xsi:type="gmfgen:GenCustomPropertyTab" + iD="domain" + label="Core"> + <filter + xsi:type="gmfgen:TypeTabFilter"> + <types>org.eclipse.gmf.runtime.notation.View</types> + <types>org.eclipse.gef.EditPart</types> + <generatedTypes>abstractNavigatorItem</generatedTypes> + </filter> + </tabs> + </propertySheet> + <domainGenModel + href="acore.genmodel#/"/> + <labelParsers + extensibleViaService="true"> + <implementations + xsi:type="gmfgen:PredefinedParser" + uses="//@diagram/@childNodes.0/@labelModelFacet //@diagram/@childNodes.1/@labelModelFacet //@diagram/@topLevelNodes.0/@labels.0/@modelFacet //@diagram/@childNodes.2/@labelModelFacet //@diagram/@childNodes.3/@labelModelFacet //@diagram/@topLevelNodes.1/@labels.0/@modelFacet"/> + </labelParsers> + <contextMenus + context="//@diagram"> + <items + xsi:type="gmfgen:LoadResourceAction"/> + </contextMenus> +</gmfgen:GenEditorGenerator> diff --git a/plugins/org.eclipse.emf.cdo.dawn.tests/testdata/model/acore.gmfgen b/plugins/org.eclipse.emf.cdo.dawn.tests/testdata/model/acore.gmfgen index 75aff6fd4d..d646ecbf8c 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.tests/testdata/model/acore.gmfgen +++ b/plugins/org.eclipse.emf.cdo.dawn.tests/testdata/model/acore.gmfgen @@ -1,740 +1,740 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<gmfgen:GenEditorGenerator xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" copyrightText="Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
 Martin Fluegge - initial API and implementation
">
- <diagram
- visualID="1000"
- editPartClassName="ACoreRootEditPart"
- itemSemanticEditPolicyClassName="ACoreRootItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ACoreRootCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationProviderPriority="Low">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ACoreRootEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <domainDiagramElement
- href="acore.genmodel#//acore/ACoreRoot"/>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3001"
- editPartClassName="AAttributeEditPart"
- itemSemanticEditPolicyClassName="AAttributeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AAttributeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AAttributeGraphicalNodeEditPolicy"
- createCommandClassName="AAttributeCreateCommand"
- containers="//@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AAttributeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AAttribute"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}:{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3002"
- editPartClassName="AOperationEditPart"
- itemSemanticEditPolicyClassName="AOperationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AOperationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AOperationGraphicalNodeEditPolicy"
- createCommandClassName="AOperationCreateCommand"
- containers="//@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AOperationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AOperation"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}():{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3003"
- editPartClassName="AAttribute2EditPart"
- itemSemanticEditPolicyClassName="AAttribute2ItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AAttribute2CanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AAttribute2GraphicalNodeEditPolicy"
- createCommandClassName="AAttribute2CreateCommand"
- containers="//@diagram/@compartments.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="//@diagram/@childNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AAttribute"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/attributes"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}:{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3004"
- editPartClassName="AOperation2EditPart"
- itemSemanticEditPolicyClassName="AOperation2ItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AOperation2CanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AOperation2GraphicalNodeEditPolicy"
- createCommandClassName="AOperation2CreateCommand"
- containers="//@diagram/@compartments.3">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="//@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AOperation"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ABasicClass/operations"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0"
- viewPattern="{0} {2}():{1}"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/accessright"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/dataType"/>
- <metaFeatures
- href="acore.genmodel#//acore/AClassChild/name"/>
- </labelModelFacet>
- </childNodes>
- <topLevelNodes
- visualID="2001"
- editPartClassName="AInterfaceEditPart"
- itemSemanticEditPolicyClassName="AInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AInterfaceCanonicalEditPolicy"
- compartments="//@diagram/@compartments.0 //@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="AInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="AInterfaceCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AInterfaceEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- layoutType="TOOLBAR_LAYOUT"
- className="AInterfaceFigure"
- classBody="
/**
 * @generated
 */
public class AInterfaceFigure extends org.eclipse.draw2d.RoundedRectangle {


	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAInterfaceNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceOperations; 


	/**
	 * @generated
	 */
	public AInterfaceFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12)
, getMapMode().DPtoLP(12)
));
this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel aInterfaceTypeLabelFigure0 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
aInterfaceTypeLabelFigure0.setText("«Interface»");

this.add(aInterfaceTypeLabelFigure0);



fFigureAInterfaceNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAInterfaceNameFigure.setText("<...>");

this.add(fFigureAInterfaceNameFigure);



fFigureInterfaceAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceAttributes.setLineWidth(1);

this.add(fFigureInterfaceAttributes);
fFigureInterfaceAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureInterfaceOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceOperations.setLineWidth(1);

this.add(fFigureInterfaceOperations);
fFigureInterfaceOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAInterfaceNameFigure() {
		return fFigureAInterfaceNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceAttributes() {
		return fFigureInterfaceAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceOperations() {
		return fFigureInterfaceOperations;
	}


}

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

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedBackground="true"/>
- </viewmap>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AInterface"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/interfaces"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/interfaces"/>
- </modelFacet>
- <labels
- visualID="5001"
- editPartClassName="AInterfaceNameEditPart"
- itemSemanticEditPolicyClassName="AInterfaceNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureAInterfaceNameFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0">
- <metaFeatures
- href="acore.genmodel#//acore/ABasicClass/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2002"
- editPartClassName="AClassEditPart"
- itemSemanticEditPolicyClassName="AClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AClassCanonicalEditPolicy"
- compartments="//@diagram/@compartments.2 //@diagram/@compartments.3"
- graphicalNodeEditPolicyClassName="AClassGraphicalNodeEditPolicy"
- createCommandClassName="AClassCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AClassEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- layoutType="TOOLBAR_LAYOUT"
- className="AClassFigure"
- classBody="
/**
 * @generated
 */
public class AClassFigure extends org.eclipse.draw2d.RectangleFigure {


	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAClassNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassOperations; 


	/**
	 * @generated
	 */
	public AClassFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


fFigureAClassNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAClassNameFigure.setText("<...>");

this.add(fFigureAClassNameFigure);



fFigureClassAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureClassAttributes.setLineWidth(1);

this.add(fFigureClassAttributes);
fFigureClassAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureClassOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureClassOperations.setLineWidth(1);

this.add(fFigureClassOperations);
fFigureClassOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassAttributes() {
		return fFigureClassAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAClassNameFigure() {
		return fFigureAClassNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassOperations() {
		return fFigureClassOperations;
	}


}

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

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedBackground="true"/>
- </viewmap>
- <modelFacet>
- <metaClass
- href="acore.genmodel#//acore/AClass"/>
- <containmentMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/classes"/>
- <childMetaFeature
- href="acore.genmodel#//acore/ACoreRoot/classes"/>
- </modelFacet>
- <labels
- visualID="5002"
- editPartClassName="AClassNameEditPart"
- itemSemanticEditPolicyClassName="AClassNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureAClassNameFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="//@labelParsers/@implementations.0">
- <metaFeatures
- href="acore.genmodel#//acore/ABasicClass/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4001"
- editPartClassName="AClassSubClassesEditPart"
- itemSemanticEditPolicyClassName="AClassSubClassesItemSemanticEditPolicy"
- createCommandClassName="AClassSubClassesCreateCommand"
- reorientCommandClassName="AClassSubClassesReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassSubClassesFigure"
- classBody="
/**
 * @generated
 */
public class AClassSubClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassSubClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/subClasses"/>
- </modelFacet>
- </links>
- <links
- visualID="4002"
- editPartClassName="AClassImplementedInterfacesEditPart"
- itemSemanticEditPolicyClassName="AClassImplementedInterfacesItemSemanticEditPolicy"
- createCommandClassName="AClassImplementedInterfacesCreateCommand"
- reorientCommandClassName="AClassImplementedInterfacesReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassImplementedInterfacesFigure"
- classBody="
/**
 * @generated
 */
public class AClassImplementedInterfacesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassImplementedInterfacesFigure() {
		this.setLineWidth(1);
this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
df.setLineWidth(1);
		return df;
	}




}

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/implementedInterfaces"/>
- </modelFacet>
- </links>
- <links
- visualID="4003"
- editPartClassName="AClassAssociationsEditPart"
- itemSemanticEditPolicyClassName="AClassAssociationsItemSemanticEditPolicy"
- createCommandClassName="AClassAssociationsCreateCommand"
- reorientCommandClassName="AClassAssociationsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/associations"/>
- </modelFacet>
- </links>
- <links
- visualID="4004"
- editPartClassName="AClassAggregationsEditPart"
- itemSemanticEditPolicyClassName="AClassAggregationsItemSemanticEditPolicy"
- createCommandClassName="AClassAggregationsCreateCommand"
- reorientCommandClassName="AClassAggregationsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassAggregationClassesFigure"
- classBody="
/**
 * @generated
 */
public class AClassAggregationClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassAggregationClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/aggregations"/>
- </modelFacet>
- </links>
- <links
- visualID="4005"
- editPartClassName="AClassCompositionsEditPart"
- itemSemanticEditPolicyClassName="AClassCompositionsItemSemanticEditPolicy"
- createCommandClassName="AClassCompositionsCreateCommand"
- reorientCommandClassName="AClassCompositionsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AClassCompositionClassesFigure"
- classBody="
/**
 * @generated
 */
public class AClassCompositionClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassCompositionClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 0, 0, 0);

"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="acore.genmodel#//acore/AClass/compositions"/>
- </modelFacet>
- </links>
- <compartments
- visualID="7001"
- editPartClassName="AInterfaceAAttributeInterfaceCompartmentEditPart"
- itemSemanticEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.0"
- title="AAttributeInterfaceCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureInterfaceAttributes"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <compartments
- visualID="7002"
- editPartClassName="AInterfaceAOperationInterfaceCompartmentEditPart"
- itemSemanticEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.1"
- title="AOperationInterfaceCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureInterfaceOperations"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <compartments
- visualID="7003"
- editPartClassName="AClassAAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="AClassAAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AClassAAttributeCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.2"
- title="AAttributeCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureClassAttributes"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <compartments
- visualID="7004"
- editPartClassName="AClassAOperationClassCompartmentEditPart"
- itemSemanticEditPolicyClassName="AClassAOperationClassCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AClassAOperationClassCompartmentCanonicalEditPolicy"
- childNodes="//@diagram/@childNodes.3"
- title="AOperationClassCompartment"
- canCollapse="false"
- needsTitle="false"
- node="//@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureClassOperations"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <palette>
- <groups
- title="Node"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AClass"
- description="Create new AClass"
- genNodes="//@diagram/@topLevelNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AInterface"
- description="Create new AInterface"
- genNodes="//@diagram/@topLevelNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AAttribute"
- description="Create an Attribute"
- genNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AOperation"
- description="Create an Operation"
- genNodes="//@diagram/@childNodes.1 //@diagram/@childNodes.3"/>
- </groups>
- <groups
- title="Connections"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="inherits"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png"
- genLinks="//@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="implements"
- description="Create new AClassImplementedInterfaces"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png"
- genLinks="//@diagram/@links.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="association"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png"
- genLinks="//@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="aggregation"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png"
- genLinks="//@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="composition"
- description="Create new AClassSubClasses"
- largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png"
- smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png"
- genLinks="//@diagram/@links.4"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
- name="Acore Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- </preferencePages>
- </diagram>
- <plugin>
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor/>
- <navigator>
- <childReferences
- child="//@diagram"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@childNodes.0"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@childNodes.1"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@topLevelNodes.0"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@childNodes.2"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@childNodes.3"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@topLevelNodes.1"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.0"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.0"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.0"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.1"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.1"
- child="//@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.1"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.2"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.2"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.2"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.3"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.3"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.3"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.4"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.4"
- child="//@diagram/@topLevelNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.4"
- child="//@diagram/@topLevelNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.1"
- child="//@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- </navigator>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="acore.genmodel#/"/>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="//@diagram/@childNodes.0/@labelModelFacet //@diagram/@childNodes.1/@labelModelFacet //@diagram/@topLevelNodes.0/@labels.0/@modelFacet //@diagram/@childNodes.2/@labelModelFacet //@diagram/@childNodes.3/@labelModelFacet //@diagram/@topLevelNodes.1/@labels.0/@modelFacet"/>
- </labelParsers>
- <contextMenus
- context="//@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
- </contextMenus>
-</gmfgen:GenEditorGenerator>
+<?xml version="1.0" encoding="UTF-8"?> +<gmfgen:GenEditorGenerator xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" copyrightText="Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
 Martin Fluegge - initial API and implementation
"> + <diagram + visualID="1000" + editPartClassName="ACoreRootEditPart" + itemSemanticEditPolicyClassName="ACoreRootItemSemanticEditPolicy" + canonicalEditPolicyClassName="ACoreRootCanonicalEditPolicy" + iconProviderPriority="Low" + validationProviderPriority="Low"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="ACoreRootEditHelper"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/> + <domainDiagramElement + href="acore.genmodel#//acore/ACoreRoot"/> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3001" + editPartClassName="AAttributeEditPart" + itemSemanticEditPolicyClassName="AAttributeItemSemanticEditPolicy" + canonicalEditPolicyClassName="AAttributeCanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AAttributeGraphicalNodeEditPolicy" + createCommandClassName="AAttributeCreateCommand" + containers="//@diagram/@compartments.0"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AAttributeEditHelper"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AAttribute"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}:{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3002" + editPartClassName="AOperationEditPart" + itemSemanticEditPolicyClassName="AOperationItemSemanticEditPolicy" + canonicalEditPolicyClassName="AOperationCanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AOperationGraphicalNodeEditPolicy" + createCommandClassName="AOperationCreateCommand" + containers="//@diagram/@compartments.1"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AOperationEditHelper"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AOperation"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}():{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3003" + editPartClassName="AAttribute2EditPart" + itemSemanticEditPolicyClassName="AAttribute2ItemSemanticEditPolicy" + canonicalEditPolicyClassName="AAttribute2CanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AAttribute2GraphicalNodeEditPolicy" + createCommandClassName="AAttribute2CreateCommand" + containers="//@diagram/@compartments.2"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:SpecializationType" + metamodelType="//@diagram/@childNodes.0/@elementType"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AAttribute"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/attributes"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}:{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <childNodes + xsi:type="gmfgen:GenChildLabelNode" + visualID="3004" + editPartClassName="AOperation2EditPart" + itemSemanticEditPolicyClassName="AOperation2ItemSemanticEditPolicy" + canonicalEditPolicyClassName="AOperation2CanonicalEditPolicy" + graphicalNodeEditPolicyClassName="AOperation2GraphicalNodeEditPolicy" + createCommandClassName="AOperation2CreateCommand" + containers="//@diagram/@compartments.3"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:SpecializationType" + metamodelType="//@diagram/@childNodes.1/@elementType"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AOperation"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + <childMetaFeature + href="acore.genmodel#//acore/ABasicClass/operations"/> + </modelFacet> + <labelModelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0" + viewPattern="{0} {2}():{1}" + editorPattern="" + editPattern=""> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/accessright"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/dataType"/> + <metaFeatures + href="acore.genmodel#//acore/AClassChild/name"/> + </labelModelFacet> + </childNodes> + <topLevelNodes + visualID="2001" + editPartClassName="AInterfaceEditPart" + itemSemanticEditPolicyClassName="AInterfaceItemSemanticEditPolicy" + canonicalEditPolicyClassName="AInterfaceCanonicalEditPolicy" + compartments="//@diagram/@compartments.0 //@diagram/@compartments.1" + graphicalNodeEditPolicyClassName="AInterfaceGraphicalNodeEditPolicy" + createCommandClassName="AInterfaceCreateCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AInterfaceEditHelper"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + layoutType="TOOLBAR_LAYOUT" + className="AInterfaceFigure" + classBody="
/**
 * @generated
 */
public class AInterfaceFigure extends org.eclipse.draw2d.RoundedRectangle {


	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAInterfaceNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureInterfaceOperations; 


	/**
	 * @generated
	 */
	public AInterfaceFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12)
, getMapMode().DPtoLP(12)
));
this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel aInterfaceTypeLabelFigure0 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
aInterfaceTypeLabelFigure0.setText("«Interface»");

this.add(aInterfaceTypeLabelFigure0);



fFigureAInterfaceNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAInterfaceNameFigure.setText("<...>");

this.add(fFigureAInterfaceNameFigure);



fFigureInterfaceAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceAttributes.setLineWidth(1);

this.add(fFigureInterfaceAttributes);
fFigureInterfaceAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureInterfaceOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureInterfaceOperations.setLineWidth(1);

this.add(fFigureInterfaceOperations);
fFigureInterfaceOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAInterfaceNameFigure() {
		return fFigureAInterfaceNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceAttributes() {
		return fFigureInterfaceAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureInterfaceOperations() {
		return fFigureInterfaceOperations;
	}


}

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

"> + <attributes + xsi:type="gmfgen:StyleAttributes" + fixedBackground="true"/> + </viewmap> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AInterface"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ACoreRoot/interfaces"/> + <childMetaFeature + href="acore.genmodel#//acore/ACoreRoot/interfaces"/> + </modelFacet> + <labels + visualID="5001" + editPartClassName="AInterfaceNameEditPart" + itemSemanticEditPolicyClassName="AInterfaceNameItemSemanticEditPolicy" + elementIcon="true"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureAInterfaceNameFigure" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0"> + <metaFeatures + href="acore.genmodel#//acore/ABasicClass/name"/> + </modelFacet> + </labels> + </topLevelNodes> + <topLevelNodes + visualID="2002" + editPartClassName="AClassEditPart" + itemSemanticEditPolicyClassName="AClassItemSemanticEditPolicy" + canonicalEditPolicyClassName="AClassCanonicalEditPolicy" + compartments="//@diagram/@compartments.2 //@diagram/@compartments.3" + graphicalNodeEditPolicyClassName="AClassGraphicalNodeEditPolicy" + createCommandClassName="AClassCreateCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <elementType + xsi:type="gmfgen:MetamodelType" + editHelperClassName="AClassEditHelper"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + layoutType="TOOLBAR_LAYOUT" + className="AClassFigure" + classBody="
/**
 * @generated
 */
public class AClassFigure extends org.eclipse.draw2d.RectangleFigure {


	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassAttributes; 
	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAClassNameFigure; 
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RectangleFigure fFigureClassOperations; 


	/**
	 * @generated
	 */
	public AClassFigure() {
		
	org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();
	layoutThis.setStretchMinorAxis(true);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER
);

	layoutThis.setSpacing(0);
	layoutThis.setVertical(true);

	this.setLayoutManager(layoutThis);

		this.setLineWidth(1);
	this.setBackgroundColor(THIS_BACK
);
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


fFigureAClassNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureAClassNameFigure.setText("<...>");

this.add(fFigureAClassNameFigure);



fFigureClassAttributes = new org.eclipse.draw2d.RectangleFigure();
fFigureClassAttributes.setLineWidth(1);

this.add(fFigureClassAttributes);
fFigureClassAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());



fFigureClassOperations = new org.eclipse.draw2d.RectangleFigure();
fFigureClassOperations.setLineWidth(1);

this.add(fFigureClassOperations);
fFigureClassOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());


	}




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

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

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



	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassAttributes() {
		return fFigureClassAttributes;
	}
	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAClassNameFigure() {
		return fFigureAClassNameFigure;
	}
	/**
	 * @generated
	 */
	public org.eclipse.draw2d.RectangleFigure getFigureClassOperations() {
		return fFigureClassOperations;
	}


}

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

"> + <attributes + xsi:type="gmfgen:StyleAttributes" + fixedBackground="true"/> + </viewmap> + <modelFacet> + <metaClass + href="acore.genmodel#//acore/AClass"/> + <containmentMetaFeature + href="acore.genmodel#//acore/ACoreRoot/classes"/> + <childMetaFeature + href="acore.genmodel#//acore/ACoreRoot/classes"/> + </modelFacet> + <labels + visualID="5002" + editPartClassName="AClassNameEditPart" + itemSemanticEditPolicyClassName="AClassNameItemSemanticEditPolicy" + elementIcon="true"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureAClassNameFigure" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/> + <modelFacet + xsi:type="gmfgen:FeatureLabelModelFacet" + parser="//@labelParsers/@implementations.0"> + <metaFeatures + href="acore.genmodel#//acore/ABasicClass/name"/> + </modelFacet> + </labels> + </topLevelNodes> + <links + visualID="4001" + editPartClassName="AClassSubClassesEditPart" + itemSemanticEditPolicyClassName="AClassSubClassesItemSemanticEditPolicy" + createCommandClassName="AClassSubClassesCreateCommand" + reorientCommandClassName="AClassSubClassesReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassSubClassesFigure" + classBody="
/**
 * @generated
 */
public class AClassSubClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassSubClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/subClasses"/> + </modelFacet> + </links> + <links + visualID="4002" + editPartClassName="AClassImplementedInterfacesEditPart" + itemSemanticEditPolicyClassName="AClassImplementedInterfacesItemSemanticEditPolicy" + createCommandClassName="AClassImplementedInterfacesCreateCommand" + reorientCommandClassName="AClassImplementedInterfacesReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassImplementedInterfacesFigure" + classBody="
/**
 * @generated
 */
public class AClassImplementedInterfacesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassImplementedInterfacesFigure() {
		this.setLineWidth(1);
this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
df.setLineWidth(1);
		return df;
	}




}

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/implementedInterfaces"/> + </modelFacet> + </links> + <links + visualID="4003" + editPartClassName="AClassAssociationsEditPart" + itemSemanticEditPolicyClassName="AClassAssociationsItemSemanticEditPolicy" + createCommandClassName="AClassAssociationsCreateCommand" + reorientCommandClassName="AClassAssociationsReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:FigureViewmap" + figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/associations"/> + </modelFacet> + </links> + <links + visualID="4004" + editPartClassName="AClassAggregationsEditPart" + itemSemanticEditPolicyClassName="AClassAggregationsItemSemanticEditPolicy" + createCommandClassName="AClassAggregationsCreateCommand" + reorientCommandClassName="AClassAggregationsReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassAggregationClassesFigure" + classBody="
/**
 * @generated
 */
public class AClassAggregationClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassAggregationClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/aggregations"/> + </modelFacet> + </links> + <links + visualID="4005" + editPartClassName="AClassCompositionsEditPart" + itemSemanticEditPolicyClassName="AClassCompositionsItemSemanticEditPolicy" + createCommandClassName="AClassCompositionsCreateCommand" + reorientCommandClassName="AClassCompositionsReorientCommand"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/> + <elementType + xsi:type="gmfgen:SpecializationType"/> + <viewmap + xsi:type="gmfgen:InnerClassViewmap" + className="AClassCompositionClassesFigure" + classBody="
/**
 * @generated
 */
public class AClassCompositionClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public AClassCompositionClassesFigure() {
		this.setLineWidth(1);

		setTargetDecoration(createTargetDecoration());
	}

	/**
	 * @generated
	 */
	private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {
		org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();
df.setFill(true);
df.setLineWidth(1);
	df.setBackgroundColor(DF_BACK
);
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
pl.addPoint(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(-2)
);
pl.addPoint(getMapMode().DPtoLP(-4)
, getMapMode().DPtoLP(0)
);
pl.addPoint(getMapMode().DPtoLP(-2)
, getMapMode().DPtoLP(2)
);
df.setTemplate(pl);
df.setScale(getMapMode().DPtoLP(7)
, getMapMode().DPtoLP(3)
);
		return df;
	}




}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 0, 0, 0);

"/> + <modelFacet + xsi:type="gmfgen:FeatureLinkModelFacet"> + <metaFeature + href="acore.genmodel#//acore/AClass/compositions"/> + </modelFacet> + </links> + <compartments + visualID="7001" + editPartClassName="AInterfaceAAttributeInterfaceCompartmentEditPart" + itemSemanticEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.0" + title="AAttributeInterfaceCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.0"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureInterfaceAttributes" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <compartments + visualID="7002" + editPartClassName="AInterfaceAOperationInterfaceCompartmentEditPart" + itemSemanticEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.1" + title="AOperationInterfaceCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.0"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureInterfaceOperations" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <compartments + visualID="7003" + editPartClassName="AClassAAttributeCompartmentEditPart" + itemSemanticEditPolicyClassName="AClassAAttributeCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AClassAAttributeCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.2" + title="AAttributeCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.1"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureClassAttributes" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <compartments + visualID="7004" + editPartClassName="AClassAOperationClassCompartmentEditPart" + itemSemanticEditPolicyClassName="AClassAOperationClassCompartmentItemSemanticEditPolicy" + canonicalEditPolicyClassName="AClassAOperationClassCompartmentCanonicalEditPolicy" + childNodes="//@diagram/@childNodes.3" + title="AOperationClassCompartment" + canCollapse="false" + needsTitle="false" + node="//@diagram/@topLevelNodes.1"> + <diagramRunTimeClass + href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/> + <viewmap + xsi:type="gmfgen:ParentAssignedViewmap" + getterName="getFigureClassOperations" + figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/> + </compartments> + <palette> + <groups + title="Node" + collapse="true"> + <entries + xsi:type="gmfgen:ToolEntry" + title="AClass" + description="Create new AClass" + genNodes="//@diagram/@topLevelNodes.1"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="AInterface" + description="Create new AInterface" + genNodes="//@diagram/@topLevelNodes.0"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="AAttribute" + description="Create an Attribute" + genNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.2"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="AOperation" + description="Create an Operation" + genNodes="//@diagram/@childNodes.1 //@diagram/@childNodes.3"/> + </groups> + <groups + title="Connections" + collapse="true"> + <entries + xsi:type="gmfgen:ToolEntry" + title="inherits" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png" + genLinks="//@diagram/@links.0"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="implements" + description="Create new AClassImplementedInterfaces" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png" + genLinks="//@diagram/@links.1"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="association" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png" + genLinks="//@diagram/@links.2"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="aggregation" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png" + genLinks="//@diagram/@links.3"/> + <entries + xsi:type="gmfgen:ToolEntry" + title="composition" + description="Create new AClassSubClasses" + largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png" + smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png" + genLinks="//@diagram/@links.4"/> + </groups> + </palette> + <preferencePages + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general" + name="Acore Diagram"> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance" + name="Appearance" + kind="Appearance"/> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections" + name="Connections" + kind="Connections"/> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing" + name="Printing" + kind="Printing"/> + <children + xsi:type="gmfgen:GenStandardPreferencePage" + iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid" + name="Rulers And Grid" + kind="RulersAndGrid"/> + </preferencePages> + </diagram> + <plugin> + <requiredPlugins>org.eclipse.draw2d</requiredPlugins> + <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins> + </plugin> + <editor/> + <navigator> + <childReferences + child="//@diagram"/> + <childReferences + parent="//@diagram/@topLevelNodes.0" + child="//@diagram/@childNodes.0"/> + <childReferences + parent="//@diagram/@topLevelNodes.0" + child="//@diagram/@childNodes.1"/> + <childReferences + parent="//@diagram" + child="//@diagram/@topLevelNodes.0"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@childNodes.2"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@childNodes.3"/> + <childReferences + parent="//@diagram" + child="//@diagram/@topLevelNodes.1"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.0" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.0" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.0" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.0" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.0" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.1" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.1" + child="//@diagram/@topLevelNodes.0" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.0" + child="//@diagram/@links.1" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.1" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.1" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.2" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.2" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.2" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.2" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.2" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.3" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.3" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.3" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.3" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.3" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram" + child="//@diagram/@links.4" + groupName="links" + groupIcon="icons/linksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.4" + child="//@diagram/@topLevelNodes.1" + referenceType="out_target" + groupName="target" + groupIcon="icons/linkTargetNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.4" + referenceType="in_source" + groupName="incoming links" + groupIcon="icons/incomingLinksNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@links.4" + child="//@diagram/@topLevelNodes.1" + referenceType="in_source" + groupName="source" + groupIcon="icons/linkSourceNavigatorGroup.gif"/> + <childReferences + parent="//@diagram/@topLevelNodes.1" + child="//@diagram/@links.4" + referenceType="out_target" + groupName="outgoing links" + groupIcon="icons/outgoingLinksNavigatorGroup.gif"/> + </navigator> + <diagramUpdater/> + <propertySheet> + <tabs + xsi:type="gmfgen:GenStandardPropertyTab" + iD="appearance"/> + <tabs + xsi:type="gmfgen:GenStandardPropertyTab" + iD="diagram"/> + <tabs + xsi:type="gmfgen:GenCustomPropertyTab" + iD="domain" + label="Core"> + <filter + xsi:type="gmfgen:TypeTabFilter"> + <types>org.eclipse.gmf.runtime.notation.View</types> + <types>org.eclipse.gef.EditPart</types> + <generatedTypes>abstractNavigatorItem</generatedTypes> + </filter> + </tabs> + </propertySheet> + <domainGenModel + href="acore.genmodel#/"/> + <labelParsers + extensibleViaService="true"> + <implementations + xsi:type="gmfgen:PredefinedParser" + uses="//@diagram/@childNodes.0/@labelModelFacet //@diagram/@childNodes.1/@labelModelFacet //@diagram/@topLevelNodes.0/@labels.0/@modelFacet //@diagram/@childNodes.2/@labelModelFacet //@diagram/@childNodes.3/@labelModelFacet //@diagram/@topLevelNodes.1/@labels.0/@modelFacet"/> + </labelParsers> + <contextMenus + context="//@diagram"> + <items + xsi:type="gmfgen:LoadResourceAction"/> + </contextMenus> +</gmfgen:GenEditorGenerator> diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/exceptions/EClassIncompatibleException.java b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/exceptions/EClassIncompatibleException.java index ff465efda1..73e03b3924 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/exceptions/EClassIncompatibleException.java +++ b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/exceptions/EClassIncompatibleException.java @@ -1,31 +1,31 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Martin Flüuege - initial API and implementation
- */
-package org.eclipse.emf.cdo.dawn.util.exceptions;
-
-/**
- * @author Martin Fluegge
- * @since 1.0
- */
-public class EClassIncompatibleException extends Exception
-{
-
- private static final long serialVersionUID = 1L;
-
- public EClassIncompatibleException()
- {
- super();
- }
-
- public EClassIncompatibleException(String s)
- {
- super(s);
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Martin Flüuege - initial API and implementation + */ +package org.eclipse.emf.cdo.dawn.util.exceptions; + +/** + * @author Martin Fluegge + * @since 1.0 + */ +public class EClassIncompatibleException extends Exception +{ + + private static final long serialVersionUID = 1L; + + public EClassIncompatibleException() + { + super(); + } + + public EClassIncompatibleException(String s) + { + super(s); + } +} |