Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-02-11 02:48:20 +0000
committerGerrit Code Review @ Eclipse.org2016-02-12 15:31:41 +0000
commitecd4928b327f5561364c5068c9ff5f1668e92d13 (patch)
tree7c34f46cf82a1d65ac753fa92c2a5d55371b8dba /plugins/infra/gmfdiag
parent751a204d74e15eb2db6b41c937691fc56dcc1252 (diff)
downloadorg.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.gz
org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.xz
org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.zip
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220 Factor UI dependencies out of the UML Element Types bundle. This includes moving some advices that interact with the user into a new org.eclipse.papyrus.uml.service.types.ui bundle. Pull up the PasteCommandService and IPasteCommandProvider API into the Infra Diagram layer where the extension point is defined. Deprecate the old API in the UML layer. Introduce a service for participation of languages in CSS styling: * styling reset actions in the Reset Style command * access to semantic model classes and properties to make available to CSS Factor PapyrusObservableValue and cohorts out of the UML Tools bundle into the Infra Layer for more general reuse and to relieve the Diagram Infrastructure layer of UML dependencies. The old API remains as deprecated. Remove the Infra Diagram Layer dependency on UML Layer for property testers governing deletion in the diagram. Includes introduction of a new IGraphicalDeletionHelper OSGi service for delegation of the determination of whether an element can be deleted from the diagram and replacement of the XML expression properties * org.eclipse.papyrus.uml.diagram.common.isSemanticDeletion * org.eclipse.papyrus.uml.diagram.common.isReadOnly by * org.eclipse.papyrus.infra.gmfdiag.common.isSemanticDeletion * org.eclipse.papyrus.infra.gmfdiag.common.canDelete (where the latter is the negation of the property that it supersedes) Extract UML dependencies from the Diagram Outline and CSS Editor bundles. Remove unused MDTUtil APIs that referenced a UML-specific annotation. Move the Diagram Infrastructure CSS Palette bundle into the UML layer because it serves to provide extensions on the Palette Service, which is an overtly UML-specific capability. All client APIs for the Properties View are moved from org.eclipse.papyrus.views.properties bundle to a new org.eclipse.papyrus.infra.properties.ui bundle. This includes renaming of: * extension points * label-provider contexts * XWT namespaces Add an "all UI tests" suite. Define a componentized hierarchical build layout of the main plug-ins Change-Id: I43f8f3644857a18b69715f5a2f1da9b1cf286d67
Diffstat (limited to 'plugins/infra/gmfdiag')
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/pom.xml8
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/pom.xml8
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/pom.xml8
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/pom.xml8
-rw-r--r--plugins/infra/gmfdiag/assistant/pom.xml20
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF50
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF79
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt22
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt76
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt34
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt44
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt60
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java150
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java70
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java192
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.classpath16
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF107
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/Activator.java161
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java464
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/StylingService.java72
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/spi/IStylingProvider.java99
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF56
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml852
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java59
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/pom.xml23
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.classpath14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF61
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/historyListeners.exsd2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/operationApprover.exsd156
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/Activator.java163
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedDiagramCommandStack.java179
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedOperationHistory.java483
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/INonDirtying.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NestingNotifyingWorkspaceCommandStack.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java701
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/NonDirtyingUtils.java103
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationHistoryDirtyState.java121
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationUtils.java90
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGEFCommandWrapper.java20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGMFCommandWrapper.java293
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFtoEMFCommandWrapper.java273
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoEMFCommandWrapper.java276
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoGEFCommandWrapper.java21
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/OperationToGEFCommandWrapper.java329
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.classpath16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF212
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/notation.elementtypesconfigurations8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/Activator.java399
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableList.java49
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableValue.java65
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleObservableValue.java260
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java383
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java40
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/IPasteCommandProvider.java54
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/PasteCommandService.java147
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/GraphicalDeletionHelperService.java46
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/IGraphicalDeletionHelper.java51
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java98
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/GMFUnsafe.java145
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/MDTUtil.java56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/internal/common/expressions/GraphicalEditPartPropertyTester.java56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/META-INF/MANIFEST.MF37
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/.classpath7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/.project28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/META-INF/MANIFEST.MF21
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/about.html28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/build.properties8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/icon/sourceEditor.gifbin353 -> 0 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/plugin.xml18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/pom.xml14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/src/org/eclipse/papyrus/infra/gmfdiag/css/palette/Activator.java69
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/src/org/eclipse/papyrus/infra/gmfdiag/css/palette/aspect/CSSStylePostAction.java140
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette/src/org/eclipse/papyrus/infra/gmfdiag/css/palette/provider/CSSStyleAspectActionProvider.java39
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/.classpath2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/META-INF/MANIFEST.MF56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/plugin.xml2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/engine/ExportAllDiagramsEngine.java118
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/utils/ExportUtils.java81
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/utils/SelectionHelper.java40
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/build.properties15
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/icons/obj16/Plus.gifbin0 -> 318 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/plugin.xml16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/Activator.java145
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperLinkPopupBarEditPolicy.java7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperlinkNavigationMenuEditPolicy.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/NavigationEditPolicy.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/helper/EditorHyperLinkHelper.java187
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/messages/Messages.java36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/messages/messages.properties15
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/object/HyperLinkEditor.java86
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/providers/EditorHyperlinkLabelProvider.java71
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/ui/AdvancedHLManager.java250
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/ui/EditorHyperLinkEditorShell.java184
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/ui/EditorLookForEditorShell.java431
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/utils/DeleteActionUtil.java89
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF76
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/handlers/AbstractDiagramCommandHandler.java9
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/handlers/DuplicateDiagramHandler.java161
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/handlers/RenameDiagramHandler.java157
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/DisplayDiagramRef.java112
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetContainedDiagrams.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetDiagramIcon.java9
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/icons/separator.gifbin0 -> 124 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java211
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/menu/button/MoreButton.java7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/META-INF/MANIFEST.MF53
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramNavigator.java39
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/META-INF/MANIFEST.MF52
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusPreferencePage.java294
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/DiagramPreferencePage.java373
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/VisiblePageSingleton.java144
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/AbstractGroup.java242
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.classpath14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF78
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/notation.ctx2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleAnchor.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleBasicCompartment.xwt36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleBasicDecorationNode.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleBasicSemanticCompartment.xwt34
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleBendpoints.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleBounds.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleCompartment.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleConnector.xwt18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleDecorationNode.xwt18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleDiagram.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleEdge.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleGuide.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleIdentityAnchor.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleImage.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleLayoutConstraint.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleListCompartment.xwt80
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleLocation.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleNode.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleNodeEntry.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultiplePropertyValue.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleRatio.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleRelativeBendpoints.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleSemanticListCompartment.xwt80
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleShape.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleSize.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleStandardDiagram.xwt66
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleStringObjectConverter.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleStringToPropertyValueMapEntry.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/MultipleView.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleAnchor.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleBasicCompartment.xwt64
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleBasicDecorationNode.xwt18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleBasicSemanticCompartment.xwt64
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleBendpoints.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleBounds.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleCompartment.xwt72
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleConnector.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDecorableElement.xwt38
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDecorationNode.xwt18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt34
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleEdge.xwt62
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleGuide.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleIdentityAnchor.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleImage.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleLayoutConstraint.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleListCompartment.xwt108
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleLocation.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleNode.xwt62
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleNodeEntry.xwt44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SinglePropertyValue.xwt46
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleRatio.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleRelativeBendpoints.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleRulersAndGrid.xwt4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleSemanticListCompartment.xwt110
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleShape.xwt18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleSize.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleStandardDiagram.xwt110
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleStringObjectConverter.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleStringToPropertyValueMapEntry.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleView.xwt60
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/style.ctx2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/FillStyle.xwt52
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/FontStyle.xwt46
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/LineStyle.xwt38
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleArrowStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleBooleanListValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleBooleanValueStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleByteArrayValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleCanonicalStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleConnectorStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDataTypeStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDescriptionStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDiagramLinkStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDiagramStyle.xwt38
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDoubleListValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDoubleValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleDrawerStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleEObjectListValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleEObjectValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleFillStyle.xwt48
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleFilteringStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleFontStyle.xwt56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleGuideStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleHintedDiagramLinkStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleImageBufferStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleImageStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleIntListValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleIntValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleLineStyle.xwt48
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleLineTypeStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleListValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleMultiDiagramLinkStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleNamedStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultiplePageStyle.xwt38
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultiplePropertiesSetStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleRoundedCornersStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleRoutingStyle.xwt118
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleShapeStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleSingleValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleSortingStyle.xwt58
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleStringListValueStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleStringValueStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleTextStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/MultipleTitleStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/RoundedCornersStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/ShapeStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleArrowStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleBooleanListValueStyle.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleBooleanValueStyle.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleByteArrayValueStyle.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleCanonicalStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleConnectorStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDataTypeStyle.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDescriptionStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDiagramLinkStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDiagramStyle.xwt52
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDoubleListValueStyle.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDoubleValueStyle.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleDrawerStyle.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleEObjectListValueStyle.xwt40
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleEObjectValueStyle.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleFillStyle.xwt50
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleFilteringStyle.xwt56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleFontStyle.xwt44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleGradientData.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleGuideStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleHintedDiagramLinkStyle.xwt44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleImageBufferStyle.xwt34
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleImageStyle.xwt34
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleIntListValueStyle.xwt42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleIntValueStyle.xwt32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleLineStyle.xwt36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleLineTypeStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleListValueStyle.xwt56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleMultiDiagramLinkStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleNamedStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SinglePageStyle.xwt38
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SinglePropertiesSetStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleRoundedCornersStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleRoutingStyle.xwt120
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleShapeStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleSingleValueStyle.xwt48
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleSortingStyle.xwt56
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleStringListValueStyle.xwt44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleStringValueStyle.xwt34
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleStyle.xwt14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleTextStyle.xwt28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/style/ui/SingleTitleStyle.xwt30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/MultipleCanonicalStyle.xwt4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/SingleCanonicalStyle.xwt4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/CanonicalObservableValue.java12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/GradientObservableValue.java120
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/extension/NotationStyleHandlerProvider.java98
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/AppearanceModelElementFactory.java92
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElement.java342
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElementFactory.java104
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElement.java312
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/DecoratedModelElementFactory.java112
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java26
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GradientDataModelElement.java294
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/NotationModelElementFactory.java170
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/RulerAndGridModelElement.java384
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/RulersAndGridModelElementFactory.java122
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/StyleHandlerProvider.java122
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElement.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElementFactory.java2
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java370
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/widget/DiagramPreferencesDefaultButton.java342
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/META-INF/MANIFEST.MF6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/model/diagrams/ui/SingleDiagrams.xwt4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/plugin.xml2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/modelelements/WelcomeModelElement.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/modelelements/WelcomeModelElementFactory.java4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/META-INF/MANIFEST.MF44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/XWTAwareColorPicker.java196
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/XWTAwareFontEditor.java136
-rw-r--r--plugins/infra/gmfdiag/pom.xml38
349 files changed, 11576 insertions, 12224 deletions
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/pom.xml b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/pom.xml
index c2205d02249..a2115d59e35 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/pom.xml
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-assistant</artifactId>
<groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.assistant.edit</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/pom.xml b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/pom.xml
index d5bcaa9c75a..752285996db 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/pom.xml
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-assistant</artifactId>
<groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.assistant.editor</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/pom.xml b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/pom.xml
index f59536858f5..af816ad51da 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/pom.xml
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-assistant</artifactId>
<groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.assistant.ui</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/pom.xml b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/pom.xml
index 5a41c2543c3..4b8e4a5729e 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/pom.xml
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-assistant</artifactId>
<groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.assistant</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/assistant/pom.xml b/plugins/infra/gmfdiag/assistant/pom.xml
new file mode 100644
index 00000000000..1dbc9520adf
--- /dev/null
+++ b/plugins/infra/gmfdiag/assistant/pom.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-assistant</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus Diagram Assistants</name>
+ <description>Model and run-time engine for model-driven contributions to the GMF Diagram Assistants service.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.infra.gmfdiag.assistant</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.assistant.edit</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.assistant.editor</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.assistant.ui</module>
+ </modules>
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/pom.xml
index acaad34d9cd..04b9961c188 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css.configuration</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF
index 95080e688c6..e9c39204b8c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF
@@ -1,25 +1,25 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.2.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.emf.ecore;bundle-version="2.9.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.e4.ui.css.core;bundle-version="0.10.2",
- org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.draw2d.ui;bundle-version="1.7.0",
- org.eclipse.draw2d;bundle-version="3.9.0",
- org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0"
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: CSS Debug view
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.debug.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.debug;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="1.2.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.e4.ui.css.core;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.draw2d.ui;bundle-version="1.7.0",
+ org.eclipse.draw2d;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: CSS Debug view
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.debug.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.debug;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/pom.xml
index bcd907b1642..94cec25982d 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.dev.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/dev</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css.debug</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF
index ece79d60fc2..83ce4dc8841 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF
@@ -1,40 +1,39 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.properties.creation,
- org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding,
- org.eclipse.papyrus.infra.gmfdiag.css.properties.provider
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.views.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.emf.edit;bundle-version="2.8.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
- org.eclipse.emf.databinding;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
- org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: CSS Properties
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.properties;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.properties.creation,
+ org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding,
+ org.eclipse.papyrus.infra.gmfdiag.css.properties.provider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.emf.edit;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
+ org.eclipse.emf.databinding;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
+ org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: CSS Properties
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.properties;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx
index 7acab6a523e..1b6ded15f5c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx
@@ -95,7 +95,7 @@
<elements xmi:id="_8MrCVIk1EeWBadfj_-2HEQ" name="ModelStyleSheet">
<properties xmi:id="_8MrCVYk1EeWBadfj_-2HEQ" name="stylesheets" label="Model style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to the model"/>
</elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.views.properties/model/Environment.xmi#//@modelElementFactories.0"/>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@modelElementFactories.0"/>
</dataContexts>
<dataContexts xmi:id="_8MrCVok1EeWBadfj_-2HEQ" name="Preferences" label="Preferences">
<elements xmi:id="_8MrCV4k1EeWBadfj_-2HEQ" name="org.eclipse.papyrus.infra.gmfdiag.css">
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt
index 40dbfbfbce4..b5c6f7de370 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite
- xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <GridLayout numColumns="1"></GridLayout>
- </Composite.layout>
- <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <GridLayout numColumns="1"></GridLayout>
+ </Composite.layout>
+ <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt
index 4361f29795b..a2f377c116c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:x="http://www.eclipse.org/xwt"
- xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringLabel input="{Binding}"
- property="Preferences:org.eclipse.papyrus.infra.gmfdiag.css:currentTheme"></ppe:StringLabel>
- </Composite>
- <Composite>
- <Composite.layout>
- <GridLayout></GridLayout>
- </Composite.layout>
- <css:ResetStyleWidget property="CSS:PapyrusCSSStyle:cssStyle"
- input="{Binding}"></css:ResetStyleWidget>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}"
- property="CSS:DiagramStyle:css_stylesheets"></ppe:MultiReference>
- <ppe:MultiReference input="{Binding}"
- property="CSS:ModelStyle:modelStyleSheets"></ppe:MultiReference>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"></ppe:MultiString>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringLabel input="{Binding}"
+ property="Preferences:org.eclipse.papyrus.infra.gmfdiag.css:currentTheme"></ppe:StringLabel>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <GridLayout></GridLayout>
+ </Composite.layout>
+ <css:ResetStyleWidget property="CSS:PapyrusCSSStyle:cssStyle"
+ input="{Binding}"></css:ResetStyleWidget>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="CSS:DiagramStyle:css_stylesheets"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="CSS:ModelStyle:modelStyleSheets"></ppe:MultiReference>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"></ppe:MultiString>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt
index 0af8d6e26c4..da0c1115779 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}"
- property="modelstylesheets:EmbeddedStyleSheet:label"></ppe:StringEditor>
- <ppe:StringMultiline input="{Binding}"
- property="modelstylesheets:EmbeddedStyleSheet:content"></ppe:StringMultiline>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="modelstylesheets:EmbeddedStyleSheet:label"></ppe:StringEditor>
+ <ppe:StringMultiline input="{Binding}"
+ property="modelstylesheets:EmbeddedStyleSheet:content"></ppe:StringMultiline>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt
index 827e0614086..69bb939acd8 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:x="http://www.eclipse.org/xwt"
- xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <GridLayout></GridLayout>
- </Composite.layout>
- <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"
- customLabel="Applied styles"></ppe:MultiString>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <GridLayout></GridLayout>
+ </Composite.layout>
+ <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"
+ customLabel="Applied styles"></ppe:MultiString>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt
index 4be65ab7b03..a6cd887e55f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt"
- xmlns:j="clr-namespace:java.lang"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringFileSelector allowFileSystem="false"
- input="{Binding}" allowWorkspace="true"
- property="modelstylesheets:StyleSheetReference:path">
- <ppe:StringFileSelector.filterNames>
- <x:Array Type="j:String">
- <j:String>CSS Stylesheets</j:String>
- <j:String>All</j:String>
- </x:Array>
- </ppe:StringFileSelector.filterNames>
- <ppe:StringFileSelector.filterExtensions>
- <x:Array Type="j:String">
- <j:String>*.css</j:String>
- <j:String>*</j:String>
- </x:Array>
- </ppe:StringFileSelector.filterExtensions>
- </ppe:StringFileSelector>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringFileSelector allowFileSystem="false"
+ input="{Binding}" allowWorkspace="true"
+ property="modelstylesheets:StyleSheetReference:path">
+ <ppe:StringFileSelector.filterNames>
+ <x:Array Type="j:String">
+ <j:String>CSS Stylesheets</j:String>
+ <j:String>All</j:String>
+ </x:Array>
+ </ppe:StringFileSelector.filterNames>
+ <ppe:StringFileSelector.filterExtensions>
+ <x:Array Type="j:String">
+ <j:String>*.css</j:String>
+ <j:String>*</j:String>
+ </x:Array>
+ </ppe:StringFileSelector.filterExtensions>
+ </ppe:StringFileSelector>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt
index cb7b2c841c5..358cc9713ab 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Composite xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
xmlns:x="http://www.eclipse.org/xwt">
<Composite.layout>
<ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml
index 6325c35a37f..c4eca1b9958 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css.properties</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java
index 708bc39b6a7..dcc8af32a7d 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java
@@ -1,75 +1,75 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.creation;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
-import org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * A Factory for creating StyleSheets directly in the resource. It is not
- * contained in an EObject.
- *
- * @author Camille Letavernier
- */
-public class StyleSheetFactory extends EcorePropertyEditorFactory {
-
- protected View context;
-
- public StyleSheetFactory(View context) {
- super(NotationPackage.eINSTANCE.getEObjectListValueStyle_EObjectListValue());
- this.type = StylesheetsPackage.eINSTANCE.getStyleSheet();
- this.context = context;
- }
-
- @Override
- protected EObject createObjectInDifferentContainer(Control widget) {
- // The EObject is simply created ; it isn't stored anywhere (yet)
- // @see #validateObjects(Collection)
- return simpleCreateObject(widget);
- }
-
- /**
- * @see org.eclipse.papyrus.views.properties.creation.PropertyEditorFactory#getOperationExecutor(java.lang.Object)
- *
- * @param context
- * @return
- */
- @Override
- public IAtomicOperationExecutor getOperationExecutor(Object context) {
- if (context instanceof StyleSheet) {
- StyleSheet stylesheet = (StyleSheet) context;
- if (stylesheet.eResource() == null) {
- // Bug 468345: Use the current Notation::view instead, since we're creating the stylesheet in this object's resource
- // Ensure that further edition occurs in a proper nested transaction
- return super.getOperationExecutor(this.context);
- }
- }
-
- return super.getOperationExecutor(context);
- }
-
- /**
- * Return the objects as-is. The factory is not responsible for storing them
- */
- @Override
- public Collection<Object> validateObjects(Collection<Object> objectsToValidate) {
- return objectsToValidate;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.creation;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
+import org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * A Factory for creating StyleSheets directly in the resource. It is not
+ * contained in an EObject.
+ *
+ * @author Camille Letavernier
+ */
+public class StyleSheetFactory extends EcorePropertyEditorFactory {
+
+ protected View context;
+
+ public StyleSheetFactory(View context) {
+ super(NotationPackage.eINSTANCE.getEObjectListValueStyle_EObjectListValue());
+ this.type = StylesheetsPackage.eINSTANCE.getStyleSheet();
+ this.context = context;
+ }
+
+ @Override
+ protected EObject createObjectInDifferentContainer(Control widget) {
+ // The EObject is simply created ; it isn't stored anywhere (yet)
+ // @see #validateObjects(Collection)
+ return simpleCreateObject(widget);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.properties.ui.creation.PropertyEditorFactory#getOperationExecutor(java.lang.Object)
+ *
+ * @param context
+ * @return
+ */
+ @Override
+ public IAtomicOperationExecutor getOperationExecutor(Object context) {
+ if (context instanceof StyleSheet) {
+ StyleSheet stylesheet = (StyleSheet) context;
+ if (stylesheet.eResource() == null) {
+ // Bug 468345: Use the current Notation::view instead, since we're creating the stylesheet in this object's resource
+ // Ensure that further edition occurs in a proper nested transaction
+ return super.getOperationExecutor(this.context);
+ }
+ }
+
+ return super.getOperationExecutor(context);
+ }
+
+ /**
+ * Return the objects as-is. The factory is not responsible for storing them
+ */
+ @Override
+ public Collection<Object> validateObjects(Collection<Object> objectsToValidate) {
+ return objectsToValidate;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java
index e1ac9e8cbc3..35187f16e46 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.widgets.Control;
@@ -38,7 +38,7 @@ public class ThemePropertyEditorFactory extends EcorePropertyEditorFactory {
/**
- * @see org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory#simpleCreateObject(org.eclipse.swt.widgets.Control)
+ * @see org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory#simpleCreateObject(org.eclipse.swt.widgets.Control)
*
* @param widget
* @return
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java
index 101605646f7..dca1f8f0cd0 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java
@@ -46,6 +46,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.WorkspaceThemes;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
@@ -57,7 +58,6 @@ import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java
index 818b236c1db..d2920c44562 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java
@@ -1,35 +1,35 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.preferences.ThemePreferences;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSThemeLabelProvider;
-import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElement;
-
-
-public class CSSPreferencesModelElement extends PreferencesModelElement {
-
- public CSSPreferencesModelElement(DataContextElement context) {
- super(context);
- }
-
- @Override
- public ILabelProvider getLabelProvider(String propertyPath) {
- if (ThemePreferences.CURRENT_THEME.equals(propertyPath)) {
- return new CSSThemeLabelProvider();
- }
- return super.getLabelProvider(propertyPath);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.preferences.ThemePreferences;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSThemeLabelProvider;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.PreferencesModelElement;
+
+
+public class CSSPreferencesModelElement extends PreferencesModelElement {
+
+ public CSSPreferencesModelElement(DataContextElement context) {
+ super(context);
+ }
+
+ @Override
+ public ILabelProvider getLabelProvider(String propertyPath) {
+ if (ThemePreferences.CURRENT_THEME.equals(propertyPath)) {
+ return new CSSThemeLabelProvider();
+ }
+ return super.getLabelProvider(propertyPath);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java
index 76bf00b0eb6..ad77722d18b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java
@@ -1,27 +1,27 @@
-/*****************************************************************************
- * Copyright (c) 2012, 2014 CEA LIST 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 417409
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
-
-import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElement;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElementFactory;
-
-
-public class CSSPreferencesModelElementFactory extends PreferencesModelElementFactory {
-
- @Override
- protected PreferencesModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
- return new CSSPreferencesModelElement(context);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 417409
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
+
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.PreferencesModelElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.PreferencesModelElementFactory;
+
+
+public class CSSPreferencesModelElementFactory extends PreferencesModelElementFactory {
+
+ @Override
+ protected PreferencesModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
+ return new CSSPreferencesModelElement(context);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java
index 7e64efad235..b9a164efc99 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLabelProvider;
-import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement;
/**
@@ -44,7 +44,7 @@ public class CSSThemesModelElement extends EMFModelElement {
}
/**
- * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#getLabelProvider(java.lang.String)
+ * @see org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement#getLabelProvider(java.lang.String)
*
* @param propertyPath
* @return
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java
index 71d3c44b370..4bca7fc62d6 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java
@@ -17,9 +17,9 @@ package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator;
import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.Activator;
-import org.eclipse.papyrus.views.properties.modelelement.AbstractEMFModelElementFactory;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractEMFModelElementFactory;
/**
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
index 2db99a62dcc..50d8ede6916 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
@@ -51,6 +51,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme;
import org.eclipse.papyrus.infra.gmfdiag.css.theme.ThemeManager;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
@@ -61,7 +62,6 @@ import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java
index a42b1b740f0..db4aa0f5131 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java
@@ -46,13 +46,13 @@ import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLa
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectorDialog;
import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java
index f8df14a2f4a..713253ad31b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java
@@ -1,96 +1,96 @@
-/*****************************************************************************
- * Copyright (c) 2012, 2014 CEA LIST 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 323802
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.gmfdiag.css.helper.ResetStyleHelper;
-import org.eclipse.papyrus.views.properties.modelelement.DataSource;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-
-public class ResetStyleWidget implements SelectionListener {
-
- private Button button;
-
- private DataSource input;
-
- private String propertyPath;
-
- public ResetStyleWidget(Composite parent, int style) {
- button = new Button(parent, SWT.PUSH);
- button.addSelectionListener(this);
- button.setText("Default style");
- button.setToolTipText("Resets the properties which have been customized outside of the Style support. The default style will be applied");
- }
-
- public void widgetSelected(SelectionEvent event) {
- if (event.widget != button || input == null) {
- return;
- }
-
- IStructuredSelection viewSelection = input.getSelection();
- ResetStyleHelper.resetStyle(viewSelection);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing
- }
-
- public void setText(String text) {
- button.setText(text);
- }
-
- public String getText() {
- return button.getText();
- }
-
- public void setToolTipText(String tooltip) {
- button.setToolTipText(tooltip);
- }
-
- public String getToolTipText() {
- return button.getToolTipText();
- }
-
- public void setInput(DataSource input) {
- this.input = input;
- checkInput();
- }
-
- public DataSource getInput() {
- return input;
- }
-
- public String getProperty() {
- return propertyPath;
- }
-
- public void setProperty(String property) {
- this.propertyPath = property;
- checkInput();
- }
-
- protected void checkInput() {
- if ((propertyPath != null) && (input != null)) {
- button.setEnabled(input.isEditable(propertyPath));
- } else {
- button.setEnabled(true); // For compatibility with XWT models that don't specify the property
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 323802
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.ResetStyleHelper;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.DataSource;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+
+public class ResetStyleWidget implements SelectionListener {
+
+ private Button button;
+
+ private DataSource input;
+
+ private String propertyPath;
+
+ public ResetStyleWidget(Composite parent, int style) {
+ button = new Button(parent, SWT.PUSH);
+ button.addSelectionListener(this);
+ button.setText("Default style");
+ button.setToolTipText("Resets the properties which have been customized outside of the Style support. The default style will be applied");
+ }
+
+ public void widgetSelected(SelectionEvent event) {
+ if (event.widget != button || input == null) {
+ return;
+ }
+
+ IStructuredSelection viewSelection = input.getSelection();
+ ResetStyleHelper.resetStyle(viewSelection);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // Nothing
+ }
+
+ public void setText(String text) {
+ button.setText(text);
+ }
+
+ public String getText() {
+ return button.getText();
+ }
+
+ public void setToolTipText(String tooltip) {
+ button.setToolTipText(tooltip);
+ }
+
+ public String getToolTipText() {
+ return button.getToolTipText();
+ }
+
+ public void setInput(DataSource input) {
+ this.input = input;
+ checkInput();
+ }
+
+ public DataSource getInput() {
+ return input;
+ }
+
+ public String getProperty() {
+ return propertyPath;
+ }
+
+ public void setProperty(String property) {
+ this.propertyPath = property;
+ checkInput();
+ }
+
+ protected void checkInput() {
+ if ((propertyPath != null) && (input != null)) {
+ button.setEnabled(input.isEditable(propertyPath));
+ } else {
+ button.setEnabled(true); // For compatibility with XWT models that don't specify the property
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/pom.xml
index 623fa1433e5..73b362cf5d5 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css.theme</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.classpath b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.classpath
index 486b1b8b096..50aae142c50 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.classpath
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.classpath
@@ -1,8 +1,8 @@
-<?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/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.settings/org.eclipse.jdt.core.prefs
index 410244d65a6..b3aa6d60f94 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.settings/org.eclipse.jdt.core.prefs
@@ -1,291 +1,291 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=260
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=false
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=260
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
index 63ab1796743..86a8fbcc0db 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
@@ -1,54 +1,53 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css,
- org.eclipse.papyrus.infra.gmfdiag.css.converters,
- org.eclipse.papyrus.infra.gmfdiag.css.dom,
- org.eclipse.papyrus.infra.gmfdiag.css.engine,
- org.eclipse.papyrus.infra.gmfdiag.css.engine.enginecopy,
- org.eclipse.papyrus.infra.gmfdiag.css.handler,
- org.eclipse.papyrus.infra.gmfdiag.css.helper,
- org.eclipse.papyrus.infra.gmfdiag.css.listener,
- org.eclipse.papyrus.infra.gmfdiag.css.lists,
- org.eclipse.papyrus.infra.gmfdiag.css.notation,
- org.eclipse.papyrus.infra.gmfdiag.css.preferences,
- org.eclipse.papyrus.infra.gmfdiag.css.provider,
- org.eclipse.papyrus.infra.gmfdiag.css.resource,
- org.eclipse.papyrus.infra.gmfdiag.css.service,
- org.eclipse.papyrus.infra.gmfdiag.css.style.impl,
- org.eclipse.papyrus.infra.gmfdiag.css.theme
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
- org.eclipse.emf.ecore;bundle-version="2.8.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.w3c.css.sac;bundle-version="1.3.1",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation.edit;bundle-version="1.7.0",
- org.w3c.dom.svg;bundle-version="1.1.0",
- org.eclipse.emf.edit.ui,
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css,
+ org.eclipse.papyrus.infra.gmfdiag.css.converters,
+ org.eclipse.papyrus.infra.gmfdiag.css.dom,
+ org.eclipse.papyrus.infra.gmfdiag.css.engine,
+ org.eclipse.papyrus.infra.gmfdiag.css.engine.enginecopy,
+ org.eclipse.papyrus.infra.gmfdiag.css.handler,
+ org.eclipse.papyrus.infra.gmfdiag.css.helper,
+ org.eclipse.papyrus.infra.gmfdiag.css.listener,
+ org.eclipse.papyrus.infra.gmfdiag.css.lists,
+ org.eclipse.papyrus.infra.gmfdiag.css.notation,
+ org.eclipse.papyrus.infra.gmfdiag.css.preferences,
+ org.eclipse.papyrus.infra.gmfdiag.css.provider,
+ org.eclipse.papyrus.infra.gmfdiag.css.resource,
+ org.eclipse.papyrus.infra.gmfdiag.css.service,
+ org.eclipse.papyrus.infra.gmfdiag.css.spi,
+ org.eclipse.papyrus.infra.gmfdiag.css.style.impl,
+ org.eclipse.papyrus.infra.gmfdiag.css.theme
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
+ org.eclipse.emf.ecore;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.w3c.css.sac;bundle-version="1.3.1",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.notation.edit;bundle-version="1.7.0",
+ org.w3c.dom.svg;bundle-version="1.1.0",
+ org.eclipse.emf.edit.ui,
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/pom.xml
index 01a93b90dde..deef8f07927 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/Activator.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/Activator.java
index 722dc09fbf1..0ce86d572d0 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/Activator.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/Activator.java
@@ -1,79 +1,82 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.css"; //$NON-NLS-1$
-
- /**
- * The CSS Context
- */
- public static final String CSS = "Papyrus CSS"; //ID of the CSS context //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The plug-in's logger
- */
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.service.StylingService;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.css"; //$NON-NLS-1$
+
+ /**
+ * The CSS Context
+ */
+ public static final String CSS = "Papyrus CSS"; // ID of the CSS context //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The plug-in's logger
+ */
+ public static LogHelper log;
+
+ private StylingService stylingService;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+
+ stylingService = new StylingService(context);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ stylingService.dispose();
+ stylingService = null;
+
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public StylingService getStylingService() {
+ return stylingService;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
index 116ae288c4e..a5ab5ba2ee9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
@@ -1,240 +1,224 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Celine Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 455311
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.command;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.Style;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
-import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayUtil;
-import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayConstant;
-
-
-public class ResetStyleCommand extends RecordingCommand {
-
- private static Set<String> papyrusStyleAnnotations = new HashSet<String>();
-
- static {
- papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON);
- papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.SHADOWFIGURE);
- papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.QUALIFIED_NAME);
- papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
- papyrusStyleAnnotations.add(StereotypeDisplayConstant.STEREOTYPE_LABEL_DEPTH);
- }
-
- private Iterator<?> iterator;
- private TransactionalEditingDomain domain;
-
- /**
- *
- * Constructor.
- *
- * @param domain
- * @param iterator
- */
- public ResetStyleCommand(TransactionalEditingDomain domain, Iterator<?> iterator) {
- super(domain);
- this.domain = domain;
- this.iterator = iterator;
- }
-
- @Override
- public void doExecute() {
- while (iterator.hasNext()) {
- Object selectedItem = iterator.next();
- View view = NotationHelper.findView(selectedItem);
- if (view == null) {
- continue;
- }
-
- if (view instanceof Diagram) {
- resetDiagram((Diagram) view);
- break;
- } else {
- // Reset the style attribute to their default value
- resetStyle(view, true);
- }
- }
- }
-
- /**
- * Reset the diagram
- *
- * @param diagram
- */
- private void resetDiagram(Diagram diagram) {
- for (Object viewObject : diagram.getChildren()) {
- if (viewObject instanceof View) {
- resetStyle((View) viewObject, true);
- }
- }
- for (Object lineObject : diagram.getEdges()) {
- if (lineObject instanceof View) {
- resetStyle((View) lineObject, true);
- }
- }
- }
-
-
- /**
- * Reset a Style and its children
- *
- * @param view
- * the view of which the style should be reset
- * @param recursive
- * true if the children should be reset as well
- */
- private void resetStyle(View view, boolean recursive) {
- resetStyle(view);
- if (recursive) {
- for (Object childObject : view.getChildren()) {
- if (childObject instanceof View) {
- resetStyle((View) childObject, recursive);
- }
- }
- }
- }
-
- /**
- * Reset the style of a view.
- * Delete all the custom NamedStyle
- * Reset EAnnotation
- * Reset Stereotype Styles
- *
- * @param view
- * the view to be reset
- */
- private void resetStyle(View view) {
- // Reset the view (Except for volatile/transient elements which are already derived, e.g. Stereotype compartments)
- if (view.eContainingFeature().isTransient()) {
- return;
- }
-
- // remove all the named Style of the view.
- Iterator<?> styleIterator = view.getStyles().iterator();
- while (styleIterator.hasNext()) {
- Object styleObject = styleIterator.next();
- if (styleObject instanceof NamedStyle) {
- NamedStyle customStyle = (NamedStyle) styleObject;
-
- if (!CSSStyles.RESERVED_KEYWORDS.contains(customStyle.getName())) {
-
- // Remove only NamedStyle which are supported by the CSS Implementation
- // See org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate.getCSSNamedStyle(EClass, String)
- // See Bug 425190 - [CSS] Loss of Notation information when CSS style is applied on Edges.
- switch (customStyle.eClass().getClassifierID()) {
- case NotationPackage.STRING_VALUE_STYLE:
- case NotationPackage.BOOLEAN_VALUE_STYLE:
- case NotationPackage.INT_VALUE_STYLE:
- case NotationPackage.DOUBLE_VALUE_STYLE:
- case NotationPackage.STRING_LIST_VALUE_STYLE:
- styleIterator.remove();
- }
-
- }
- } else if (styleObject instanceof Style) {
- resetStyle((Style) styleObject);
- }
- }
-
- if (view instanceof Style) {
- resetStyle((Style) view);
- }
-
- // Remove the "forceValue" annotations
- resetAnnotations(view);
- // Remove the Papyrus Style EAnnotations
- resetStyleAnnotations(view);
-
- // Reset Stereotype Persistency
- resetStereotypeView(view);
-
- // Reset the visibility
- view.eUnset(NotationPackage.eINSTANCE.getView_Visible());
- }
-
- /**
- * This method reset the style of the Stereotype Node
- *
- * @param view
- * Stereotype View
- */
- private void resetStereotypeView(final View view) {
- StereotypeDisplayUtil helper = StereotypeDisplayUtil.getInstance();
-
- if (helper.isStereotypeView(view)) {
- helper.unsetPersistency(domain, view);
-
- }
-
- }
-
- /**
- * Reset a Style .
- *
- * @param style
- * the Style to reset.
- */
- private void resetStyle(Style style) {
- if (style instanceof NamedStyle) {
- // Skip custom styles.
- // TODO: We should skip CSS Styles (CSSClass, CSSId, CSSStyle, DiagramStyleSheets),
- // and reset custom GMF Styles (elementIcon, shadow, ...).
- // What about external custom styles (ie. unkwnown styles)?
- // They should be stylable, but they might contain something we don't want to reset...
- return;
- }
-
- for (EStructuralFeature feature : style.eClass().getEAllStructuralFeatures()) {
- // Only edit Style features
- if (NotationPackage.eINSTANCE.getStyle().isSuperTypeOf(feature.getEContainingClass())) {
- // Reset the value to default
- style.eUnset(feature);
- }
- }
- }
-
- // Resets the "Force Value" annotations (Tags to indicate that the user
- // has manually selected a value, which will override the CSS Style)
- private void resetAnnotations(View view) {
- Iterator<EAnnotation> iterator = view.getEAnnotations().iterator();
- while (iterator.hasNext()) {
- if (CSSAnnotations.CSS_FORCE_VALUE.equals(iterator.next().getSource())) {
- iterator.remove();
- }
- }
- }
-
- // Resets the "Custom style" Annotations (elementIcon, shadow, qualifiedName)
- private void resetStyleAnnotations(View view) {
- Iterator<EAnnotation> iterator = view.getEAnnotations().iterator();
- while (iterator.hasNext()) {
- if (papyrusStyleAnnotations.contains(iterator.next().getSource())) {
- iterator.remove();
- }
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Celine Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 455311
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.command;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
+
+
+public class ResetStyleCommand extends RecordingCommand {
+
+ private static Set<String> papyrusStyleAnnotations = new HashSet<String>();
+
+ static {
+ papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON);
+ papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.SHADOWFIGURE);
+ papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.QUALIFIED_NAME);
+ papyrusStyleAnnotations.add(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
+ }
+
+ private Iterator<?> iterator;
+ private TransactionalEditingDomain domain;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * @param iterator
+ */
+ public ResetStyleCommand(TransactionalEditingDomain domain, Iterator<?> iterator) {
+ super(domain);
+ this.domain = domain;
+ this.iterator = iterator;
+ }
+
+ @Override
+ public void doExecute() {
+ while (iterator.hasNext()) {
+ Object selectedItem = iterator.next();
+ View view = NotationHelper.findView(selectedItem);
+ if (view == null) {
+ continue;
+ }
+
+ if (view instanceof Diagram) {
+ resetDiagram((Diagram) view);
+ break;
+ } else {
+ // Reset the style attribute to their default value
+ resetStyle(view, true);
+ }
+ }
+ }
+
+ /**
+ * Reset the diagram
+ *
+ * @param diagram
+ */
+ private void resetDiagram(Diagram diagram) {
+ for (Object viewObject : diagram.getChildren()) {
+ if (viewObject instanceof View) {
+ resetStyle((View) viewObject, true);
+ }
+ }
+ for (Object lineObject : diagram.getEdges()) {
+ if (lineObject instanceof View) {
+ resetStyle((View) lineObject, true);
+ }
+ }
+ }
+
+
+ /**
+ * Reset a Style and its children
+ *
+ * @param view
+ * the view of which the style should be reset
+ * @param recursive
+ * true if the children should be reset as well
+ */
+ private void resetStyle(View view, boolean recursive) {
+ resetStyle(view);
+ if (recursive) {
+ for (Object childObject : view.getChildren()) {
+ if (childObject instanceof View) {
+ resetStyle((View) childObject, recursive);
+ }
+ }
+ }
+ }
+
+ /**
+ * Reset the style of a view.
+ * Delete all the custom NamedStyle
+ * Reset EAnnotation
+ * Reset Stereotype Styles
+ *
+ * @param view
+ * the view to be reset
+ */
+ private void resetStyle(View view) {
+ // Reset the view (Except for volatile/transient elements which are already derived, e.g. Stereotype compartments)
+ if (view.eContainingFeature().isTransient()) {
+ return;
+ }
+
+ // remove all the named Style of the view.
+ Iterator<?> styleIterator = view.getStyles().iterator();
+ while (styleIterator.hasNext()) {
+ Object styleObject = styleIterator.next();
+ if (styleObject instanceof NamedStyle) {
+ NamedStyle customStyle = (NamedStyle) styleObject;
+
+ if (!CSSStyles.RESERVED_KEYWORDS.contains(customStyle.getName())) {
+
+ // Remove only NamedStyle which are supported by the CSS Implementation
+ // See org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate.getCSSNamedStyle(EClass, String)
+ // See Bug 425190 - [CSS] Loss of Notation information when CSS style is applied on Edges.
+ switch (customStyle.eClass().getClassifierID()) {
+ case NotationPackage.STRING_VALUE_STYLE:
+ case NotationPackage.BOOLEAN_VALUE_STYLE:
+ case NotationPackage.INT_VALUE_STYLE:
+ case NotationPackage.DOUBLE_VALUE_STYLE:
+ case NotationPackage.STRING_LIST_VALUE_STYLE:
+ styleIterator.remove();
+ }
+
+ }
+ } else if (styleObject instanceof Style) {
+ resetStyle((Style) styleObject);
+ }
+ }
+
+ if (view instanceof Style) {
+ resetStyle((Style) view);
+ }
+
+ // Remove the "forceValue" annotations
+ resetAnnotations(view);
+ // Remove the Papyrus Style EAnnotations
+ resetStyleAnnotations(view);
+
+ // Delegate to extenders
+ Activator.getDefault().getStylingService().resetStyle(view);
+
+ // Reset the visibility
+ view.eUnset(NotationPackage.eINSTANCE.getView_Visible());
+ }
+
+ /**
+ * Reset a Style .
+ *
+ * @param style
+ * the Style to reset.
+ */
+ private void resetStyle(Style style) {
+ if (style instanceof NamedStyle) {
+ // Skip custom styles.
+ // TODO: We should skip CSS Styles (CSSClass, CSSId, CSSStyle, DiagramStyleSheets),
+ // and reset custom GMF Styles (elementIcon, shadow, ...).
+ // What about external custom styles (ie. unkwnown styles)?
+ // They should be stylable, but they might contain something we don't want to reset...
+ return;
+ }
+
+ for (EStructuralFeature feature : style.eClass().getEAllStructuralFeatures()) {
+ // Only edit Style features
+ if (NotationPackage.eINSTANCE.getStyle().isSuperTypeOf(feature.getEContainingClass())) {
+ // Reset the value to default
+ style.eUnset(feature);
+ }
+ }
+ }
+
+ // Resets the "Force Value" annotations (Tags to indicate that the user
+ // has manually selected a value, which will override the CSS Style)
+ private void resetAnnotations(View view) {
+ Iterator<EAnnotation> iterator = view.getEAnnotations().iterator();
+ while (iterator.hasNext()) {
+ if (CSSAnnotations.CSS_FORCE_VALUE.equals(iterator.next().getSource())) {
+ iterator.remove();
+ }
+ }
+ }
+
+ // Resets the "Custom style" Annotations (elementIcon, shadow, qualifiedName)
+ private void resetStyleAnnotations(View view) {
+ Iterator<EAnnotation> iterator = view.getEAnnotations().iterator();
+ while (iterator.hasNext()) {
+ if (papyrusStyleAnnotations.contains(iterator.next().getSource())) {
+ iterator.remove();
+ }
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/StylingService.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/StylingService.java
new file mode 100644
index 00000000000..56c621453e0
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/StylingService.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus 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:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.css.service;
+
+import java.util.function.Predicate;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.css.spi.IStylingProvider;
+import org.eclipse.papyrus.infra.tools.util.CompositeServiceTracker;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The notation view styling service. It delegates to registered
+ * OSGi service implementations of the {@link IStylingProvider} protocol.
+ *
+ */
+public class StylingService implements IStylingProvider {
+
+ private final CompositeServiceTracker<IStylingProvider> tracker;
+
+ public StylingService(BundleContext context) {
+ super();
+
+ tracker = new CompositeServiceTracker<>(context,
+ IStylingProvider.class,
+ IStylingProvider.NONE,
+ IStylingProvider::compose);
+ tracker.open();
+ }
+
+ /**
+ * Obtains the Styling Service that delegates to registered providers.
+ *
+ * @return the Styling Service
+ */
+ public static StylingService getInstance() {
+ return Activator.getDefault().getStylingService();
+ }
+
+ public void dispose() {
+ tracker.close();
+ }
+
+ @Override
+ public void resetStyle(View view) {
+ tracker.getService().resetStyle(view);
+ }
+
+ @Override
+ public Iterable<EClass> getSupportedSemanticClasses() {
+ return tracker.getService().getSupportedSemanticClasses();
+ }
+
+ @Override
+ public Predicate<EStructuralFeature> getSemanticPropertySupportedPredicate() {
+ return tracker.getService().getSemanticPropertySupportedPredicate();
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/spi/IStylingProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/spi/IStylingProvider.java
new file mode 100644
index 00000000000..fa857f3f439
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/spi/IStylingProvider.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus 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:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.css.spi;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.function.Predicate;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.View;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * Service interface for participants in the styling of notation elements.
+ */
+public interface IStylingProvider {
+ IStylingProvider NONE = new IStylingProvider() {
+ @Override
+ public void resetStyle(View view) {
+ // Pass
+ }
+
+ @Override
+ public Iterable<EClass> getSupportedSemanticClasses() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public Predicate<EStructuralFeature> getSemanticPropertySupportedPredicate() {
+ return feature -> false;
+ }
+ };
+
+ /**
+ * Resets the domain-specific (from the service implementation's perspective)
+ * styling of a given notation {@code view}.
+ *
+ * @param view
+ * the notation view which is having its styling reset
+ */
+ void resetStyle(View view);
+
+ /**
+ * Obtains a collection of Ecore classes representing the supported CSS classes for
+ * semantic elements.
+ *
+ * @return a collection of semantic CSS classes, or {@link Collection#isEmpty() empty} if none
+ */
+ Iterable<EClass> getSupportedSemanticClasses();
+
+ /**
+ * Obtains a predicate determining whether a feature of a
+ * {@linkplain #getSupportedSemanticClasses() supported class} is supported as a CSS
+ * property for semantic elements.
+ *
+ * @return the semantic CSS property predicate
+ */
+ Predicate<EStructuralFeature> getSemanticPropertySupportedPredicate();
+
+ default IStylingProvider compose(IStylingProvider other) {
+ IStylingProvider self = this;
+ return (self == NONE)
+ ? other
+ : (other == NONE)
+ ? self
+ : new IStylingProvider() {
+ @Override
+ public void resetStyle(View view) {
+ self.resetStyle(view);
+ other.resetStyle(view);
+ }
+
+ @Override
+ public Iterable<EClass> getSupportedSemanticClasses() {
+ return Iterables.concat(self.getSupportedSemanticClasses(),
+ other.getSupportedSemanticClasses());
+ }
+
+ @Override
+ public Predicate<EStructuralFeature> getSemanticPropertySupportedPredicate() {
+ return self.getSemanticPropertySupportedPredicate().or(
+ other.getSemanticPropertySupportedPredicate());
+ }
+ };
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath
index d1b97f72bd5..bc001b4a78c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath
@@ -1,9 +1,9 @@
<?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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs
index f08be2b06c4..b3aa6d60f94 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF
index 5708934a9af..d105d17b046 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF
@@ -1,28 +1,28 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.xtext.ui,
- org.eclipse.ui.editors;bundle-version="3.5.0",
- org.eclipse.ui.ide;bundle-version="3.5.0",
- org.eclipse.xtext.ui.shared,
- org.eclipse.ui,
- org.eclipse.xtext.builder,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.xtext.common.types.ui,
- org.eclipse.xtext.ui.codetemplates.ui,
- org.eclipse.compare,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css3.ui.quickfix,
- org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist,
- org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal,
- org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist.antlr
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: CSS3 Xtext Editor (UI)
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal.CSSActivator
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui; singleton:=true
-Import-Package: org.apache.log4j
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.xtext.ui,
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.xtext.ui.shared,
+ org.eclipse.ui,
+ org.eclipse.xtext.builder,
+ org.eclipse.xtext.xbase.lib,
+ org.eclipse.xtext.common.types.ui,
+ org.eclipse.xtext.ui.codetemplates.ui,
+ org.eclipse.compare,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css3.ui.quickfix,
+ org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist,
+ org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal,
+ org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist.antlr
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: CSS3 Xtext Editor (UI)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal.CSSActivator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui; singleton:=true
+Import-Package: org.apache.log4j
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml
index d7716fb075a..49b159d1cae 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml
@@ -1,426 +1,426 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
- contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
- default="true"
- extensions="css"
- icon="icons/sourceEditor.gif"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- name="Papyrus CSS Editor">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
- commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
- commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- <!-- copy qualified name -->
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
- commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
- <activeWhen>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
- commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
- <activeWhen>
- <and>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
- <iterate>
- <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
- </iterate>
- </and>
- </activeWhen>
- </handler>
- </extension>
- <extension point="org.eclipse.core.expressions.definitions">
- <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- <and>
- <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
- <with variable="activeEditor">
- <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
- value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- forcePluginActivation="true"/>
- </with>
- </and>
- </definition>
- <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened">
- <and>
- <reference definitionId="isXtextEditorActive"/>
- <with variable="activeEditor">
- <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
- value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- forcePluginActivation="true"/>
- </with>
- </and>
- </definition>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- name="CSS">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.coloring"
- name="Syntax Coloring">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.templates"
- name="Templates">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- name="CSS">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject"/>
- </enabledWhen>
- <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"
- label="CSS"/>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Trigger expensive validation"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
- name="Validate">
- </command>
- <!-- copy qualified name -->
- <command
- id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
- categoryId="org.eclipse.ui.category.edit"
- description="Copy the qualified name for the selected element"
- name="Copy Qualified Name">
- </command>
- <command
- id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
- categoryId="org.eclipse.ui.category.edit"
- description="Copy the qualified name for the selected element"
- name="Copy Qualified Name">
- </command>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.edit">
- <command
- commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
- style="push"
- tooltip="Trigger expensive validation">
- <visibleWhen checkEnabled="false">
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- <!-- copy qualified name -->
- <menuContribution locationURI="popup:#TextEditorContext?after=copy">
- <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
- style="push" tooltip="Copy Qualified Name">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="menu:edit?after=copy">
- <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
- style="push" tooltip="Copy Qualified Name">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
- <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
- style="push" tooltip="Copy Qualified Name">
- <visibleWhen checkEnabled="false">
- <and>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
- <iterate>
- <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
- </iterate>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
- <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
- commandId="org.eclipse.xtext.ui.editor.FindReferences">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
-
-<!-- adding resource factories -->
-
- <extension
- point="org.eclipse.emf.ecore.extension_parser">
- <parser
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
- type="css">
- </parser>
- </extension>
- <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
- <resourceServiceProvider
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
- uriExtension="css">
- </resourceServiceProvider>
- </extension>
-
-
- <!-- marker definitions for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
- <extension
- id="css.check.fast"
- name="CSS Problem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.xtext.ui.check.fast"/>
- <persistent value="true"/>
- </extension>
- <extension
- id="css.check.normal"
- name="CSS Problem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.xtext.ui.check.normal"/>
- <persistent value="true"/>
- </extension>
- <extension
- id="css.check.expensive"
- name="CSS Problem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.xtext.ui.check.expensive"/>
- <persistent value="true"/>
- </extension>
-
- <extension
- point="org.eclipse.xtext.builder.participant">
- <participant
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
- fileExtensions="css"
- >
- </participant>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.preferencePage"
- name="Compiler">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.propertyPage"
- name="Compiler">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject"/>
- </enabledWhen>
- <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
- </page>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
- <command
- commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.OpenGeneratedCode"
- style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
- commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
- <activeWhen>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </activeWhen>
- </handler>
- </extension>
-
- <!-- Quick Outline -->
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
- commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Open the quick outline."
- id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
- name="Quick Outline">
- </command>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.open">
- <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
- style="push"
- tooltip="Open Quick Outline">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened"/>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <!-- quickfix marker resolution generator for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
- <extension
- point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
- markerType="org.eclipse.papyrus.infra.gmfdiag.css3.ui.css.check.fast">
- <attribute
- name="FIXABLE_KEY"
- value="true">
- </attribute>
- </markerResolutionGenerator>
- <markerResolutionGenerator
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
- markerType="org.eclipse.papyrus.infra.gmfdiag.css3.ui.css.check.normal">
- <attribute
- name="FIXABLE_KEY"
- value="true">
- </attribute>
- </markerResolutionGenerator>
- <markerResolutionGenerator
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
- markerType="org.eclipse.papyrus.infra.gmfdiag.css3.ui.css.check.expensive">
- <attribute
- name="FIXABLE_KEY"
- value="true">
- </attribute>
- </markerResolutionGenerator>
- </extension>
- <!-- Rename Refactoring -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
- commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.edit">
- <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
- style="push">
- <visibleWhen checkEnabled="false">
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.refactoring"
- name="Refactoring">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- </extension>
-
- <extension point="org.eclipse.compare.contentViewers">
- <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentViewers"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
- extensions="css">
- </viewer>
- </extension>
- <extension point="org.eclipse.compare.contentMergeViewers">
- <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentMergeViewers"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
- extensions="css" label="CSS Compare">
- </viewer>
- </extension>
- <extension point="org.eclipse.ui.editors.documentProviders">
- <provider id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.editors.documentProviders"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
- extensions="css">
- </provider>
- </extension>
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- extension="css"
- type="text">
- </fileTypes>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="css"
+ icon="icons/sourceEditor.gif"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ name="Papyrus CSS Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <!-- copy qualified name -->
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
+ <activeWhen>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
+ <activeWhen>
+ <and>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened">
+ <and>
+ <reference definitionId="isXtextEditorActive"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ name="CSS">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ name="CSS">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"
+ label="CSS"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
+ name="Validate">
+ </command>
+ <!-- copy qualified name -->
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <!-- copy qualified name -->
+ <menuContribution locationURI="popup:#TextEditorContext?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="menu:edit?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="css">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="css">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
+ <extension
+ id="css.check.fast"
+ name="CSS Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="css.check.normal"
+ name="CSS Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="css.check.expensive"
+ name="CSS Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
+ fileExtensions="css"
+ >
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
+ <command
+ commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.OpenGeneratedCode"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
+ commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
+ <activeWhen>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </activeWhen>
+ </handler>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui.css.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui.css.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui.css.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <!-- Rename Refactoring -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
+ commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.refactoring"
+ name="Refactoring">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.compare.contentViewers">
+ <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentViewers"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="css">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentMergeViewers"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="css" label="CSS Compare">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.editors.documentProviders"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+ extensions="css">
+ </provider>
+ </extension>
+ <extension point="org.eclipse.team.core.fileTypes">
+ <fileTypes
+ extension="css"
+ type="text">
+ </fileTypes>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml
index 5d5d6b9a034..debd4cd3c07 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
@@ -51,4 +49,4 @@
</plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java
index 65c1e2280d3..4c6d6a484b8 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
+ * Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
@@ -19,21 +20,21 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
-import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.jface.text.contentassist.CompletionProposal;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.NamedStyleProperties;
+import org.eclipse.papyrus.infra.gmfdiag.css.service.StylingService;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.IdentifierTok;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
-import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
@@ -49,8 +50,8 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
/** The Constant colorNames. */
static final Set<String> colorNames = new LinkedHashSet<String>();
- /** The Constant umlProperties. */
- static final Set<String> umlProperties = new LinkedHashSet<String>();
+ /** The CSS properties of supported semantic classes. */
+ static final Set<String> semanticProperties;
static {
colorNames.add("aliceblue");//$NON-NLS-1$
@@ -202,26 +203,16 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
}
static {
- for (EClassifier umlMetaclass : UMLPackage.eINSTANCE.getEClassifiers()) {
- if (umlMetaclass instanceof EClass) {
- EClass umlClass = (EClass) umlMetaclass;
- for (EAttribute attribute : umlClass.getEAllAttributes()) {
- umlProperties.add(attribute.getName());
- }
-
- for (EReference reference : umlClass.getEAllReferences()) {
- EClassifier type = reference.getEType();
- if (type instanceof EClass) {
- EClass eType = (EClass) type;
- if (EMFHelper.isSubclass(eType, UMLPackage.eINSTANCE.getNamedElement())) {
- umlProperties.add(reference.getName());
- }
- }
- }
- }
- }
+ semanticProperties = supportedSemanticCSSClasses()
+ .flatMap(cssClass -> cssClass.getEAllStructuralFeatures().stream())
+ .filter(StylingService.getInstance().getSemanticPropertySupportedPredicate())
+ .map(EStructuralFeature::getName)
+ .collect(Collectors.toCollection(LinkedHashSet::new));
}
+ private static Stream<EClass> supportedSemanticCSSClasses() {
+ return StreamSupport.stream(StylingService.getInstance().getSupportedSemanticClasses().spliterator(), false);
+ }
/**
* Gets the custom properties.
@@ -486,14 +477,10 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
@Override
public void complete_selector(final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
super.complete_selector(model, ruleCall, context, acceptor);
- for (EClassifier umlMetaclass : UMLPackage.eINSTANCE.getEClassifiers()) {
- if (umlMetaclass instanceof EClass) {
- EClass umlClass = (EClass) umlMetaclass;
- if (umlClass.getName().contains(context.getPrefix())) {
- acceptor.accept(buildProposal(umlClass.getName(), context));
- }
- }
- }
+
+ supportedSemanticCSSClasses()
+ .filter(cssClass -> cssClass.getName().contains(context.getPrefix()))
+ .forEach(cssClass -> acceptor.accept(buildProposal(cssClass.getName(), context)));
String[] otherSemanticElements = new String[] {
"Compartment", //$NON-NLS-1$
@@ -529,9 +516,9 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
prefix = prefix.substring(1);
}
- for (String umlProperty : umlProperties) {
- if (umlProperty.contains(prefix)) {
- acceptor.accept(buildProposal(umlProperty, context));
+ for (String semanticProperty : semanticProperties) {
+ if (semanticProperty.contains(prefix)) {
+ acceptor.accept(buildProposal(semanticProperty, context));
}
}
} else {
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/pom.xml
index 44b3301c6c2..7a15b3ee14b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css3.xtext</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
@@ -51,4 +49,4 @@
</plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/pom.xml b/plugins/infra/gmfdiag/css/pom.xml
new file mode 100644
index 00000000000..cc53d9256a6
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus Diagram CSS Support</name>
+ <description>Implementation of CSS styling and other functions in GMF-based diagrams.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.infra.gmfdiag.css</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.css.configuration</module>
+ <!-- org.eclipse.papyrus.infra.gmfdiag.css.debug is in the Dev Build (?!) -->
+ <module>org.eclipse.papyrus.infra.gmfdiag.css.properties</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.css.theme</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.css3.xtext</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui</module>
+ </modules>
+</project>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/pom.xml
index ba8a1c3fdc0..cb528176aa6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.extensionpoints.editors</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml
index 5a2e90ce89f..457f16020be 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.canonical</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.classpath
index 2d1a4302f04..eca7bdba8f0 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.classpath
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.classpath
@@ -1,7 +1,7 @@
-<?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>
+<?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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..b3aa6d60f94 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.settings/org.eclipse.jdt.core.prefs
@@ -1,291 +1,291 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=260
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=false
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=260
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
index fbc21a71a93..d7098a42fba 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
@@ -1,30 +1,31 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui.workbench,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.common.core,
- org.eclipse.emf.common,
- org.eclipse.gef,
- org.eclipse.emf.workspace;bundle-version="1.4.0",
- org.eclipse.emf.transaction.ui;bundle-version="1.4.0",
- org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
- org.eclipse.core.expressions;bundle-version="3.4.500",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.commands,
- org.eclipse.papyrus.commands.util,
- org.eclipse.papyrus.commands.wrappers
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.commands.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.commands;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui.workbench,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.emf.common,
+ org.eclipse.gef,
+ org.eclipse.emf.workspace;bundle-version="1.4.0",
+ org.eclipse.emf.transaction.ui;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
+ org.eclipse.core.expressions;bundle-version="3.4.500",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="1.2.0";visibility:=reexport
+Export-Package: org.eclipse.papyrus.commands,
+ org.eclipse.papyrus.commands.util,
+ org.eclipse.papyrus.commands.wrappers
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.commands.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.commands;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/pom.xml
index 344ef62fbcd..b8e09e29ea7 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.commands</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/historyListeners.exsd b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/historyListeners.exsd
index 16f042831a6..400062f555d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/historyListeners.exsd
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/historyListeners.exsd
@@ -13,7 +13,7 @@
<element name="extension">
<annotation>
<appinfo>
- <meta.element />
+ <meta.element deprecated="true" replacement="org.eclipse.papyrus.infra.emf.gmf.historyListeners" />
</appinfo>
</annotation>
<complexType>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/operationApprover.exsd b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/operationApprover.exsd
index 1b3e020a89a..5cd1009f43e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/operationApprover.exsd
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/schema/operationApprover.exsd
@@ -1,78 +1,78 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.commands" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.commands" id="operationApprover" name="operationApprover"/>
- </appinfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="operationApprover" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="operationApprover">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.core.commands.operations.IOperationApprover2"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="priority" type="string">
- <annotation>
- <documentation>
- An integer value representing the priority of the operationApprover.
-High value means the operationApprover will be checked before those with lower value.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
-
-
-
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.commands" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.commands" id="operationApprover" name="operationApprover"/>
+ </appinfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element deprecated="true" replacement="org.eclipse.papyrus.infra.emf.gmf.operationApprovers" />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operationApprover" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="operationApprover">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.core.commands.operations.IOperationApprover2"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ An integer value representing the priority of the operationApprover.
+High value means the operationApprover will be checked before those with lower value.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+
+
+
+
+
+</schema>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/Activator.java
index 5a2a149874e..db4ed64cd02 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/Activator.java
@@ -1,74 +1,89 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos.
- *
- *
- * 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:
- * Vincent Hemery (Atos) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.commands;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.commands"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /** The log helper */
- public static LogHelper log = new LogHelper();
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- // register the log helper
- log.setPlugin(plugin);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 Atos, Christian W. Damus, 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:
+ * Vincent Hemery (Atos) - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.commands;
+
+import java.util.function.BinaryOperator;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.emf.gmf.command.ICommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.commands"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** The log helper */
+ public static LogHelper log = new LogHelper();
+
+ // Teach the infra layer how to deal with GEF commands
+ static {
+ // The registry prefers the GMFtoGEFCommandWrapper for GMF ICommands
+ ICommandWrapper.REGISTRY.registerUnwrapper(ICommandProxy.class, ICommand.class,
+ ICommandProxy::getICommand);
+ // The registry prefers the GEFtoGMFCommandWrapper for GEF Commands
+ ICommandWrapper.REGISTRY.registerUnwrapper(CommandProxy.class, Command.class,
+ CommandProxy::getCommand);
+
+ @SuppressWarnings("deprecation")
+ BinaryOperator<Command> gefComposer = org.eclipse.papyrus.commands.util.NonDirtyingUtils::chain;
+ CommandUtils.REGISTRY.registerComposer(Command.class, gefComposer);
+ CommandUtils.REGISTRY.registerDecomposer(CompoundCommand.class, CompoundCommand::getCommands);
+ CommandUtils.REGISTRY.registerLabeller(Command.class, Command::getLabel);
+ }
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ // register the log helper
+ log.setPlugin(plugin);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedDiagramCommandStack.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedDiagramCommandStack.java
index 6a9ec578fa3..45f8c6d22d1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedDiagramCommandStack.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedDiagramCommandStack.java
@@ -1,89 +1,90 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos, CEA, 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:
- * Vincent Hemery (Atos) - Initial API and implementation
- * Christian W. Damus (CEA) - bug 421411
- * Christian W. Damus (CEA) - bug 384169
- *
- *****************************************************************************/
-package org.eclipse.papyrus.commands;
-
-import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
-import org.eclipse.papyrus.commands.util.NonDirtyingUtils;
-
-/**
- * This DiagramCommandStack uses CheckedOperationHistory instead of the default one.
- *
- * @author vhemery
- */
-public class CheckedDiagramCommandStack extends DiagramCommandStack {
-
- protected IOperationHistory operationHistory;
-
- public CheckedDiagramCommandStack(IDiagramEditDomain editDomain) {
- super(editDomain);
- operationHistory = CheckedOperationHistory.getInstance();
- }
-
- @Override
- protected IOperationHistory getOperationHistory() {
- return operationHistory;
- }
-
- @Override
- public void execute(Command command, IProgressMonitor progressMonitor) {
- if ((command != null) && command.canExecute()) {
- execute(wrap(command), progressMonitor);
- }
- }
-
- private ICommand wrap(Command command) {
- if (command instanceof CompoundCommand) {
- CompositeCommand composite = new CompositeCommand(command.getLabel());
- Object[] subCommands = ((CompoundCommand) command).getChildren();
-
- for (int i = 0; i < subCommands.length; i++) {
- composite.compose(wrap((Command) subCommands[i]));
- }
- return composite.reduce();
- }
-
- if (command instanceof ICommandProxy) {
- return getICommand(((ICommandProxy) command).getICommand());
- }
-
- if (null != command) {
- // Handle possible non-dirtying command
- return NonDirtyingUtils.wrap(command);
- } else {
- return null;
- }
- }
-
- @Override
- public void dispose() {
- // Flush my undo context
- IUndoContext context = getUndoContext();
- if ((context != null) && (operationHistory != null)) {
- operationHistory.dispose(context, true, true, true);
- }
-
- super.dispose();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 Atos, CEA, 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:
+ * Vincent Hemery (Atos) - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 421411
+ * Christian W. Damus (CEA) - bug 384169
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.commands;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
+import org.eclipse.papyrus.commands.util.NonDirtyingUtils;
+import org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory;
+
+/**
+ * This DiagramCommandStack uses CheckedOperationHistory instead of the default one.
+ *
+ * @author vhemery
+ */
+public class CheckedDiagramCommandStack extends DiagramCommandStack {
+
+ protected IOperationHistory operationHistory;
+
+ public CheckedDiagramCommandStack(IDiagramEditDomain editDomain) {
+ super(editDomain);
+ operationHistory = CheckedOperationHistory.getInstance();
+ }
+
+ @Override
+ protected IOperationHistory getOperationHistory() {
+ return operationHistory;
+ }
+
+ @Override
+ public void execute(Command command, IProgressMonitor progressMonitor) {
+ if ((command != null) && command.canExecute()) {
+ execute(wrap(command), progressMonitor);
+ }
+ }
+
+ private ICommand wrap(Command command) {
+ if (command instanceof CompoundCommand) {
+ CompositeCommand composite = new CompositeCommand(command.getLabel());
+ Object[] subCommands = ((CompoundCommand) command).getChildren();
+
+ for (int i = 0; i < subCommands.length; i++) {
+ composite.compose(wrap((Command) subCommands[i]));
+ }
+ return composite.reduce();
+ }
+
+ if (command instanceof ICommandProxy) {
+ return getICommand(((ICommandProxy) command).getICommand());
+ }
+
+ if (null != command) {
+ // Handle possible non-dirtying command
+ return NonDirtyingUtils.wrap(command);
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public void dispose() {
+ // Flush my undo context
+ IUndoContext context = getUndoContext();
+ if ((context != null) && (operationHistory != null)) {
+ operationHistory.dispose(context, true, true, true);
+ }
+
+ super.dispose();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedOperationHistory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedOperationHistory.java
index 4c12684795c..76b15d44ca4 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedOperationHistory.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/CheckedOperationHistory.java
@@ -1,319 +1,164 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos, CEA, 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:
- * Mathieu Velten (Atos) - Initial API and implementation
- * Christian W. Damus (CEA) - bug 357250, bug 323802
- *
- *****************************************************************************/
-package org.eclipse.papyrus.commands;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.ICompositeOperation;
-import org.eclipse.core.commands.operations.IOperationApprover;
-import org.eclipse.core.commands.operations.IOperationApprover2;
-import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IOperationHistoryListener;
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.workspace.EMFCommandOperation;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-
-public class CheckedOperationHistory implements IOperationHistory {
-
- private static class CheckedOperationHistoryHolder {
-
- public static final CheckedOperationHistory instance = new CheckedOperationHistory();
- }
-
- public static CheckedOperationHistory getInstance() {
- return CheckedOperationHistoryHolder.instance;
- }
-
- protected static final IOperationApprover2[] approversArray;
-
- protected IOperationHistory history;
-
- private static class ApproverPriorityPair implements Comparable<ApproverPriorityPair> {
-
- public IOperationApprover2 approver;
-
- public int priority;
-
- public int compareTo(ApproverPriorityPair o) {
- if (o.priority > priority) {
- return 1;
- } else if (o.priority < priority) {
- return -1;
- } else {
- return 0;
- }
- }
-
- }
-
- static {
- IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID, "operationApprover"); //$NON-NLS-1$
-
- List<ApproverPriorityPair> approverPriorityPairs = new LinkedList<ApproverPriorityPair>();
- for (IConfigurationElement elem : configElements) {
- if ("operationApprover".equals(elem.getName())) { //$NON-NLS-1$
- try {
- ApproverPriorityPair approverPriorityPair = new ApproverPriorityPair();
- approverPriorityPair.approver = (IOperationApprover2) elem.createExecutableExtension("class"); //$NON-NLS-1$
- approverPriorityPair.priority = Integer.parseInt(elem.getAttribute("priority")); //$NON-NLS-1$
-
- approverPriorityPairs.add(approverPriorityPair);
- } catch (Exception e) {
- Activator.log.error("Uncaught exception in instantiation of operation approver.", e); //$NON-NLS-1$
- }
- }
- }
-
- Collections.sort(approverPriorityPairs);
-
- approversArray = new IOperationApprover2[approverPriorityPairs.size()];
-
- for (int i = 0; i < approversArray.length; i++) {
- approversArray[i] = approverPriorityPairs.get(i).approver;
- }
- }
-
- private CheckedOperationHistory() {
- history = OperationHistoryFactory.getOperationHistory();
-
- addRegisteredListeners(history);
- }
-
- /*
- * Consult the IOperationApprovers to see if the proposed redo should be
- * allowed.
- */
- protected IStatus getRedoApproval(IUndoableOperation operation, IAdaptable info) {
- operation = unwrap(operation);
- for (int i = 0; i < approversArray.length; i++) {
- IStatus approval = approversArray[i].proceedRedoing(operation, this, info);
- if (!approval.isOK()) {
- return approval;
- }
- }
- return Status.OK_STATUS;
- }
-
- /*
- * Consult the IOperationApprovers to see if the proposed undo should be
- * allowed.
- */
- protected IStatus getUndoApproval(IUndoableOperation operation, IAdaptable info) {
- operation = unwrap(operation);
- for (int i = 0; i < approversArray.length; i++) {
- IStatus approval = approversArray[i].proceedUndoing(operation, this, info);
- if (!approval.isOK()) {
- return approval;
- }
- }
- return Status.OK_STATUS;
- }
-
- /*
- * Consult the IOperationApprovers to see if the proposed execution should
- * be allowed.
- *
- * @since 3.2
- */
- protected IStatus getExecuteApproval(IUndoableOperation operation, IAdaptable info) {
- operation = unwrap(operation);
- for (int i = 0; i < approversArray.length; i++) {
- IStatus approval = approversArray[i].proceedExecuting(operation, this, info);
- if (!approval.isOK()) {
- return approval;
- }
- }
- return Status.OK_STATUS;
- }
-
- /**
- * the unified command stack wraps ICommand GMFtoEMFCommandWrapper
- * which are wrapped in EMFCommandOperation,
- * unwrap it before validation
- *
- * @param operation
- * @return
- */
- protected IUndoableOperation unwrap(IUndoableOperation operation) {
- if (operation instanceof EMFCommandOperation) {
- Command emfCommand = ((EMFCommandOperation) operation).getCommand();
- if (emfCommand instanceof GMFtoEMFCommandWrapper) {
- ICommand gmfCommand = ((GMFtoEMFCommandWrapper) emfCommand).getGMFCommand();
- if (gmfCommand != null) {
- return gmfCommand;
- }
- }
- }
-
- return operation;
- }
-
- public IStatus execute(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // check with the operation approvers
- IStatus status = getExecuteApproval(operation, info);
- if (!status.isOK()) {
- // not approved. No notifications are sent, just return the status.
- return status;
- }
- return history.execute(operation, monitor, info);
- }
-
- public IStatus undo(IUndoContext context, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Assert.isNotNull(context);
- IUndoableOperation operation = getUndoOperation(context);
-
- // info if there is no operation
- if (operation == null) {
- return IOperationHistory.NOTHING_TO_UNDO_STATUS;
- }
-
- // check with the operation approvers
- IStatus status = getUndoApproval(operation, info);
- if (!status.isOK()) {
- // not approved. No notifications are sent, just return the status.
- return status;
- }
- return history.undo(context, monitor, info);
- }
-
- public IStatus redo(IUndoContext context, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Assert.isNotNull(context);
- IUndoableOperation operation = getRedoOperation(context);
-
- // info if there is no operation
- if (operation == null) {
- return IOperationHistory.NOTHING_TO_REDO_STATUS;
- }
-
- // check with the operation approvers
- IStatus status = getRedoApproval(operation, info);
- if (!status.isOK()) {
- // not approved. No notifications are sent, just return the status.
- return status;
- }
- return history.redo(context, monitor, info);
- }
-
- private static void addRegisteredListeners(IOperationHistory history) {
- IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID, "historyListeners"); //$NON-NLS-1$
-
- for (IConfigurationElement elem : configElements) {
- if ("historyListener".equals(elem.getName())) { //$NON-NLS-1$
- try {
- IOperationHistoryListener listener = (IOperationHistoryListener) elem.createExecutableExtension("class"); //$NON-NLS-1$
- history.addOperationHistoryListener(listener);
- } catch (Exception e) {
- Activator.log.error("Uncaught exception in instantiation of operation history listener.", e); //$NON-NLS-1$
- }
- }
- }
- }
-
- // all the following methods are pure delegation
-
- public IStatus undoOperation(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- return history.undoOperation(operation, monitor, info);
- }
-
- public void setLimit(IUndoContext context, int limit) {
- history.setLimit(context, limit);
- }
-
- public void replaceOperation(IUndoableOperation operation, IUndoableOperation[] replacements) {
- history.replaceOperation(operation, replacements);
- }
-
- public void removeOperationHistoryListener(IOperationHistoryListener listener) {
- history.removeOperationHistoryListener(listener);
- }
-
- public void removeOperationApprover(IOperationApprover approver) {
- history.removeOperationApprover(approver);
- }
-
- public IStatus redoOperation(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- return history.redoOperation(operation, monitor, info);
- }
-
- public void operationChanged(IUndoableOperation operation) {
- history.operationChanged(operation);
- }
-
- public void openOperation(ICompositeOperation operation, int mode) {
- history.openOperation(operation, mode);
- }
-
- public IUndoableOperation getUndoOperation(IUndoContext context) {
- return history.getUndoOperation(context);
- }
-
- public IUndoableOperation[] getUndoHistory(IUndoContext context) {
- return history.getUndoHistory(context);
- }
-
- public IUndoableOperation getRedoOperation(IUndoContext context) {
- return history.getRedoOperation(context);
- }
-
- public IUndoableOperation[] getRedoHistory(IUndoContext context) {
- return history.getRedoHistory(context);
- }
-
- public int getLimit(IUndoContext context) {
- return history.getLimit(context);
- }
-
- public void dispose(IUndoContext context, boolean flushUndo, boolean flushRedo, boolean flushContext) {
- history.dispose(context, flushUndo, flushRedo, flushContext);
- }
-
- public void closeOperation(boolean operationOK, boolean addToHistory, int mode) {
- history.closeOperation(operationOK, addToHistory, mode);
- }
-
- public boolean canUndo(IUndoContext context) {
- return history.canUndo(context);
- }
-
- public boolean canRedo(IUndoContext context) {
- return history.canRedo(context);
- }
-
- public void addOperationHistoryListener(IOperationHistoryListener listener) {
- history.addOperationHistoryListener(listener);
- }
-
- public void addOperationApprover(IOperationApprover approver) {
- history.addOperationApprover(approver);
- }
-
- public void add(IUndoableOperation operation) {
- history.add(operation);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 Atos, CEA, Christian W. Damus, 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:
+ * Mathieu Velten (Atos) - Initial API and implementation
+ * Christian W. Damus (CEA) - bugs 357250, 323802
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.ICompositeOperation;
+import org.eclipse.core.commands.operations.IOperationApprover;
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory} API, instead.
+ */
+@Deprecated
+public class CheckedOperationHistory implements IOperationHistory {
+
+ private static class CheckedOperationHistoryHolder {
+
+ public static final CheckedOperationHistory instance = new CheckedOperationHistory();
+ }
+
+ public static CheckedOperationHistory getInstance() {
+ return CheckedOperationHistoryHolder.instance;
+ }
+
+ private final IOperationHistory delegate = org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.getInstance();
+
+ private CheckedOperationHistory() {
+ super();
+ }
+
+ @Override
+ public void add(IUndoableOperation operation) {
+ delegate.add(operation);
+ }
+
+ @Override
+ public void addOperationApprover(IOperationApprover approver) {
+ delegate.addOperationApprover(approver);
+ }
+
+ @Override
+ public void addOperationHistoryListener(IOperationHistoryListener listener) {
+ delegate.addOperationHistoryListener(listener);
+ }
+
+ @Override
+ public void closeOperation(boolean operationOK, boolean addToHistory, int mode) {
+ delegate.closeOperation(operationOK, addToHistory, mode);
+ }
+
+ @Override
+ public boolean canRedo(IUndoContext context) {
+ return delegate.canRedo(context);
+ }
+
+ @Override
+ public boolean canUndo(IUndoContext context) {
+ return delegate.canUndo(context);
+ }
+
+ @Override
+ public void dispose(IUndoContext context, boolean flushUndo, boolean flushRedo, boolean flushContext) {
+ delegate.dispose(context, flushUndo, flushRedo, flushContext);
+ }
+
+ @Override
+ public IStatus execute(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ return delegate.execute(operation, monitor, info);
+ }
+
+ @Override
+ public int getLimit(IUndoContext context) {
+ return delegate.getLimit(context);
+ }
+
+ @Override
+ public IUndoableOperation[] getRedoHistory(IUndoContext context) {
+ return delegate.getRedoHistory(context);
+ }
+
+ @Override
+ public IUndoableOperation getRedoOperation(IUndoContext context) {
+ return delegate.getRedoOperation(context);
+ }
+
+ @Override
+ public IUndoableOperation[] getUndoHistory(IUndoContext context) {
+ return delegate.getUndoHistory(context);
+ }
+
+ @Override
+ public void openOperation(ICompositeOperation operation, int mode) {
+ delegate.openOperation(operation, mode);
+ }
+
+ @Override
+ public void operationChanged(IUndoableOperation operation) {
+ delegate.operationChanged(operation);
+ }
+
+ @Override
+ public IUndoableOperation getUndoOperation(IUndoContext context) {
+ return delegate.getUndoOperation(context);
+ }
+
+ @Override
+ public IStatus redo(IUndoContext context, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ return delegate.redo(context, monitor, info);
+ }
+
+ @Override
+ public IStatus redoOperation(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ return delegate.redoOperation(operation, monitor, info);
+ }
+
+ @Override
+ public void removeOperationApprover(IOperationApprover approver) {
+ delegate.removeOperationApprover(approver);
+ }
+
+ @Override
+ public void removeOperationHistoryListener(IOperationHistoryListener listener) {
+ delegate.removeOperationHistoryListener(listener);
+ }
+
+ @Override
+ public void replaceOperation(IUndoableOperation operation, IUndoableOperation[] replacements) {
+ delegate.replaceOperation(operation, replacements);
+ }
+
+ @Override
+ public void setLimit(IUndoContext context, int limit) {
+ delegate.setLimit(context, limit);
+ }
+
+ @Override
+ public IStatus undo(IUndoContext context, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ return delegate.undo(context, monitor, info);
+ }
+
+ @Override
+ public IStatus undoOperation(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ return delegate.undoOperation(operation, monitor, info);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/INonDirtying.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/INonDirtying.java
index 25800754378..01961958638 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/INonDirtying.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/INonDirtying.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*/
package org.eclipse.papyrus.commands;
@@ -20,7 +21,10 @@ import org.eclipse.emf.common.command.Command;
* A marker interface for GMF and GEF commands that are non-dirtying. For EMF {@link Command}s, use the {@link AbstractCommand.NonDirtying} interface.
*
* @see AbstractCommand.NonDirtying
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying} API, instead.
*/
-public interface INonDirtying {
+@Deprecated
+public interface INonDirtying extends org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying {
// Just a marker interface
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NestingNotifyingWorkspaceCommandStack.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NestingNotifyingWorkspaceCommandStack.java
index 8abf20e29dc..2e64c17bf91 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NestingNotifyingWorkspaceCommandStack.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NestingNotifyingWorkspaceCommandStack.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - adapted for self-nesting behaviour
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.commands;
@@ -20,7 +21,10 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.transaction.RollbackException;
-
+/**
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.NestingNotifyingWorkspaceCommandStack} API, instead.
+ */
+@Deprecated
public class NestingNotifyingWorkspaceCommandStack extends NotifyingWorkspaceCommandStack {
private NestingNotifyingWorkspaceCommandStack childCommandStack;
@@ -48,10 +52,12 @@ public class NestingNotifyingWorkspaceCommandStack extends NotifyingWorkspaceCom
private static IUndoContext computeNestedUndoContext() {
return new IUndoContext() {
+ @Override
public boolean matches(IUndoContext context) {
return context == this;
}
+ @Override
public String getLabel() {
return "Nested Undo Context";
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java
index 958bb7e90c6..35f99697feb 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java
@@ -1,663 +1,38 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2015 Atos, CEA, Christian W. Damus, 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:
- * Mathieu Velten (Atos) - Initial API and implementation
- * Arthur Daussy (Atos) - 363826: [Model Explorer] Drag and drop and undo, incorrect behavior
- * Christian W. Damus (CEA) - 404220: Add contexts for tracking objects changed by operations (CDO)
- * Christian W. Damus (CEA) - bug 402525
- * Christian W. Damus (CEA) - bug 430648
- * Christian W. Damus (CEA) - bug 431023
- * Christian W. Damus (CEA) - bug 384169
- * Christian W. Damus - bug 459746
- *
- *****************************************************************************/
-package org.eclipse.papyrus.commands;
-
-import static org.eclipse.papyrus.commands.util.OperationUtils.anyDirtying;
-import static org.eclipse.papyrus.commands.util.OperationUtils.isDirty;
-
-import java.util.Collection;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IOperationHistoryListener;
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.commands.operations.OperationHistoryEvent;
-import org.eclipse.core.commands.operations.UndoContext;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStackListener;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.ResourceSetChangeEvent;
-import org.eclipse.emf.transaction.ResourceSetListenerImpl;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack;
-import org.eclipse.emf.transaction.impl.EMFCommandTransaction;
-import org.eclipse.emf.transaction.impl.InternalTransaction;
-import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain;
-import org.eclipse.emf.transaction.impl.TriggerCommandTransaction;
-import org.eclipse.emf.transaction.util.TriggerCommand;
-import org.eclipse.emf.workspace.EMFCommandOperation;
-import org.eclipse.emf.workspace.IResourceUndoContextPolicy;
-import org.eclipse.emf.workspace.IWorkspaceCommandStack;
-import org.eclipse.emf.workspace.ResourceUndoContext;
-import org.eclipse.emf.workspace.impl.EMFOperationTransaction;
-import org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl;
-import org.eclipse.emf.workspace.internal.EMFWorkspacePlugin;
-import org.eclipse.emf.workspace.internal.EMFWorkspaceStatusCodes;
-import org.eclipse.emf.workspace.internal.Tracing;
-import org.eclipse.emf.workspace.internal.l10n.Messages;
-import org.eclipse.gmf.runtime.emf.commands.core.command.EditingDomainUndoContext;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.commands.util.NonDirtyingUtils;
-
-/**
- * Copied from WorkspaceCommandStackImpl but modify in order to change the
- * IUndoContext. We want to make it point the the TransactionalEditingDomain. To
- * see what really change in this class from original implementation look for
- * "HAS CHANGE FROM ORIGINAL IMPLEMENTATION" in Java Doc.
- *
- */
-public class NotifyingWorkspaceCommandStack extends AbstractTransactionalCommandStack// AbstractTransactionalCommandStack
- implements IWorkspaceCommandStack {
-
- private final IOperationHistory history;
-
- private DomainListener domainListener;
-
- private IResourceUndoContextPolicy undoContextPolicy = IResourceUndoContextPolicy.DEFAULT;
-
- private IUndoableOperation currentOperation;
-
- private Set<Resource> historyAffectedResources;
-
- /**
- * HAS CHANGE FROM ORIGINAL IMPLEMENTATION TO USE {@link EditingDomainUndoContext}
- */
- private IUndoContext defaultContext = null;
-
- private IUndoContext savedContext = null;
-
- private IUndoableOperation mostRecentOperation;
-
- /**
- * Initializes me with the operation history to which I delegate command
- * execution.
- *
- * @param history
- * my operation history
- */
- public NotifyingWorkspaceCommandStack(IOperationHistory history) {
- super();
- this.history = history;
- domainListener = new DomainListener();
- defaultContext = new UndoContext() {
-
- @Override
- public String getLabel() {
- return getDefaultUndoContextLabel();
- }
-
- @Override
- public String toString() {
- return getLabel();
- }
- };
- }
-
- /**
- * map with registered listeners and the corresponding proxy registered to
- * actual map
- */
- private Map<CommandStackListener, IOperationHistoryListener> proxyOperationListeners = new HashMap<CommandStackListener, IOperationHistoryListener>();
-
- @Override
- public void addCommandStackListener(final CommandStackListener listener) {
- removeCommandStackListener(listener);
- IOperationHistoryListener proxy = new IOperationHistoryListener() {
-
- public void historyNotification(OperationHistoryEvent event) {
- int type = event.getEventType();
- // emf stack only needs to be notified when an operation is
- // finished
- if (OperationHistoryEvent.DONE == type || OperationHistoryEvent.REDONE == type || OperationHistoryEvent.UNDONE == type) {
- listener.commandStackChanged(new EventObject(NotifyingWorkspaceCommandStack.this));
- }
- }
- };
- getOperationHistory().addOperationHistoryListener(proxy);
- proxyOperationListeners.put(listener, proxy);
- }
-
- @Override
- public void removeCommandStackListener(CommandStackListener listener) {
- IOperationHistoryListener proxy = proxyOperationListeners.remove(listener);
- if (proxy != null) {
- getOperationHistory().removeOperationHistoryListener(proxy);
- }
- }
-
- /**
- * Extends the superclass implementation to add/remove listeners on the
- * editing domain. HAS CHANGE FROM ORIGINAL IMPLEMENTATION TO USE {@link EditingDomainUndoContext}
- */
- @Override
- public void setEditingDomain(InternalTransactionalEditingDomain domain) {
- InternalTransactionalEditingDomain oldDomain = getDomain();
- if (oldDomain != null) {
- oldDomain.removeResourceSetListener(domainListener);
- history.removeOperationHistoryListener(domainListener);
- }
- super.setEditingDomain(domain);
- /*
- * HAS CHANGE FROM ORIGINAL IMPLEMENTATION TO USE {@link
- * EditingDomainUndoContext}
- */
- if (getDomain() != null) {
- boolean domainHasChanged = oldDomain == null || !oldDomain.equals(getDomain());
- if (domainHasChanged) {
- defaultContext = new EditingDomainUndoContext(domain, getDefaultUndoContextLabel());
- }
- }
- if (domain != null) {
- history.addOperationHistoryListener(domainListener);
- domain.addResourceSetListener(domainListener);
- }
- }
-
- // Documentation copied from the method specification
- public final IOperationHistory getOperationHistory() {
- return history;
- }
-
- // Documentation copied from the method specification
- public IUndoContext getDefaultUndoContext() {
- return defaultContext;
- }
-
- /**
- * Obtains the label to display for the default undo context that I apply to
- * operations executed through me as {@link Command}s. Subclasses may
- * override to customize the label.
- *
- * @return my default undo context label
- *
- * @since 1.2
- */
- protected String getDefaultUndoContextLabel() {
- String domainID = (getDomain() == null) ? null : getDomain().getID();
- if (domainID == null) {
- domainID = String.valueOf(domainID); // guaranteed to be safe
- }
- return NLS.bind(Messages.cmdStkCtxLabel, domainID);
- }
-
- private final IUndoContext getSavedContext() {
- if (savedContext == null) {
- savedContext = new UndoContext() {
-
- @Override
- public String getLabel() {
- return getSavepointUndoContextLabel();
- }
-
- @Override
- public String toString() {
- return getLabel();
- }
- };
- }
- return savedContext;
- }
-
- /**
- * Obtains the label to display for the save-point undo context that I apply
- * to the last operation in my {@linkplain #getDefaultUndoContext() default
- * undo context} that was executed at the time save was performed (as
- * indicated by invocation of the {@link #saveIsDone()} method). Subclasses
- * may override to customize the label.
- *
- * @return my save-point undo context label
- *
- * @since 1.2
- */
- protected String getSavepointUndoContextLabel() {
- String domainID = (getDomain() == null) ? null : getDomain().getID();
- if (domainID == null) {
- domainID = String.valueOf(domainID); // guaranteed to be safe
- }
- return NLS.bind(Messages.cmdStkSaveCtxLabel, domainID);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 1.1
- */
- @Override
- protected void doExecute(Command command, Map<?, ?> options) throws InterruptedException, RollbackException {
- IUndoableOperation oper = NonDirtyingUtils.wrap(getDomain(), command, options);
- // add the appropriate context
- oper.addContext(getDefaultUndoContext());
- try {
- IStatus status = history.execute(oper, new NullProgressMonitor(), null);
- if (status.getSeverity() >= IStatus.ERROR) {
- // the transaction must have rolled back if the status was
- // error or worse
- RollbackException exc = new RollbackException(status);
- Tracing.throwing(WorkspaceCommandStackImpl.class, "execute", exc); //$NON-NLS-1$
- throw exc;
- }
- notifyListeners();
- } catch (ExecutionException e) {
- Tracing.catching(WorkspaceCommandStackImpl.class, "execute", e); //$NON-NLS-1$
- command.dispose();
- if (e.getCause() instanceof RollbackException) {
- // throw the rollback
- RollbackException exc = (RollbackException) e.getCause();
- Tracing.throwing(WorkspaceCommandStackImpl.class, "execute", exc); //$NON-NLS-1$
- throw exc;
- } else if (e.getCause() instanceof RuntimeException) {
- // throw the programming error
- RuntimeException exc = (RuntimeException) e.getCause();
- Tracing.throwing(WorkspaceCommandStackImpl.class, "execute", exc); //$NON-NLS-1$
- throw exc;
- } else {
- // log the problem. We can't rethrow whatever it was
- handleError(e);
- }
- }
- }
-
- /**
- * Queries whether we can undo my default undo context in my operation
- * history.
- */
- @Override
- public boolean canUndo() {
- return getOperationHistory().canUndo(getDefaultUndoContext());
- }
-
- /**
- * Undoes my default undo context in my operation history.
- */
- @Override
- public void undo() {
- try {
- getOperationHistory().undo(getDefaultUndoContext(), new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Tracing.catching(WorkspaceCommandStackImpl.class, "undo", e); //$NON-NLS-1$
- // can't throw anything from this method
- handleError(e);
- } finally {
- // notify even if there was an error; clients should check to see
- // that the command stack is flushed
- notifyListeners();
- }
- }
-
- /**
- * Queries whether we can redo my default undo context in my operation
- * history.
- */
- @Override
- public boolean canRedo() {
- return getOperationHistory().canRedo(getDefaultUndoContext());
- }
-
- /**
- * Redoes my default undo context in my operation history.
- */
- @Override
- public void redo() {
- try {
- getOperationHistory().redo(getDefaultUndoContext(), new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Tracing.catching(WorkspaceCommandStackImpl.class, "redo", e); //$NON-NLS-1$
- // can't throw anything from this method
- handleError(e);
- } finally {
- // notify even if there was an error; clients should check to see
- // that the command stack is flushed
- notifyListeners();
- }
- }
-
- /**
- * Disposes my default undo context in my operation history.
- */
- @Override
- public void flush() {
- getOperationHistory().dispose(getDefaultUndoContext(), true, true, true);
- if (savedContext != null) {
- getOperationHistory().dispose(getSavedContext(), true, true, true);
- savedContext = null;
- }
- }
-
- /**
- * Gets the command from the most recently executed, done, or redone
- * operation.
- */
- @Override
- public Command getMostRecentCommand() {
- Command result = null;
- if (mostRecentOperation instanceof EMFCommandOperation) {
- result = ((EMFCommandOperation) mostRecentOperation).getCommand();
- }
- return result;
- }
-
- /**
- * Gets the command from the top of the undo history, if any.
- */
- @Override
- public Command getUndoCommand() {
- Command result = null;
- IUndoableOperation topOperation = getOperationHistory().getUndoOperation(getDefaultUndoContext());
- if (topOperation instanceof EMFCommandOperation) {
- result = ((EMFCommandOperation) topOperation).getCommand();
- }
- return result;
- }
-
- /**
- * Gets the command from the top of the redo history, if any.
- */
- @Override
- public Command getRedoCommand() {
- Command result = null;
- IUndoableOperation topOperation = getOperationHistory().getRedoOperation(getDefaultUndoContext());
- if (topOperation instanceof EMFCommandOperation) {
- result = ((EMFCommandOperation) topOperation).getCommand();
- }
- return result;
- }
-
- // Documentation copied from the method specification
- public EMFCommandTransaction createTransaction(Command command, Map<?, ?> options) throws InterruptedException {
- EMFCommandTransaction result;
- if (command instanceof TriggerCommand) {
- result = new TriggerCommandTransaction((TriggerCommand) command, getDomain(), options);
- } else {
- result = new EMFOperationTransaction(command, getDomain(), options);
- }
- result.start();
- return result;
- }
-
- // Documentation copied from the method specification
- public void executeTriggers(Command command, List<Command> triggers, Map<?, ?> options) throws InterruptedException, RollbackException {
- if (!triggers.isEmpty()) {
- TriggerCommand trigger = (command == null) ? new TriggerCommand(triggers) : new TriggerCommand(command, triggers);
- InternalTransaction tx = createTransaction(trigger, makeTriggerTransactionOptions(options));
- try {
- trigger.execute();
- InternalTransaction parent = (InternalTransaction) tx.getParent();
- // shouldn't be null if we're executing triggers!
- if (parent != null) {
- parent.addTriggers(trigger);
- }
- // commit the transaction now
- tx.commit();
- } catch (RuntimeException e) {
- Tracing.catching(WorkspaceCommandStackImpl.class, "executeTriggers", e); //$NON-NLS-1$
- IStatus status;
- if (e instanceof OperationCanceledException) {
- status = Status.CANCEL_STATUS;
- } else {
- status = new Status(IStatus.ERROR, EMFWorkspacePlugin.getPluginId(), EMFWorkspaceStatusCodes.PRECOMMIT_FAILED, Messages.precommitFailed, e);
- }
- RollbackException rbe = new RollbackException(status);
- Tracing.throwing(WorkspaceCommandStackImpl.class, "executeTriggers", rbe); //$NON-NLS-1$
- throw rbe;
- } finally {
- if ((tx != null) && (tx.isActive())) {
- // roll back because an uncaught exception occurred
- rollback(tx);
- }
- }
- }
- }
-
- // Documentation copied from the method specification
- public void dispose() {
- setEditingDomain(null); // remove listeners
- domainListener = null;
- historyAffectedResources = null;
- mostRecentOperation = null;
-
- // remove listeners registered in opertationHistory
- Collection<IOperationHistoryListener> values = proxyOperationListeners.values();
- for (IOperationHistoryListener proxy : values) {
- getOperationHistory().removeOperationHistoryListener(proxy);
- }
- proxyOperationListeners.clear();
-
- // Flush default and savepoint undo contexts
- flush();
- }
-
- /**
- * Obtains my resource undo-context policy.
- *
- * @return my resource undo-context policy
- *
- * @since 1.3
- */
- public IResourceUndoContextPolicy getResourceUndoContextPolicy() {
- return undoContextPolicy;
- }
-
- /**
- * Sets my resource undo-context policy.
- *
- * @param policy
- * my new policy, or <code>null</code> to restore the default
- *
- * @since 1.3
- */
- public void setResourceUndoContextPolicy(IResourceUndoContextPolicy policy) {
- this.undoContextPolicy = policy;
- }
-
- /**
- * A listener on the editing domain and operation history that tracks which
- * resources are changed by an operation and attaches the appropriate {@link ResourceUndoContext} to it when it completes.
- *
- * @author Christian W. Damus (cdamus)
- */
- private class DomainListener extends ResourceSetListenerImpl implements IOperationHistoryListener {
-
- public void historyNotification(OperationHistoryEvent event) {
- final IUndoableOperation operation = event.getOperation();
- switch (event.getEventType()) {
- case OperationHistoryEvent.ABOUT_TO_EXECUTE:
- // set up to remember affected resources in case we make EMF
- // changes
- currentOperation = operation;
- historyAffectedResources = new java.util.HashSet<Resource>();
- break;
- case OperationHistoryEvent.DONE:
- if ((historyAffectedResources != null) && !historyAffectedResources.isEmpty()) {
- // add my undo context to the operation that has
- // completed, but only if the operation actually changed
- // any of my resources (in case this history is shared
- // with other domains)
- for (Resource next : historyAffectedResources) {
- operation.addContext(new ResourceUndoContext(getDomain(), next));
- }
- }
- currentOperation = null;
- historyAffectedResources = null;
- if (operation.hasContext(getDefaultUndoContext())) {
- mostRecentOperation = operation;
- }
- break;
- case OperationHistoryEvent.OPERATION_NOT_OK:
- // just forget about the context because this operation
- // failed
- currentOperation = null;
- historyAffectedResources = null;
- break;
- case OperationHistoryEvent.UNDONE:
- case OperationHistoryEvent.REDONE:
- if (operation.hasContext(getDefaultUndoContext())) {
- mostRecentOperation = operation;
- }
- break;
- case OperationHistoryEvent.OPERATION_REMOVED:
- if (operation == mostRecentOperation) {
- mostRecentOperation = null;
- }
- break;
- }
- }
-
- @Override
- public void resourceSetChanged(ResourceSetChangeEvent event) {
- IUndoableOperation operation = null;
- Set<Resource> unloaded = getUnloadedResources(event.getNotifications());
- if (unloaded != null) {
- // dispose their undo contexts
- for (Resource next : unloaded) {
- getOperationHistory().dispose(new ResourceUndoContext(getDomain(), next), true, true, true);
- }
- }
- Transaction tx = event.getTransaction();
- if (tx != null) {
- operation = (IUndoableOperation) tx.getOptions().get(EMFWorkspacePlugin.OPTION_OWNING_OPERATION);
- }
- if (operation == null) {
- operation = currentOperation;
- }
- if (operation != null) {
- Set<Resource> affectedResources = getResourceUndoContextPolicy().getContextResources(operation, event.getNotifications());
- if (unloaded != null) {
- // don't add these resources to the operation
- affectedResources.removeAll(unloaded);
- }
- if (!affectedResources.isEmpty()) {
- // add any resource undo contexts to this operation that are
- // not already applied
- for (Resource next : affectedResources) {
- ResourceUndoContext ctx = new ResourceUndoContext(getDomain(), next);
- if (!operation.hasContext(ctx)) {
- operation.addContext(ctx);
- }
- }
- }
- if (historyAffectedResources != null) {
- // there is an operation executing on our history that is
- // affecting my editing domain. Remember the affected
- // resources.
- historyAffectedResources.addAll(affectedResources);
- }
-
- hookUndoContexts(operation, event);
- }
- }
-
- /**
- * Finds resources that have sent unload notifications.
- *
- * @param notifications
- * notifications received from a transaction
- * @return a set of resources that the notifications indicate have been
- * unloaded, or <code>null</code> if none
- */
- private Set<Resource> getUnloadedResources(Collection<Notification> notifications) {
- Set<Resource> result = null;
- for (Notification next : notifications) {
- if (NotificationFilter.RESOURCE_UNLOADED.matches(next)) {
- if (result == null) {
- result = new java.util.HashSet<Resource>();
- }
- result.add((Resource) next.getNotifier());
- }
- }
- return result;
- }
-
- @Override
- public boolean isPostcommitOnly() {
- // only interested in post-commit "resourceSetChanged" event
- return true;
- }
- }
-
- /**
- * A hook for subclasses to attach additional undo-contexts to an {@code operation} based on changes
- * in the resource set.
- *
- * @param operation
- * an operation that has been executed (never {@code null})
- * @param event
- * the description of changes made by the {@code operation} in the resource set
- */
- protected void hookUndoContexts(IUndoableOperation operation, ResourceSetChangeEvent event) {
- // pass
- }
-
-
- @Override
- public boolean isSaveNeeded() {
- // This class inherits from AbstractTransactionalCommandStack which in turn inherits from BasicCommandStack.
-
- // The operation isSaveNeeded is defined in BasicCommandStack. In order to work, it requires an update of the
- // variables "saveIndex" and "top" which is done in BasicCommandStack::execute. However, this operation is overridden
- // in method AbstractTransactionalCommandStack::execute which never calls the superclass method BasicCommandStack::execute.
- // Thus, we cannot rely on the super class method of isSaveNeeded (although it seems to work in some cases).
- // => so we have to implement the isSaveNeeded method here.
- IUndoableOperation nextUndoableOperation = history.getUndoOperation(getDefaultUndoContext());
- if (nextUndoableOperation == null) {
- // this is the last undoable operation. But the document might have been saved at some operation now on the redo stack
- return savedContext != null;
- }
- return savedContext != null ? !nextUndoableOperation.hasContext(getSavedContext()) && isDirty(history.getUndoHistory(getDefaultUndoContext()), history.getRedoHistory(getDefaultUndoContext()), history.getUndoOperation(savedContext))
- : anyDirtying(history.getUndoHistory(getDefaultUndoContext()));
- }
-
- @Override
- public void saveIsDone() {
- // See comment for isSaveNeeded
- if (savedContext != null) {
- // The save context is only stored on one operation. We must
- // remove it from any other operation that may have contained it
- // before.
- IUndoableOperation[] undoableOperations = history.getUndoHistory(getSavedContext());
- for (int i = 0; i < undoableOperations.length; i++) {
- undoableOperations[i].removeContext(getSavedContext());
- }
- IUndoableOperation[] redoableOperations = history.getRedoHistory(getSavedContext());
- for (int i = 0; i < redoableOperations.length; i++) {
- redoableOperations[i].removeContext(getSavedContext());
- }
- }
- IUndoableOperation nextUndoableOperation = history.getUndoOperation(getDefaultUndoContext());
- if (nextUndoableOperation == null) {
- // We no longer have any operation that was saved
- savedContext = null;
- return;
- }
- nextUndoableOperation.addContext(getSavedContext());
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 Atos, CEA, Christian W. Damus, 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:
+ * Mathieu Velten (Atos) - Initial API and implementation
+ * Arthur Daussy (Atos) - 363826: [Model Explorer] Drag and drop and undo, incorrect behavior
+ * Christian W. Damus (CEA) - 404220: Add contexts for tracking objects changed by operations (CDO)
+ * Christian W. Damus (CEA) - bugs 402525, 430648, 431023, 384169
+ * Christian W. Damus - bugs 459746, 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.commands;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+
+/**
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.NotifyingWorkspaceCommandStack} API, instead.
+ */
+@Deprecated
+public class NotifyingWorkspaceCommandStack extends org.eclipse.papyrus.infra.emf.gmf.command.NotifyingWorkspaceCommandStack {
+
+ /**
+ * Initializes me with the operation history to which I delegate command
+ * execution.
+ *
+ * @param history
+ * my operation history
+ */
+ public NotifyingWorkspaceCommandStack(IOperationHistory history) {
+ super(history);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java
index 9285142a88a..0da082a63b6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
+ * Copyright (c) 2015, 2016 Christian W. Damus and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,17 +26,20 @@ import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
import org.eclipse.papyrus.commands.wrappers.OperationToGEFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
/**
* An iterator over the tree structure of EMF, GEF, and GMF commands that returns leaf commands of one or all of these kinds,
* with accounting for the various kinds of wrappers employed to intermix them. This iterator does not support the
* optional {@link Iterator#remove()} operation.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.util.CommandTreeIterator} API, instead.
*/
+@Deprecated
public class CommandTreeIterator<C> implements Iterator<C> {
private final Class<C> type;
@@ -130,6 +133,7 @@ public class CommandTreeIterator<C> implements Iterator<C> {
return (current == null) && iterators.isEmpty();
}
+ @Override
public boolean hasNext() {
while (!isDone() && (preparedNext == null)) {
Object next = internalNext();
@@ -141,6 +145,7 @@ public class CommandTreeIterator<C> implements Iterator<C> {
return preparedNext != null;
}
+ @Override
public C next() {
if (!hasNext()) {
throw new NoSuchElementException();
@@ -154,6 +159,7 @@ public class CommandTreeIterator<C> implements Iterator<C> {
/**
* Remove is not supported.
*/
+ @Override
public void remove() {
throw new UnsupportedOperationException("remove"); //$NON-NLS-1$
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/NonDirtyingUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/NonDirtyingUtils.java
index 2241b69c7be..2f675b9399e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/NonDirtyingUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/NonDirtyingUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*/
package org.eclipse.papyrus.commands.util;
@@ -19,11 +20,10 @@ import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.EMFCommandOperation;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.papyrus.commands.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying;
/**
@@ -31,7 +31,10 @@ import org.eclipse.papyrus.commands.INonDirtying;
*
* @see INonDirtying
* @see AbstractCommand.NonDirtying
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils} API, instead.
*/
+@Deprecated
public class NonDirtyingUtils {
/**
@@ -42,21 +45,15 @@ public class NonDirtyingUtils {
}
public static IUndoableOperation wrap(TransactionalEditingDomain domain, Command command) {
- if (command instanceof AbstractCommand.NonDirtying) {
- return new NonDirtyingEMFCommandOperation(domain, command);
- }
- return new EMFCommandOperation(domain, command);
+ return org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils.wrap(domain, command);
}
public static IUndoableOperation wrap(TransactionalEditingDomain domain, Command command, Map<?, ?> options) {
- if (command instanceof AbstractCommand.NonDirtying) {
- return new NonDirtyingEMFCommandOperation(domain, command, options);
- }
- return new EMFCommandOperation(domain, command, options);
+ return org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils.wrap(domain, command, options);
}
public static CompoundCommand nonDirtyingEMFCompound() {
- return new NonDirtyingEMFCompoundCommand();
+ return org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils.nonDirtyingEMFCompound();
}
/**
@@ -79,10 +76,7 @@ public class NonDirtyingUtils {
}
public static Command chain(Command command1, Command command2) {
- if ((command1 instanceof AbstractCommand.NonDirtying) && (command2 instanceof AbstractCommand.NonDirtying)) {
- return new NonDirtyingEMFCompoundCommand().chain(command1).chain(command2);
- }
- return command1.chain(command2);
+ return org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils.chain(command1, command2);
}
public static org.eclipse.gef.commands.CompoundCommand nonDirtyingGEFCompound() {
@@ -97,71 +91,17 @@ public class NonDirtyingUtils {
}
public static CompositeCommand nonDirtyingGMFComposite(String label) {
- return new NonDirtyingGMFCompositeCommand(label);
+ return org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils.nonDirtyingGMFComposite(label);
}
public static ICommand compose(ICommand command1, ICommand command2) {
- if ((command1 instanceof INonDirtying) && (command2 instanceof INonDirtying)) {
- return new NonDirtyingGMFCompositeCommand(command1.getLabel()).compose(command1).compose(command2);
- }
- return command1.compose(command2);
+ return org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils.compose(command1, command2);
}
//
// Nested types
//
- private static class NonDirtyingEMFCommandOperation extends EMFCommandOperation implements INonDirtying {
-
- NonDirtyingEMFCommandOperation(TransactionalEditingDomain domain, Command command, Map<?, ?> options) {
- super(domain, checkCommand(command), options);
- }
-
- NonDirtyingEMFCommandOperation(TransactionalEditingDomain domain, Command command) {
- super(domain, checkCommand(command));
- }
-
- static Command checkCommand(Command command) {
- if (!(command instanceof AbstractCommand.NonDirtying)) {
- throw new IllegalStateException("Attempt to wrap dirtying command in a non-dirtying operation."); //$NON-NLS-1$
- }
- return command;
- }
- }
-
- private static class NonDirtyingEMFCompoundCommand extends CompoundCommand implements AbstractCommand.NonDirtying {
-
- @Override
- public void append(Command command) {
- checkNonDirtying(command);
- super.append(command);
- }
-
- @Override
- public boolean appendAndExecute(Command command) {
- checkNonDirtying(command);
- return super.appendAndExecute(command);
- }
-
- @Override
- public boolean appendIfCanExecute(Command command) {
- checkNonDirtying(command);
- return super.appendIfCanExecute(command);
- }
-
- @Override
- public Command chain(Command command) {
- append(command);
- return this;
- }
-
- private void checkNonDirtying(Command command) {
- if (!(command instanceof AbstractCommand.NonDirtying)) {
- throw new IllegalArgumentException("Attempt to append a dirtying command to a non-dirtying compound."); //$NON-NLS-1$
- }
- }
- }
-
private static class NonDirtyingGEFCompoundCommand extends org.eclipse.gef.commands.CompoundCommand implements INonDirtying {
@Override
@@ -186,25 +126,6 @@ public class NonDirtyingUtils {
}
}
- private static class NonDirtyingGMFCompositeCommand extends CompositeCommand implements INonDirtying {
-
- NonDirtyingGMFCompositeCommand(String label) {
- super(label);
- }
-
- @Override
- public void add(IUndoableOperation operation) {
- checkNonDirtying(operation);
- super.add(operation);
- }
-
- private void checkNonDirtying(IUndoableOperation operation) {
- if (!(operation instanceof INonDirtying)) {
- throw new IllegalArgumentException("Attempt to append a dirtying operation to a non-dirtying composite."); //$NON-NLS-1$
- }
- }
- }
-
private static class NonDirytingCommandProxy extends CommandProxy implements INonDirtying {
NonDirytingCommandProxy(org.eclipse.gef.commands.Command command) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationHistoryDirtyState.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationHistoryDirtyState.java
index 10e14b0b7e6..d42818e0765 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationHistoryDirtyState.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationHistoryDirtyState.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,48 +8,32 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*/
package org.eclipse.papyrus.commands.util;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IOperationHistoryListener;
import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.commands.operations.OperationHistoryEvent;
import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.papyrus.commands.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying;
/**
* A utility class for tracking the dirty state of an operation history. It works in the
* same fashion as the EMF {@link BasicCommandStack}, accounting for operations that {@linkplain INonDirtying do not dirty} the editor.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.util.OperationHistoryDirtyState} API, instead.
*/
-public class OperationHistoryDirtyState {
-
- private static final Map<IUndoContext, OperationHistoryDirtyState> instances = new HashMap<IUndoContext, OperationHistoryDirtyState>();
-
- private final AtomicInteger refCount = new AtomicInteger(0);
-
- private final IUndoContext context;
-
- private final IOperationHistory history;
-
- private IOperationHistoryListener listener;
-
- private IUndoableOperation savepoint;
-
- private boolean forceDirty;
+@Deprecated
+public class OperationHistoryDirtyState extends org.eclipse.papyrus.infra.emf.gmf.util.OperationHistoryDirtyState.Delegator {
private OperationHistoryDirtyState(IUndoContext context, IOperationHistory history) {
- this.context = context;
- this.history = history;
+ super(context, history);
+ }
- history.addOperationHistoryListener(createOperationHistoryListener());
+ private OperationHistoryDirtyState(org.eclipse.papyrus.infra.emf.gmf.util.OperationHistoryDirtyState delegate) {
+ super(delegate);
}
/**
@@ -57,86 +41,19 @@ public class OperationHistoryDirtyState {
* even if it is actually the same instance as returned by an earlier call, because instances are reference-counted.
*/
public static OperationHistoryDirtyState newInstance(IUndoContext context, IOperationHistory history) {
- OperationHistoryDirtyState result;
-
- synchronized (instances) {
- result = instances.get(context);
- if (result == null) {
- result = new OperationHistoryDirtyState(context, history);
- instances.put(context, result);
- }
- }
-
- result.retain();
- return result;
+ return adapt(getInstance(context, history, OperationHistoryDirtyState::new));
}
- private IOperationHistoryListener createOperationHistoryListener() {
- this.listener = new IOperationHistoryListener() {
-
- public void historyNotification(OperationHistoryEvent event) {
- switch (event.getEventType()) {
- case OperationHistoryEvent.DONE:
- case OperationHistoryEvent.UNDONE:
- case OperationHistoryEvent.REDONE:
- case OperationHistoryEvent.OPERATION_CHANGED:
- // Check on our savepoint, if any
- if ((savepoint != null) && !savepoint.hasContext(context)) {
- // Our savepoint has been removed from the context (our undo/redo stack), so it
- // is effectively lost
- savepoint = null;
- }
- break;
- case OperationHistoryEvent.OPERATION_REMOVED:
- IUndoableOperation removed = event.getOperation();
- if (removed != null) {
- if (removed == savepoint) {
- // the savepoint was removed, so now we can never return to it
- savepoint = null;
- } else if ((savepoint == null) && removed.hasContext(context) && !OperationUtils.isNonDirtying(removed)) {
- // A dirtying operation has been lost from the history, so we will not now be able to return
- // to a state equivalent to the savepoint
- forceDirty = true;
- }
- }
- break;
- }
- }
- };
-
- return this.listener;
- }
-
- private OperationHistoryDirtyState retain() {
- refCount.incrementAndGet();
- return this;
- }
-
- private boolean release() {
- return refCount.decrementAndGet() == 0;
- }
-
- public void dispose() {
- synchronized (instances) {
- if (release()) {
- instances.remove(context);
-
- if (listener != null) {
- history.removeOperationHistoryListener(listener);
- listener = null;
- }
+ private static OperationHistoryDirtyState adapt(org.eclipse.papyrus.infra.emf.gmf.util.OperationHistoryDirtyState state) {
+ OperationHistoryDirtyState result;
- savepoint = null;
- }
+ if (state instanceof OperationHistoryDirtyState) {
+ result = (OperationHistoryDirtyState) state;
+ } else {
+ result = new OperationHistoryDirtyState(state);
}
- }
- public boolean isDirty() {
- return forceDirty || OperationUtils.isDirty(history.getUndoHistory(context), history.getRedoHistory(context), savepoint);
+ return result;
}
- public void saved() {
- this.savepoint = history.getUndoOperation(context);
- this.forceDirty = false;
- }
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationUtils.java
index dd809a3588a..7b8d2376bd1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/OperationUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,25 +8,22 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*/
package org.eclipse.papyrus.commands.util;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
import org.eclipse.core.commands.operations.IUndoableOperation;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.workspace.EMFCommandOperation;
-import org.eclipse.papyrus.commands.INonDirtying;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
/**
* Utilities for working with undoable operations.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.util.OperationUtils} API, instead.
*/
+@Deprecated
public class OperationUtils {
/**
@@ -37,18 +34,7 @@ public class OperationUtils {
}
public static boolean anyDirtying(IUndoableOperation[] undoHistory) {
- boolean result = false;
-
- if ((undoHistory != null) && (undoHistory.length > 0)) {
- for (int i = 0; i < undoHistory.length; i++) {
- if (!isNonDirtying(undoHistory[i])) {
- result = true;
- break;
- }
- }
- }
-
- return result;
+ return org.eclipse.papyrus.infra.emf.gmf.util.OperationUtils.anyDirtying(undoHistory);
}
/**
@@ -60,12 +46,7 @@ public class OperationUtils {
* @return whether it is a non-dirtying operation
*/
public static boolean isNonDirtying(IUndoableOperation operation) {
- boolean result = operation instanceof INonDirtying;
- if (!result) {
- Command command = unwrap(operation);
- result = command instanceof AbstractCommand.NonDirtying;
- }
- return result;
+ return org.eclipse.papyrus.infra.emf.gmf.util.OperationUtils.isNonDirtying(operation);
}
/**
@@ -77,63 +58,10 @@ public class OperationUtils {
* @return the {@link Command} that it wraps, or {@code null} if it does not wrap a singular EMF command
*/
public static Command unwrap(IUndoableOperation operation) {
- Command result = null;
-
- if (operation instanceof EMFCommandOperation) {
- result = ((EMFCommandOperation) operation).getCommand();
- } else if (operation instanceof EMFtoGMFCommandWrapper) {
- result = ((EMFtoGMFCommandWrapper) operation).getEMFCommand();
- }
-
- return result;
+ return org.eclipse.papyrus.infra.emf.gmf.util.OperationUtils.unwrap(operation);
}
public static boolean isDirty(IUndoableOperation[] undoHistory, IUndoableOperation[] redoHistory, IUndoableOperation savepoint) {
- boolean result = false;
-
- if (savepoint == null) {
- result = anyDirtying(undoHistory);
- } else {
- List<IUndoableOperation> undos = ((undoHistory == null) || (undoHistory.length == 0)) ? Collections.<IUndoableOperation> emptyList() : Arrays.asList(undoHistory);
- List<IUndoableOperation> redos = ((redoHistory == null) || (redoHistory.length == 0)) ? Collections.<IUndoableOperation> emptyList() : Arrays.asList(redoHistory);
-
- if (undos.contains(savepoint)) {
- // See whether there is any dirtying command after the savepoint in the undo stack
- int i = 0;
-
- for (; i < undoHistory.length; i++) {
- if (undoHistory[i] == savepoint) {
- i++; // Advance over the save point to start testing
- break;
- }
- }
-
- for (; i < undoHistory.length; i++) {
- if (!isNonDirtying(undoHistory[i])) {
- result = true;
- break;
- }
- }
- } else if (redos.contains(savepoint)) {
- // See whether there is any dirtying command before the savepoint in the redo stack
- for (int i = redoHistory.length - 1; i >= 0; i--) {
- if (!isNonDirtying(redoHistory[i])) {
- result = true;
- break;
- }
- if (redoHistory[i] == savepoint) {
- // Done scanning. Everything up to and including the savepoint is non-dirtying
- break;
- }
- }
- } else {
- // If we have no history but we have a savepoint, then we cannot undo nor redo to that savepoint
- // (the history has been flushed) so evidently some change was made that invalidated the history,
- // therefore we are dirty
- result = true;
- }
- }
-
- return result;
+ return org.eclipse.papyrus.infra.emf.gmf.util.OperationUtils.isDirty(undoHistory, redoHistory, savepoint);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGEFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGEFCommandWrapper.java
index b16f53ce55f..80e82d18b26 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGEFCommandWrapper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGEFCommandWrapper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2014 AIRBUS FRANCE, CEA, and others.
+ * Copyright (c) 2005, 2016 AIRBUS FRANCE, CEA, Christian W. Damus, 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
@@ -9,6 +9,7 @@
* David Sciamma (Anyware Technologies), Mathieu Garcia (Anyware Technologies),
* Jacques Lescot (Anyware Technologies) - initial API and implementation
* Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus - bug 485220
*
*******************************************************************************/
package org.eclipse.papyrus.commands.wrappers;
@@ -16,8 +17,8 @@ package org.eclipse.papyrus.commands.wrappers;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.papyrus.commands.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.command.ICommandWrapper;
-// TODO: Auto-generated Javadoc
/**
* A GEF Command that wraps an EMF command. Each method is redirected to the EMF one. <br>
* Adapts an {@link org.eclipse.emf.common.command.Command EMF Command} to be a {@link org.eclipse.gef.commands.Command GEF Command}.
@@ -26,7 +27,7 @@ import org.eclipse.papyrus.commands.INonDirtying;
*
* @author aarong, <a href="mailto:jacques.lescot@anyware-tech.com">Jacques LESCOT</a>
*/
-public class EMFtoGEFCommandWrapper extends Command {
+public class EMFtoGEFCommandWrapper extends Command implements ICommandWrapper<org.eclipse.emf.common.command.Command> {
/**
* The wrapped EMF Command. Package-level visibility so that the command stack wrapper can
@@ -34,6 +35,13 @@ public class EMFtoGEFCommandWrapper extends Command {
*/
private final org.eclipse.emf.common.command.Command emfCommand;
+ static {
+ REGISTRY.registerWrapper(org.eclipse.emf.common.command.Command.class, Command.class,
+ EMFtoGEFCommandWrapper::wrap);
+ REGISTRY.registerUnwrapper(EMFtoGEFCommandWrapper.class, org.eclipse.emf.common.command.Command.class,
+ EMFtoGEFCommandWrapper::getWrappedCommand);
+ }
+
/**
* Constructor.
*
@@ -64,11 +72,15 @@ public class EMFtoGEFCommandWrapper extends Command {
*
* @return the EMF command
*/
- // @unused
public org.eclipse.emf.common.command.Command getEMFCommand() {
return emfCommand;
}
+ @Override
+ public org.eclipse.emf.common.command.Command getWrappedCommand() {
+ return getEMFCommand();
+ }
+
/**
* Dispose.
*
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGMFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGMFCommandWrapper.java
index 10d1916ab7c..85f9c98fd13 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGMFCommandWrapper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/EMFtoGMFCommandWrapper.java
@@ -1,222 +1,71 @@
-/***************************************************************************
- * Copyright (c) 2007, 2014 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, CEA, 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: Mario Cervera Ubeda (Prodevelop)
- * Christian W. Damus (CEA) - bug 430701
- *
- ******************************************************************************/
-package org.eclipse.papyrus.commands.wrappers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.commands.INonDirtying;
-
-/**
- * A GMF Command that wraps an EMF command. Each method is redirected to the EMF one.
- */
-public class EMFtoGMFCommandWrapper extends AbstractCommand {
-
- /**
- * The wrapped EMF Command. Package-level visibility so that the command stack wrapper can
- * access the field.
- */
- protected Command emfCommand;
-
- /**
- * This variable is used to avoid reentrant call in canUndo/undo/redo
- *
- * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=389382
- */
- protected boolean isBusy;
-
- /**
- * Constructor.
- *
- * @param emfCommand
- * the emf command
- */
- public EMFtoGMFCommandWrapper(Command emfCommand) {
- super(emfCommand.getLabel());
- this.emfCommand = emfCommand;
- }
-
- /**
- * Wraps the given {@code command}, accounting for possible non-dirty state.
- *
- * @param command
- * a command to wrap
- * @return the best wrapper for the {@code command}
- */
- public static ICommand wrap(Command command) {
- if (command instanceof org.eclipse.emf.common.command.AbstractCommand.NonDirtying) {
- return new NonDirtying(command);
- }
- return new EMFtoGMFCommandWrapper(command);
- }
-
- /**
- * Returns the wrapped EMF command.
- *
- * @return the EMF command
- */
- // @unused
- public org.eclipse.emf.common.command.Command getEMFCommand() {
- return emfCommand;
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.gmf.runtime.common.core.command.AbstractCommand#
- * doExecuteWithResult(org.eclipse .core.runtime.IProgressMonitor,
- * org.eclipse.core.runtime.IAdaptable)
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
-
- emfCommand.execute();
-
- return CommandResult.newOKCommandResult();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#doRedoWithResult
- * (org.eclipse. core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- @Override
- protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
-
- if (!isBusy) {
- isBusy = true;
- emfCommand.redo();
- isBusy = false;
- }
-
- return CommandResult.newOKCommandResult();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#doUndoWithResult
- * (org.eclipse. core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- @Override
- protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
-
- if (!isBusy) {
- isBusy = true;
- emfCommand.undo();
- isBusy = false;
- }
-
- return CommandResult.newOKCommandResult();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.operations.AbstractOperation#canExecute()
- */
- @Override
- public boolean canExecute() {
- return emfCommand.canExecute();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#dispose()
- */
- @Override
- public void dispose() {
- emfCommand.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.operations.AbstractOperation#canUndo()
- */
- @Override
- public boolean canUndo() {
- if (!isBusy) {
- isBusy = true;
- boolean res = emfCommand.canUndo();
- isBusy = false;
- return res;
- } else {
- return true;
- }
- }
-
- @Override
- public List getAffectedFiles() {
- ArrayList affectedFiles = new ArrayList();
- Collection<?> affectedObjects = emfCommand.getAffectedObjects();
- if (affectedObjects != null) {
- for (Object o : affectedObjects) {
- if (o instanceof EObject) {
- o = ((EObject) o).eResource();
- }
- if (o instanceof Resource) {
- o = WorkspaceSynchronizer.getFile((Resource) o);
- }
- if (o instanceof IFile) {
- affectedFiles.add(o);
- }
- }
- }
- return affectedFiles;
- }
-
- @Override
- public CommandResult getCommandResult() {
- Collection<?> res = emfCommand.getResult();
- if (res != null && !res.isEmpty()) {
- if (res.size() == 1) {
- return CommandResult.newOKCommandResult(res.iterator().next());
- }
- return CommandResult.newOKCommandResult(res);
- }
- return CommandResult.newOKCommandResult();
- }
-
- //
- // Nested types
- //
-
- /**
- * A non-dirtying wrapper for non-dirtying commands.
- */
- public static class NonDirtying extends EMFtoGMFCommandWrapper implements INonDirtying {
-
- public NonDirtying(org.eclipse.emf.common.command.Command command) {
- super(command);
-
- if (!(command instanceof org.eclipse.emf.common.command.AbstractCommand.NonDirtying)) {
- throw new IllegalArgumentException("Wrapped command is not non-dirtying"); //$NON-NLS-1$
- }
- }
-
- }
-}
+/***************************************************************************
+ * Copyright (c) 2007, 2014 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, CEA, Christian W. Damus, 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: Mario Cervera Ubeda (Prodevelop)
+ * Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus - bug 485220
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.commands.wrappers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.commands.INonDirtying;
+
+/**
+ * A GMF Command that wraps an EMF command. Each method is redirected to the EMF one.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper} API, instead.
+ */
+@Deprecated
+public class EMFtoGMFCommandWrapper extends org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper {
+
+ static {
+ // Configure legacy compatibility
+ setWrapperFunction(EMFtoGMFCommandWrapper::new);
+ setNonDirtyingWrapperFunction(NonDirtying::new);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param emfCommand
+ * the emf command
+ */
+ public EMFtoGMFCommandWrapper(Command emfCommand) {
+ super(emfCommand);
+ }
+
+ /**
+ * Wraps the given {@code command}, accounting for possible non-dirty state.
+ *
+ * @param command
+ * a command to wrap
+ * @return the best wrapper for the {@code command}
+ */
+ public static ICommand wrap(Command command) {
+ return org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper.wrap(command);
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A non-dirtying wrapper for non-dirtying commands.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper.NonDirtying} API, instead.
+ */
+ @Deprecated
+ public static class NonDirtying extends org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper.NonDirtying implements INonDirtying {
+
+ public NonDirtying(org.eclipse.emf.common.command.Command command) {
+ super(command);
+ }
+
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFtoEMFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFtoEMFCommandWrapper.java
index fb8520c513a..31255adc72b 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFtoEMFCommandWrapper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFtoEMFCommandWrapper.java
@@ -1,142 +1,131 @@
-/***************************************************************************
- * Copyright (c) 2007, 2014 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, CEA, 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: Mario Cervera Ubeda (Prodevelop)
- * Christian W. Damus (CEA) - bug 430701
- *
- ******************************************************************************/
-package org.eclipse.papyrus.commands.wrappers;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.papyrus.commands.INonDirtying;
-
-// TODO: Auto-generated Javadoc
-/**
- * A EMF Command that wraps a GEF command. Each method is redirected to the GEF one.
- */
-public class GEFtoEMFCommandWrapper extends AbstractCommand {
-
- /**
- * The wrapped GEF Command. Package-level visibility so that the command stack wrapper can
- * access the field.
- */
- private final Command gefCommand;
-
- /**
- * Constructor.
- *
- * @param gefCommand
- * the gef command
- */
- public GEFtoEMFCommandWrapper(Command gefCommand) {
- super(gefCommand.getLabel());
- this.gefCommand = gefCommand;
- }
-
- /**
- * Wraps the given {@code command}, accounting for possible non-dirty state.
- *
- * @param command
- * a command to wrap
- * @return the best wrapper for the {@code command}
- */
- public static org.eclipse.emf.common.command.Command wrap(Command command) {
- if (command instanceof INonDirtying) {
- return new NonDirtying(command);
- }
- return new GEFtoEMFCommandWrapper(command);
- }
-
- /**
- * Returns the wrapped GEF command.
- *
- * @return the GEF command
- */
- // @unused
- public Command getGEFCommand() {
- return gefCommand;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#canExecute()
- */
- @Override
- public boolean canExecute() {
- return gefCommand.canExecute();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#dispose()
- */
- @Override
- public void dispose() {
- gefCommand.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#canUndo()
- */
- @Override
- public boolean canUndo() {
- return gefCommand.canUndo();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.Command#execute()
- */
- public void execute() {
-
- gefCommand.execute();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.Command#redo()
- */
- public void redo() {
- gefCommand.redo();
- }
-
- /**
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#undo()
- *
- */
- @Override
- public void undo() {
- gefCommand.undo();
- }
-
- //
- // Nested types
- //
-
- /**
- * A non-dirtying wrapper for non-dirtying commands.
- */
- public static class NonDirtying extends GEFtoEMFCommandWrapper implements AbstractCommand.NonDirtying {
-
- public NonDirtying(Command command) {
- super(command);
-
- if (!(command instanceof INonDirtying)) {
- throw new IllegalArgumentException("Wrapped command is not non-dirtying"); //$NON-NLS-1$
- }
- }
-
- }
-}
+/***************************************************************************
+ * Copyright (c) 2007, 2014 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, CEA, Christian W. Damus, 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: Mario Cervera Ubeda (Prodevelop)
+ * Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus - bug 485220
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.commands.wrappers;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.papyrus.infra.emf.gmf.command.ICommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying;
+
+/**
+ * A EMF Command that wraps a GEF command. Each method is redirected to the GEF one.
+ */
+public class GEFtoEMFCommandWrapper extends AbstractCommand implements ICommandWrapper<Command> {
+
+ /**
+ * The wrapped GEF Command. Package-level visibility so that the command stack wrapper can
+ * access the field.
+ */
+ private final Command gefCommand;
+
+ static {
+ REGISTRY.registerWrapper(Command.class, org.eclipse.emf.common.command.Command.class,
+ GEFtoEMFCommandWrapper::wrap);
+ REGISTRY.registerUnwrapper(GEFtoEMFCommandWrapper.class, Command.class,
+ GEFtoEMFCommandWrapper::getWrappedCommand);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param gefCommand
+ * the gef command
+ */
+ public GEFtoEMFCommandWrapper(Command gefCommand) {
+ super(gefCommand.getLabel());
+ this.gefCommand = gefCommand;
+ }
+
+ /**
+ * Wraps the given {@code command}, accounting for possible non-dirty state.
+ *
+ * @param command
+ * a command to wrap
+ * @return the best wrapper for the {@code command}
+ */
+ public static org.eclipse.emf.common.command.Command wrap(Command command) {
+ if (command instanceof INonDirtying) {
+ return new NonDirtying(command);
+ }
+ return new GEFtoEMFCommandWrapper(command);
+ }
+
+ /**
+ * Returns the wrapped GEF command.
+ *
+ * @return the GEF command
+ */
+ public Command getGEFCommand() {
+ return gefCommand;
+ }
+
+ @Override
+ public Command getWrappedCommand() {
+ return getGEFCommand();
+ }
+
+ @Override
+ public boolean canExecute() {
+ return gefCommand.canExecute();
+ }
+
+ @Override
+ public void dispose() {
+ gefCommand.dispose();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return gefCommand.canUndo();
+ }
+
+ @Override
+ public void execute() {
+
+ gefCommand.execute();
+ }
+
+ @Override
+ public void redo() {
+ gefCommand.redo();
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#undo()
+ *
+ */
+ @Override
+ public void undo() {
+ gefCommand.undo();
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A non-dirtying wrapper for non-dirtying commands.
+ */
+ public static class NonDirtying extends GEFtoEMFCommandWrapper implements AbstractCommand.NonDirtying {
+
+ public NonDirtying(Command command) {
+ super(command);
+
+ if (!(command instanceof INonDirtying)) {
+ throw new IllegalArgumentException("Wrapped command is not non-dirtying"); //$NON-NLS-1$
+ }
+ }
+
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoEMFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoEMFCommandWrapper.java
index 7161d938c4a..7cb2bf5a9c4 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoEMFCommandWrapper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoEMFCommandWrapper.java
@@ -1,205 +1,71 @@
-/***************************************************************************
- * Copyright (c) 2007, 2014 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, CEA, 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: Mario Cervera Ubeda (Prodevelop)
- * Christian W. Damus (CEA) - bug 430701
- *
- ******************************************************************************/
-package org.eclipse.papyrus.commands.wrappers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.commands.INonDirtying;
-
-// TODO: Auto-generated Javadoc
-/**
- * A EMF Command that wraps a GMF command. Each method is redirected to the GMF one.
- */
-public class GMFtoEMFCommandWrapper extends AbstractCommand {
-
- /**
- *
- * Wraps the GMF command return value to be returned by this method.
- *
- * @return the possible return value from the GMF command
- */
- @Override
- public Collection<?> getResult() {
-
- Collection<Object> result = new ArrayList<Object>();
- if (getGMFReturnValue() != null) {
- result.add(getGMFReturnValue());
- } // else return an empty collection
-
- return result;
- }
-
- private Object getGMFReturnValue() {
- if (getGMFCommand().getCommandResult() != null) {
- return getGMFCommand().getCommandResult().getReturnValue();
- }
-
- return null;
- }
-
- /**
- * The wrapped GMF Command. Package-level visibility so that the command stack wrapper can
- * access the field.
- */
- private final ICommand gmfCommand;
-
- /**
- * Constructor.
- *
- * @param gmfCommand
- * the gmf command
- */
- public GMFtoEMFCommandWrapper(ICommand gmfCommand) {
- super(gmfCommand.getLabel());
- this.gmfCommand = gmfCommand;
- }
-
- /**
- * Wraps the given {@code command}, accounting for possible non-dirty state.
- *
- * @param command
- * a command to wrap
- * @return the best wrapper for the {@code command}
- */
- public static Command wrap(ICommand command) {
- if (command instanceof INonDirtying) {
- return new NonDirtying(command);
- }
- return new GMFtoEMFCommandWrapper(command);
- }
-
- /**
- * Returns the wrapped GMF command.
- *
- * @return the GMF command
- */
- // @unused
- public ICommand getGMFCommand() {
- return gmfCommand;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#canExecute()
- */
- @Override
- public boolean canExecute() {
- return gmfCommand.canExecute();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#dispose()
- */
- @Override
- public void dispose() {
- gmfCommand.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#canUndo()
- */
- @Override
- public boolean canUndo() {
- return gmfCommand.canUndo();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.Command#execute()
- */
- public void execute() {
- try {
- gmfCommand.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.Command#redo()
- */
- public void redo() {
- try {
- gmfCommand.redo(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#undo()
- */
- @Override
- public void undo() {
- try {
- gmfCommand.undo(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.Command#getAffectedObjects()
- */
- @Override
- public Collection<?> getAffectedObjects() {
- return gmfCommand.getAffectedFiles();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.command.Command#getDescription()
- */
- @Override
- public String getDescription() {
- return gmfCommand.getLabel();
- }
-
- //
- // Nested types
- //
-
- /**
- * A non-dirtying wrapper for non-dirtying commands.
- */
- public static class NonDirtying extends GMFtoEMFCommandWrapper implements AbstractCommand.NonDirtying {
-
- public NonDirtying(ICommand command) {
- super(command);
-
- if (!(command instanceof INonDirtying)) {
- throw new IllegalArgumentException("Wrapped command is not non-dirtying"); //$NON-NLS-1$
- }
- }
-
- }
-
-}
+/***************************************************************************
+ * Copyright (c) 2007, 2014 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, CEA, Christian W. Damus, 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: Mario Cervera Ubeda (Prodevelop)
+ * Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus - bug 485220
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.commands.wrappers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+
+/**
+ * A EMF Command that wraps a GMF command. Each method is redirected to the GMF one.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper} API, instead.
+ */
+@Deprecated
+public class GMFtoEMFCommandWrapper extends org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper {
+
+ static {
+ // Configure legacy compatibility
+ setWrapperFunction(GMFtoEMFCommandWrapper::new);
+ setNonDirtyingWrapperFunction(NonDirtying::new);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param gmfCommand
+ * the gmf command
+ */
+ public GMFtoEMFCommandWrapper(ICommand gmfCommand) {
+ super(gmfCommand);
+ }
+
+ /**
+ * Wraps the given {@code command}, accounting for possible non-dirty state.
+ *
+ * @param command
+ * a command to wrap
+ * @return the best wrapper for the {@code command}
+ */
+ public static Command wrap(ICommand command) {
+ return org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper.wrap(command);
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A non-dirtying wrapper for non-dirtying commands.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper.NonDirtying} API, instead.
+ */
+ @Deprecated
+ public static class NonDirtying extends org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper.NonDirtying {
+
+ public NonDirtying(ICommand command) {
+ super(command);
+ }
+
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoGEFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoGEFCommandWrapper.java
index 13c63716303..8c189b2f0c4 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoGEFCommandWrapper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GMFtoGEFCommandWrapper.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
- *
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,6 +9,7 @@
* Contributors:
* Benoit Maggi benoit.maggi@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.commands.wrappers;
@@ -19,11 +19,12 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.papyrus.commands.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.command.ICommandWrapper;
/**
* A GEF Command that wraps a GMF command. Each method is redirected to the GMF one.
*/
-public class GMFtoGEFCommandWrapper extends Command {
+public class GMFtoGEFCommandWrapper extends Command implements ICommandWrapper<ICommand> {
/**
* The wrapped GMF Command. Package-level visibility so that the command stack wrapper can
@@ -31,6 +32,13 @@ public class GMFtoGEFCommandWrapper extends Command {
*/
private final ICommand gmfCommand;
+ static {
+ REGISTRY.registerWrapper(ICommand.class, Command.class,
+ GMFtoGEFCommandWrapper::wrap);
+ REGISTRY.registerUnwrapper(GMFtoGEFCommandWrapper.class, ICommand.class,
+ GMFtoGEFCommandWrapper::getWrappedCommand);
+ }
+
/**
* Constructor.
@@ -66,6 +74,11 @@ public class GMFtoGEFCommandWrapper extends Command {
return gmfCommand;
}
+ @Override
+ public ICommand getWrappedCommand() {
+ return getGMFCommand();
+ }
+
/**
* Dispose.
*
@@ -151,7 +164,7 @@ public class GMFtoGEFCommandWrapper extends Command {
public NonDirtying(ICommand command) {
super(command);
- if (!(command instanceof INonDirtying)) {
+ if (!(command instanceof org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying)) {
throw new IllegalArgumentException("Wrapped command is not non-dirtying"); //$NON-NLS-1$
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/OperationToGEFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/OperationToGEFCommandWrapper.java
index 298fb40f491..d77bc785828 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/OperationToGEFCommandWrapper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/OperationToGEFCommandWrapper.java
@@ -1,158 +1,171 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos, CEA, 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:
- * Vincent Hemery (Atos) - Initial API and implementation
- * Christian W. Damus (CEA) - bug 430701
- *
- *****************************************************************************/
-package org.eclipse.papyrus.commands.wrappers;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.commands.Activator;
-import org.eclipse.papyrus.commands.INonDirtying;
-
-/**
- * A GEF Command that wraps an undoable operation. Each method is redirected to the operation. <br>
- * In case the {@link IUndoableOperation} is a {@link ICommand}, you should use {@link org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy} instead of this implementation.
- *
- * @author vhemery
- */
-public class OperationToGEFCommandWrapper extends Command {
-
- /** the IUndoableOperation which calls are redirected to */
- private IUndoableOperation operation = null;
-
- /**
- * Construct a new command wrapper
- *
- * @param baseOperation
- */
- public OperationToGEFCommandWrapper(IUndoableOperation baseOperation) {
- super(baseOperation.getLabel());
- operation = baseOperation;
- Assert.isNotNull(operation);
- }
-
- /**
- * Wraps the given {@code operation}, accounting for possible non-dirty state.
- *
- * @param operation
- * an operation to wrap
- * @return the best wrapper for the {@code operation}
- */
- public static Command wrap(IUndoableOperation operation) {
- if (operation instanceof INonDirtying) {
- return new NonDirtying(operation);
- }
- return new OperationToGEFCommandWrapper(operation);
- }
-
- /**
- * Get the {@link IUndoableOperation} to which calls are redirected
- *
- * @return operation
- */
- public IUndoableOperation getOperation() {
- return operation;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean canExecute() {
- return operation.canExecute();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean canUndo() {
- return operation.canUndo();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- operation.dispose();
- super.dispose();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void execute() {
- try {
- operation.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e.getLocalizedMessage(), e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void redo() {
- try {
- operation.redo(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e.getLocalizedMessage(), e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void undo() {
- try {
- operation.undo(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e.getLocalizedMessage(), e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getLabel() {
- return operation.getLabel();
- }
-
- //
- // Nested types
- //
-
- /**
- * A non-dirtying wrapper for non-dirtying commands.
- */
- public static class NonDirtying extends OperationToGEFCommandWrapper implements INonDirtying {
-
- public NonDirtying(IUndoableOperation operation) {
- super(operation);
-
- if (!(operation instanceof INonDirtying)) {
- throw new IllegalArgumentException("Wrapped operation is not non-dirtying"); //$NON-NLS-1$
- }
- }
-
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 Atos, CEA, Christian W. Damus, 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:
+ * Vincent Hemery (Atos) - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 430701
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.commands.wrappers;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.commands.Activator;
+import org.eclipse.papyrus.commands.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.command.ICommandWrapper;
+
+/**
+ * A GEF Command that wraps an undoable operation. Each method is redirected to the operation. <br>
+ * In case the {@link IUndoableOperation} is a {@link ICommand}, you should use {@link org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy} instead of this implementation.
+ *
+ * @author vhemery
+ */
+public class OperationToGEFCommandWrapper extends Command implements ICommandWrapper<IUndoableOperation> {
+
+ /** the IUndoableOperation which calls are redirected to */
+ private IUndoableOperation operation = null;
+
+ static {
+ // The registry prefers the GMFtoGEFCommandWrapper for ICommands
+ REGISTRY.registerUnwrapper(OperationToGEFCommandWrapper.class, IUndoableOperation.class,
+ OperationToGEFCommandWrapper::getWrappedCommand);
+ }
+
+ /**
+ * Construct a new command wrapper
+ *
+ * @param baseOperation
+ */
+ public OperationToGEFCommandWrapper(IUndoableOperation baseOperation) {
+ super(baseOperation.getLabel());
+ operation = baseOperation;
+ Assert.isNotNull(operation);
+ }
+
+ /**
+ * Wraps the given {@code operation}, accounting for possible non-dirty state.
+ *
+ * @param operation
+ * an operation to wrap
+ * @return the best wrapper for the {@code operation}
+ */
+ public static Command wrap(IUndoableOperation operation) {
+ if (operation instanceof INonDirtying) {
+ return new NonDirtying(operation);
+ }
+ return new OperationToGEFCommandWrapper(operation);
+ }
+
+ /**
+ * Get the {@link IUndoableOperation} to which calls are redirected
+ *
+ * @return operation
+ */
+ public IUndoableOperation getOperation() {
+ return operation;
+ }
+
+ @Override
+ public IUndoableOperation getWrappedCommand() {
+ return getOperation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean canExecute() {
+ return operation.canExecute();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean canUndo() {
+ return operation.canUndo();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ operation.dispose();
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void execute() {
+ try {
+ operation.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ Activator.log.error(e.getLocalizedMessage(), e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void redo() {
+ try {
+ operation.redo(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ Activator.log.error(e.getLocalizedMessage(), e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void undo() {
+ try {
+ operation.undo(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ Activator.log.error(e.getLocalizedMessage(), e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabel() {
+ return operation.getLabel();
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A non-dirtying wrapper for non-dirtying commands.
+ */
+ public static class NonDirtying extends OperationToGEFCommandWrapper implements INonDirtying {
+
+ public NonDirtying(IUndoableOperation operation) {
+ super(operation);
+
+ if (!(operation instanceof org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying)) {
+ throw new IllegalArgumentException("Wrapped operation is not non-dirtying"); //$NON-NLS-1$
+ }
+ }
+
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.classpath
index 9a39368d975..f0c55498599 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.classpath
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.classpath
@@ -1,8 +1,8 @@
-<?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/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/org.eclipse.jdt.core.prefs
index 410244d65a6..b3aa6d60f94 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/org.eclipse.jdt.core.prefs
@@ -1,291 +1,291 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=260
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=false
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=260
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
index 974f758c11d..e20390c551d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
@@ -1,104 +1,108 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.common,
- org.eclipse.papyrus.infra.gmfdiag.common.adapter,
- org.eclipse.papyrus.infra.gmfdiag.common.advice,
- org.eclipse.papyrus.infra.gmfdiag.common.commands,
- org.eclipse.papyrus.infra.gmfdiag.common.commands.requests,
- org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom,
- org.eclipse.papyrus.infra.gmfdiag.common.decoration,
- org.eclipse.papyrus.infra.gmfdiag.common.editpart,
- org.eclipse.papyrus.infra.gmfdiag.common.editpolicies,
- org.eclipse.papyrus.infra.gmfdiag.common.expansion,
- org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel,
- org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.impl,
- org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.util,
- org.eclipse.papyrus.infra.gmfdiag.common.figure,
- org.eclipse.papyrus.infra.gmfdiag.common.figure.edge,
- org.eclipse.papyrus.infra.gmfdiag.common.figure.node,
- org.eclipse.papyrus.infra.gmfdiag.common.geometry,
- org.eclipse.papyrus.infra.gmfdiag.common.handler,
- org.eclipse.papyrus.infra.gmfdiag.common.helper,
- org.eclipse.papyrus.infra.gmfdiag.common.internal.sync;x-internal:=true,
- org.eclipse.papyrus.infra.gmfdiag.common.listener,
- org.eclipse.papyrus.infra.gmfdiag.common.locator,
- org.eclipse.papyrus.infra.gmfdiag.common.messages,
- org.eclipse.papyrus.infra.gmfdiag.common.model,
- org.eclipse.papyrus.infra.gmfdiag.common.parsers,
- org.eclipse.papyrus.infra.gmfdiag.common.preferences,
- org.eclipse.papyrus.infra.gmfdiag.common.providers,
- org.eclipse.papyrus.infra.gmfdiag.common.reconciler,
- org.eclipse.papyrus.infra.gmfdiag.common.selection,
- org.eclipse.papyrus.infra.gmfdiag.common.service.shape,
- org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype,
- org.eclipse.papyrus.infra.gmfdiag.common.snap,
- org.eclipse.papyrus.infra.gmfdiag.common.snap.copy,
- org.eclipse.papyrus.infra.gmfdiag.common.strategy,
- org.eclipse.papyrus.infra.gmfdiag.common.strategy.copy,
- org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste,
- org.eclipse.papyrus.infra.gmfdiag.common.structure,
- org.eclipse.papyrus.infra.gmfdiag.common.sync,
- org.eclipse.papyrus.infra.gmfdiag.common.types,
- org.eclipse.papyrus.infra.gmfdiag.common.undocontext,
- org.eclipse.papyrus.infra.gmfdiag.common.updater,
- org.eclipse.papyrus.infra.gmfdiag.common.utils
-Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0",
- org.eclipse.emf.ecore.edit;bundle-version="2.5.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.gef;bundle-version="3.7.1";visibility:=reexport,
- org.eclipse.emf.workspace;bundle-version="1.4.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0";visibility:=reexport,
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.2.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- org.eclipse.emf.databinding;bundle-version="1.3.0",
- org.eclipse.core.databinding.property;bundle-version="1.4.200",
- org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1",
- org.eclipse.core.expressions,
- org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
- org.w3c.dom.svg;bundle-version="1.1.0",
- org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.xml;bundle-version="[1.6.0,1.7.0)",
- org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)",
- com.ibm.icu,
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.decoration;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.draw2d.ui.render.awt,
- org.apache.xerces;bundle-version="2.9.0",
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.sync;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.common.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.common;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.common,
+ org.eclipse.papyrus.infra.gmfdiag.common.adapter,
+ org.eclipse.papyrus.infra.gmfdiag.common.advice,
+ org.eclipse.papyrus.infra.gmfdiag.common.commands,
+ org.eclipse.papyrus.infra.gmfdiag.common.commands.requests,
+ org.eclipse.papyrus.infra.gmfdiag.common.databinding,
+ org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom,
+ org.eclipse.papyrus.infra.gmfdiag.common.decoration,
+ org.eclipse.papyrus.infra.gmfdiag.common.editpart,
+ org.eclipse.papyrus.infra.gmfdiag.common.editpolicies,
+ org.eclipse.papyrus.infra.gmfdiag.common.expansion,
+ org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel,
+ org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.impl,
+ org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.util,
+ org.eclipse.papyrus.infra.gmfdiag.common.figure,
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.edge,
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node,
+ org.eclipse.papyrus.infra.gmfdiag.common.geometry,
+ org.eclipse.papyrus.infra.gmfdiag.common.handler,
+ org.eclipse.papyrus.infra.gmfdiag.common.helper,
+ org.eclipse.papyrus.infra.gmfdiag.common.internal.sync;x-internal:=true,
+ org.eclipse.papyrus.infra.gmfdiag.common.listener,
+ org.eclipse.papyrus.infra.gmfdiag.common.locator,
+ org.eclipse.papyrus.infra.gmfdiag.common.messages,
+ org.eclipse.papyrus.infra.gmfdiag.common.model,
+ org.eclipse.papyrus.infra.gmfdiag.common.parsers,
+ org.eclipse.papyrus.infra.gmfdiag.common.preferences,
+ org.eclipse.papyrus.infra.gmfdiag.common.providers,
+ org.eclipse.papyrus.infra.gmfdiag.common.reconciler,
+ org.eclipse.papyrus.infra.gmfdiag.common.selection,
+ org.eclipse.papyrus.infra.gmfdiag.common.service,
+ org.eclipse.papyrus.infra.gmfdiag.common.service.shape,
+ org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype,
+ org.eclipse.papyrus.infra.gmfdiag.common.snap,
+ org.eclipse.papyrus.infra.gmfdiag.common.snap.copy,
+ org.eclipse.papyrus.infra.gmfdiag.common.spi,
+ org.eclipse.papyrus.infra.gmfdiag.common.strategy,
+ org.eclipse.papyrus.infra.gmfdiag.common.strategy.copy,
+ org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste,
+ org.eclipse.papyrus.infra.gmfdiag.common.structure,
+ org.eclipse.papyrus.infra.gmfdiag.common.sync,
+ org.eclipse.papyrus.infra.gmfdiag.common.types,
+ org.eclipse.papyrus.infra.gmfdiag.common.undocontext,
+ org.eclipse.papyrus.infra.gmfdiag.common.updater,
+ org.eclipse.papyrus.infra.gmfdiag.common.utils,
+ org.eclipse.papyrus.infra.gmfdiag.internal.common.expressions;x-internal:=true
+Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0",
+ org.eclipse.emf.ecore.edit;bundle-version="2.5.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.gef;bundle-version="3.7.1";visibility:=reexport,
+ org.eclipse.emf.workspace;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.2.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
+ org.eclipse.emf.databinding;bundle-version="1.3.0",
+ org.eclipse.core.databinding.property;bundle-version="1.4.200",
+ org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1",
+ org.eclipse.core.expressions,
+ org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
+ org.w3c.dom.svg;bundle-version="1.1.0",
+ org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.xml;bundle-version="[1.6.0,1.7.0)",
+ org.eclipse.gmf.tooling.runtime;bundle-version="[3.3.0,4.0.0)",
+ com.ibm.icu,
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.decoration;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.draw2d.ui.render.awt,
+ org.apache.xerces;bundle-version="2.9.0",
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.papyrus.infra.sync;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.edit.ui;bundle-version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.common.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.common;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/notation.elementtypesconfigurations b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/notation.elementtypesconfigurations
index 0d813f220da..6db8bf14e5f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/notation.elementtypesconfigurations
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/notation.elementtypesconfigurations
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="ASCII" standalone="no"?><elementtypesconfigurations:ElementTypeSetConfiguration xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" identifier="org.eclipse.papyrus.infra.gmfdiag.common.NotationElementTypeSet" metamodelNsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation" name="NotationElementTypeSet" xmi:id="_ScP1oFYCEeS0WsAAtVmToA" xmi:version="2.0">
- <elementTypeConfigurations editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper" identifier="org.eclipse.papyrus.gmfdiag.common.Diagram" name="GMF::Diagram" xmi:id="_ScP1oVYCEeS0WsAAtVmToA" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration">
- <eClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.ecore#//Diagram"/>
- </elementTypeConfigurations>
+<?xml version="1.0" encoding="ASCII" standalone="no"?><elementtypesconfigurations:ElementTypeSetConfiguration xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" identifier="org.eclipse.papyrus.infra.gmfdiag.common.NotationElementTypeSet" metamodelNsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation" name="NotationElementTypeSet" xmi:id="_ScP1oFYCEeS0WsAAtVmToA" xmi:version="2.0">
+ <elementTypeConfigurations editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper" identifier="org.eclipse.papyrus.gmfdiag.common.Diagram" name="GMF::Diagram" xmi:id="_ScP1oVYCEeS0WsAAtVmToA" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration">
+ <eClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.ecore#//Diagram"/>
+ </elementTypeConfigurations>
</elementtypesconfigurations:ElementTypeSetConfiguration> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
index 3b03fd6247e..7161ddd10cd 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
@@ -78,7 +78,8 @@
<model
classname="org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel"
description="Model for notation"
- fileExtension="notation">
+ fileExtension="notation"
+ required="true">
</model>
</extension>
@@ -202,6 +203,13 @@
properties="diagramType"
type="org.eclipse.gmf.runtime.notation.View">
</propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.infra.gmfdiag.internal.common.expressions.GraphicalEditPartPropertyTester"
+ id="org.eclipse.papyrus.infra.gmfdiag.common.GraphicalEditPartProperties"
+ namespace="org.eclipse.papyrus.infra.gmfdiag.common"
+ properties="canDelete,isSemanticDeletion"
+ type="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
+ </propertyTester>
</extension>
<extension
point="org.eclipse.ui.menus">
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
index 25ed791f109..20ea78cd534 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.common</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd
index 828559605ee..c2db4277e91 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd
@@ -60,7 +60,7 @@
this is the class that will provide the command in charge of the paste
</documentation>
<appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.uml.pastemanager.IPasteCommandProvider"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.common.providers.IPasteCommandProvider"/>
</appInfo>
</annotation>
</attribute>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
index 476b9c7a2bd..2f8ee3dff13 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
@@ -51,6 +51,8 @@ import org.eclipse.jface.window.Window;
import org.eclipse.papyrus.commands.CheckedOperationHistory;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.OpenDiagramCommand;
+import org.eclipse.papyrus.infra.core.language.ILanguageService;
+import org.eclipse.papyrus.infra.core.resource.IEMFModel;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
@@ -72,7 +74,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.RootAutoSelect;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.statushandlers.StatusManager;
@@ -124,7 +125,6 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
}
private CommandResult createDiagram() throws ServiceException {
- Resource modelResource = UmlUtils.getUmlResource(modelSet);
Resource notationResource = getNotationResource(modelSet, owner, element);
if (notationResource == null) {
return CommandResult.newErrorCommandResult("Cannot create a diagram on the selected element (ReadOnly?)");
@@ -132,6 +132,12 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
Resource diResource = DiModelUtils.getDiResource(modelSet);
if (owner == null) {
+ Resource modelResource = ILanguageService.getLanguageModels(modelSet).stream()
+ .filter(IEMFModel.class::isInstance)
+ .map(IEMFModel.class::cast)
+ .findAny()
+ .map(IEMFModel::getResource)
+ .orElse(null);
owner = getRootElement(modelResource);
attachModelToResource(owner, modelResource);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/Activator.java
index 1300a79a0be..95b7c9478e2 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/Activator.java
@@ -1,190 +1,209 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2014 LIFL, CEA LIST, 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:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 410346
- * Christian W. Damus (CEA) - bug 425270
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class Activator extends AbstractUIPlugin {
-
- public static final String ID = "org.eclipse.papyrus.infra.gmfdiag.common"; //$NON-NLS-1$
-
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
- public static final String EXPANSION_TRACE="expansion";
-
- private static Activator instance;
-
- public Activator() {
- }
-
- /** Logging helper */
- public static LogHelper log;
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- instance = this;
- // register the login helper
- log = new LogHelper(this);
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- log = null;
- instance = null;
- super.stop(context);
- }
-
- public static Activator getInstance() {
- return instance;
- }
-
- public AdapterFactory getItemProvidersAdapterFactory() {
- return org.eclipse.papyrus.uml.tools.Activator.getDefault().getItemProviderAdapterFactory();
- }
-
- public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider = (IItemLabelProvider) getItemProvidersAdapterFactory().adapt(item, IItemLabelProvider.class);
- if (labelProvider != null) {
- return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
- }
- return null;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
- }
-
- /**
- * Respects images residing in any plug-in. If path is relative, then this bundle is looked up
- * for the image, otherwise, for absolute path, first segment is taken as id of plug-in with
- * image
- *
- * @param path
- * the path to image, either absolute (with plug-in id as first segment), or relative
- * for bundled images
- * @return the image descriptor
- */
- public static ImageDescriptor findImageDescriptor(String path) {
- final IPath p = new Path(path);
- if (p.isAbsolute() && p.segmentCount() > 1) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
- } else {
- return getBundledImageDescriptor(p.makeAbsolute().toString());
- }
- }
-
- /**
- * Returns string from plug-in's resource bundle
- */
- public static String getString(String key) {
- return Platform.getResourceString(getInstance().getBundle(), "%" + key); //$NON-NLS-1$
- }
-
- /**
- * Returns an image for the image file at the given plug-in relative path. Client do not need to
- * dispose this image. Images will be disposed automatically.
- *
- * @param path
- * the path
- * @return image instance
- */
- public Image getBundledImage(String path) {
- Image image = getImageRegistry().get(path);
- if (image == null) {
- getImageRegistry().put(path, getBundledImageDescriptor(path));
- image = getImageRegistry().get(path);
- }
- return image;
- }
-
- public void logError(String error) {
- logError(error, null);
- }
-
- /**
- * @param throwable
- * actual error or null could be passed
- */
- public void logError(String error, Throwable throwable) {
- if (error == null && throwable != null) {
- error = throwable.getMessage();
- }
- getLog().log(new Status(IStatus.ERROR, Activator.ID, IStatus.OK, error, throwable));
- debug(error, throwable);
- }
-
- public void logInfo(String message) {
- logInfo(message, null);
- }
-
- /**
- * @param throwable
- * actual error or null could be passed
- */
- public void logInfo(String message, Throwable throwable) {
- if (message == null && throwable != null) {
- message = throwable.getMessage();
- }
- getLog().log(new Status(IStatus.INFO, Activator.ID, IStatus.OK, message, throwable));
- debug(message, throwable);
- }
-
- private void debug(String message, Throwable throwable) {
- if (!isDebugging()) {
- return;
- }
- if (message != null) {
- System.err.println(message);
- }
- if (throwable != null) {
- throwable.printStackTrace();
- }
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- *
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(ID, path);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2008, 2016 LIFL, CEA LIST, Christian W. Damus, 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:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bugs 410346, 425270
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.spi.GraphicalDeletionHelperService;
+import org.eclipse.papyrus.infra.gmfdiag.common.spi.IGraphicalDeletionHelper;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends AbstractUIPlugin {
+
+ public static final String ID = "org.eclipse.papyrus.infra.gmfdiag.common"; //$NON-NLS-1$
+
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
+ public static final String EXPANSION_TRACE = "expansion";
+
+ private static Activator instance;
+
+ private ComposedAdapterFactory adapterFactory;
+
+ private GraphicalDeletionHelperService deletionHelper;
+
+ public Activator() {
+ }
+
+ /** Logging helper */
+ public static LogHelper log;
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ instance = this;
+ // register the login helper
+ log = new LogHelper(this);
+ adapterFactory = createAdapterFactory();
+ deletionHelper = new GraphicalDeletionHelperService(context);
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ deletionHelper.dispose();
+ adapterFactory.dispose();
+ adapterFactory = null;
+ log = null;
+ instance = null;
+ super.stop(context);
+ }
+
+ public static Activator getInstance() {
+ return instance;
+ }
+
+ protected ComposedAdapterFactory createAdapterFactory() {
+ return new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ }
+
+ public AdapterFactory getItemProvidersAdapterFactory() {
+ return adapterFactory;
+ }
+
+ public ImageDescriptor getItemImageDescriptor(Object item) {
+ IItemLabelProvider labelProvider = (IItemLabelProvider) getItemProvidersAdapterFactory().adapt(item, IItemLabelProvider.class);
+ if (labelProvider != null) {
+ return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
+ }
+ return null;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
+ }
+
+ /**
+ * Respects images residing in any plug-in. If path is relative, then this bundle is looked up
+ * for the image, otherwise, for absolute path, first segment is taken as id of plug-in with
+ * image
+ *
+ * @param path
+ * the path to image, either absolute (with plug-in id as first segment), or relative
+ * for bundled images
+ * @return the image descriptor
+ */
+ public static ImageDescriptor findImageDescriptor(String path) {
+ final IPath p = new Path(path);
+ if (p.isAbsolute() && p.segmentCount() > 1) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
+ } else {
+ return getBundledImageDescriptor(p.makeAbsolute().toString());
+ }
+ }
+
+ /**
+ * Returns string from plug-in's resource bundle
+ */
+ public static String getString(String key) {
+ return Platform.getResourceString(getInstance().getBundle(), "%" + key); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns an image for the image file at the given plug-in relative path. Client do not need to
+ * dispose this image. Images will be disposed automatically.
+ *
+ * @param path
+ * the path
+ * @return image instance
+ */
+ public Image getBundledImage(String path) {
+ Image image = getImageRegistry().get(path);
+ if (image == null) {
+ getImageRegistry().put(path, getBundledImageDescriptor(path));
+ image = getImageRegistry().get(path);
+ }
+ return image;
+ }
+
+ public void logError(String error) {
+ logError(error, null);
+ }
+
+ /**
+ * @param throwable
+ * actual error or null could be passed
+ */
+ public void logError(String error, Throwable throwable) {
+ if (error == null && throwable != null) {
+ error = throwable.getMessage();
+ }
+ getLog().log(new Status(IStatus.ERROR, Activator.ID, IStatus.OK, error, throwable));
+ debug(error, throwable);
+ }
+
+ public void logInfo(String message) {
+ logInfo(message, null);
+ }
+
+ /**
+ * @param throwable
+ * actual error or null could be passed
+ */
+ public void logInfo(String message, Throwable throwable) {
+ if (message == null && throwable != null) {
+ message = throwable.getMessage();
+ }
+ getLog().log(new Status(IStatus.INFO, Activator.ID, IStatus.OK, message, throwable));
+ debug(message, throwable);
+ }
+
+ private void debug(String message, Throwable throwable) {
+ if (!isDebugging()) {
+ return;
+ }
+ if (message != null) {
+ System.err.println(message);
+ }
+ if (throwable != null) {
+ throwable.printStackTrace();
+ }
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @param path
+ * the path
+ *
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(ID, path);
+ }
+
+ public IGraphicalDeletionHelper getGraphicalDeletionHelper() {
+ return deletionHelper;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableList.java
new file mode 100644
index 00000000000..d5b5056fc73
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableList.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.databinding;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.ui.databinding.PapyrusObservableList;
+
+/**
+ * An ObservableList used to edit collections of EObjects through
+ * Papyrus commands
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class GMFObservableList extends PapyrusObservableList {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param wrappedList
+ * The list to be edited when #commit() is called
+ * @param domain
+ * The editing domain on which the commands will be executed
+ * @param source
+ * The EObject from which the list will be retrieved
+ * @param feature
+ * The feature from which the list will be retrieved
+ */
+ public GMFObservableList(List<?> wrappedList, EditingDomain domain, EObject source, EStructuralFeature feature) {
+ super(wrappedList, domain, source, feature, GMFtoEMFCommandWrapper::wrap);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableValue.java
new file mode 100644
index 00000000000..9e367ff66bc
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/GMFObservableValue.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
+ * Christian W. Damus (CEA) - bugs 440108, 417409
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - bug 447698
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.databinding;
+
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.ui.databinding.PapyrusObservableValue;
+
+/**
+ * An ObservableValue used to edit EObject properties through
+ * Papyrus commands
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class GMFObservableValue extends PapyrusObservableValue {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param eObject
+ * The EObject to edit
+ * @param eStructuralFeature
+ * The structural feature to edit
+ * @param domain
+ * The editing domain on which the commands will be executed
+ */
+ public GMFObservableValue(EObject eObject, EStructuralFeature eStructuralFeature, EditingDomain domain) {
+ super(eObject, eStructuralFeature, domain, GMFtoEMFCommandWrapper::wrap);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param realm
+ * @param eObject
+ * The EObject to edit
+ * @param eStructuralFeature
+ * The structural feature to edit
+ * @param domain
+ * The editing domain on which the commands will be executed
+ */
+ public GMFObservableValue(Realm realm, EObject eObject, EStructuralFeature eStructuralFeature, EditingDomain domain) {
+ super(realm, eObject, eStructuralFeature, domain, GMFtoEMFCommandWrapper::wrap);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleObservableValue.java
index 52712763b5f..19928b072d9 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleObservableValue.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleObservableValue.java
@@ -1,130 +1,130 @@
-/*****************************************************************************
- * Copyright (c) 2012, 2014 CEA LIST 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - 402525
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObserving;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
-import org.eclipse.papyrus.uml.tools.databinding.CommandBasedObservableValue;
-
-/**
- * Abstract implementation for an ObservableValue associated to a GMF custom
- * style (NamedStyle).
- *
- * @author Camille Letavernier
- *
- */
-public abstract class AbstractCustomStyleObservableValue extends AbstractObservableValue implements CommandBasedObservableValue, IChangeListener, IObserving {
-
- protected View source;
-
- protected EditingDomain domain;
-
- protected String styleName;
-
- protected Object lastValue;
-
- protected CustomStyleListener listener;
-
- protected EClass styleClass;
-
- protected EStructuralFeature styleFeature;
-
- public AbstractCustomStyleObservableValue(View source, EditingDomain domain, String styleName, EClass styleClass, EStructuralFeature styleFeature) {
- this.source = source;
- this.domain = domain;
- this.styleName = styleName;
- this.styleClass = styleClass;
- this.styleFeature = styleFeature;
- source.eAdapters().add(listener = new CustomStyleListener(source, styleFeature, this, styleName));
- }
-
- @Override
- public void handleChange(ChangeEvent event) {
-
- final Object oldValue = lastValue;
- final Object newValue = doGetValue();
-
- fireValueChange(new ValueDiff() {
-
- @Override
- public Object getOldValue() {
- return oldValue;
- }
-
- @Override
- public Object getNewValue() {
- return newValue;
- }
-
- });
- }
-
- @Override
- protected Object doGetValue() {
- NamedStyle valueStyle = source.getNamedStyle(styleClass, styleName);
- if (valueStyle != null) {
- lastValue = valueStyle.eGet(styleFeature);
- } else {
- lastValue = getDefaultValue();
- }
- return lastValue;
- }
-
- /**
- * Gets the default value when this style is not set.
- *
- * @return The default value for this NamedStyle
- */
- protected abstract Object getDefaultValue();
-
- @Override
- protected void doSetValue(Object value) {
- Command command = getCommand(value);
- domain.getCommandStack().execute(command);
- doGetValue(); // Refresh the lastValue
- }
-
- @Override
- public Command getCommand(Object value) {
- return new CustomStyleValueCommand(source, value, styleClass, styleFeature, styleName);
- }
-
- @Override
- public Object getObserved() {
- return source;
- }
-
- @Override
- public void dispose() {
- if (isDisposed()) {
- return;
- }
- if (listener != null) {
- source.eAdapters().remove(listener);
- listener.dispose();
- listener = null;
- }
- super.dispose();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - 402525
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom;
+
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.core.databinding.observable.value.ValueDiff;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
+import org.eclipse.papyrus.infra.tools.databinding.CommandBasedObservableValue;
+
+/**
+ * Abstract implementation for an ObservableValue associated to a GMF custom
+ * style (NamedStyle).
+ *
+ * @author Camille Letavernier
+ *
+ */
+public abstract class AbstractCustomStyleObservableValue extends AbstractObservableValue implements CommandBasedObservableValue, IChangeListener, IObserving {
+
+ protected View source;
+
+ protected EditingDomain domain;
+
+ protected String styleName;
+
+ protected Object lastValue;
+
+ protected CustomStyleListener listener;
+
+ protected EClass styleClass;
+
+ protected EStructuralFeature styleFeature;
+
+ public AbstractCustomStyleObservableValue(View source, EditingDomain domain, String styleName, EClass styleClass, EStructuralFeature styleFeature) {
+ this.source = source;
+ this.domain = domain;
+ this.styleName = styleName;
+ this.styleClass = styleClass;
+ this.styleFeature = styleFeature;
+ source.eAdapters().add(listener = new CustomStyleListener(source, styleFeature, this, styleName));
+ }
+
+ @Override
+ public void handleChange(ChangeEvent event) {
+
+ final Object oldValue = lastValue;
+ final Object newValue = doGetValue();
+
+ fireValueChange(new ValueDiff() {
+
+ @Override
+ public Object getOldValue() {
+ return oldValue;
+ }
+
+ @Override
+ public Object getNewValue() {
+ return newValue;
+ }
+
+ });
+ }
+
+ @Override
+ protected Object doGetValue() {
+ NamedStyle valueStyle = source.getNamedStyle(styleClass, styleName);
+ if (valueStyle != null) {
+ lastValue = valueStyle.eGet(styleFeature);
+ } else {
+ lastValue = getDefaultValue();
+ }
+ return lastValue;
+ }
+
+ /**
+ * Gets the default value when this style is not set.
+ *
+ * @return The default value for this NamedStyle
+ */
+ protected abstract Object getDefaultValue();
+
+ @Override
+ protected void doSetValue(Object value) {
+ Command command = getCommand(value);
+ domain.getCommandStack().execute(command);
+ doGetValue(); // Refresh the lastValue
+ }
+
+ @Override
+ public Command getCommand(Object value) {
+ return new CustomStyleValueCommand(source, value, styleClass, styleFeature, styleName);
+ }
+
+ @Override
+ public Object getObserved() {
+ return source;
+ }
+
+ @Override
+ public void dispose() {
+ if (isDisposed()) {
+ return;
+ }
+ if (listener != null) {
+ source.eAdapters().remove(listener);
+ listener.dispose();
+ listener = null;
+ }
+ super.dispose();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java
index 12d2758372a..d8638947696 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java
@@ -93,7 +93,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple
*
* @param svgNodePlateFigure
* the new SVG node plate container
- * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ICustomNodePlate#setSVGNodePlateContainer(org.eclipse.papyrus.uml.diagram.common.figure.node.SVGNodePlateFigure)
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ICustomNodePlate#setSVGNodePlateContainer(SVGNodePlateFigure)
*/
@Override
public void setSVGNodePlateContainer(SVGNodePlateFigure svgNodePlateFigure) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
index 1e1841b2197..7455ae503ff 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
@@ -1,189 +1,194 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, 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:
- * LIFL - Initial API and implementation
- * Christian W. Damus - bug 485220
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.model;
-
-import java.util.Collections;
-
-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.ecore.resource.URIConverter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.core.resource.BadArgumentExcetion;
-import org.eclipse.papyrus.infra.core.resource.EMFLogicalModel;
-import org.eclipse.papyrus.infra.core.resource.IEMFModel;
-import org.eclipse.papyrus.infra.core.resource.IModel;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-
-/**
- * @author cedric dumoulin
- *
- */
-public class NotationModel extends EMFLogicalModel implements IModel {
-
- /**
- * File extension used for notation.
- */
- public static final String NOTATION_FILE_EXTENSION = "notation"; //$NON-NLS-1$
-
- /**
- * Model ID.
- */
- public static final String MODEL_ID = "org.eclipse.papyrus.infra.core.resource.notation.NotationModel"; //$NON-NLS-1$
-
- /**
- *
- * Constructor.
- *
- */
- public NotationModel() {
-
- }
-
- /**
- * Get the file extension used for this model.
- *
- * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
- *
- * @return
- */
- @Override
- protected String getModelFileExtension() {
- return NOTATION_FILE_EXTENSION;
- }
-
- /**
- * Get the identifier used to register this model.
- *
- * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getIdentifier()
- *
- * @return
- */
- @Override
- public String getIdentifier() {
- return MODEL_ID;
- }
-
- /**
- * Add a new initialized {@link Diagram} to the model.
- *
- * @param newDiagram
- * The diagram to add.
- */
- public void addDiagram(Diagram newDiagram) {
- getResource().getContents().add(newDiagram);
- }
-
- // Prevent infinite loop from 2 models delegating to each other.
- private boolean checkingControlState = false;
-
- /**
- * Notation resources are controlled if their base element is controlled
- * In case the notation resource is empty, we should look at the associated resources and see if one of them is controlled.
- */
- @Override
- public boolean isControlled(Resource resource) {
- if (checkingControlState) {
- return false;
- }
-
- try {
- checkingControlState = true;
-
- for (Resource resourceInModelSet : modelSet.getResources()) {
- if (resource.getURI().trimFileExtension().equals(resourceInModelSet.getURI().trimFileExtension()) && !isRelatedResource(resourceInModelSet)) {
- if (!resourceInModelSet.getContents().isEmpty()) {
- EObject eObject = resourceInModelSet.getContents().get(0);
- IModel iModel = modelSet.getModelFor(eObject);
- if (iModel instanceof IEMFModel) {
- if (((IEMFModel) iModel).isControlled(resourceInModelSet)) {
- return true;
- }
- }
- }
- }
- }
- } finally {
- checkingControlState = false;
- }
-
- return false;
- }
-
- @Override
- public void handle(Resource resource) {
- super.handle(resource);
- if (resource == null) {
- return;
- }
-
- // If the parameter resource is already a notation resource, nothing to do
- if (!isRelatedResource(resource)) {
- URI notationURI = resource.getURI().trimFileExtension().appendFileExtension(NOTATION_FILE_EXTENSION);
- ResourceSet resourceSet = getResourceSet();
- if (resourceSet != null && resourceSet.getURIConverter() != null) {
- URIConverter converter = resourceSet.getURIConverter();
- if (converter.exists(notationURI, Collections.emptyMap())) {
- // If the notation resource associated to the parameter resource exists, load it
- getResourceSet().getResource(notationURI, true);
- }
- }
- }
- }
-
-
- /**
- * Get a diagram by its name.
- *
- * @param diagramName
- * Name of the diagram. This is the name set by the user.
- * @return
- * @throws NotFoundException
- * @throws BadArgumentExcetion
- */
- public Diagram getDiagram(String diagramName) throws NotFoundException, BadArgumentExcetion {
-
- if (diagramName == null || diagramName.length() == 0) {
- throw new BadArgumentExcetion("Diagram name should not be null and size should be >0."); //$NON-NLS-1$
- }
-
- for (Resource current : getResources()) {
- for (EObject element : current.getContents()) {
- if (element instanceof Diagram) {
- Diagram diagram = (Diagram) element;
-
- if (diagramName.equals(diagram.getName())) {
- // Found
- return diagram;
-
- }
- }
- }
- }
- // not found
- throw new NotFoundException(NLS.bind("No Diagram named '{0}' can be found in Model.",diagramName)); //$NON-NLS-1$
- }
-
- /**
- * An object is additionally a root element only if it has a corresponding
- * viewpoint prototope.
- */
- @Override
- protected boolean isRootElement(EObject object) {
- return super.isRootElement(object) && ViewPrototype.isViewObject(object);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, 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:
+ * LIFL - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.model;
+
+import java.util.Collections;
+
+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.ecore.resource.URIConverter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.resource.BadArgumentExcetion;
+import org.eclipse.papyrus.infra.core.resource.EMFLogicalModel;
+import org.eclipse.papyrus.infra.core.resource.IEMFModel;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * @author cedric dumoulin
+ *
+ */
+public class NotationModel extends EMFLogicalModel implements IModel {
+
+ /**
+ * File extension used for notation.
+ */
+ public static final String NOTATION_FILE_EXTENSION = "notation"; //$NON-NLS-1$
+
+ /**
+ * Model ID.
+ */
+ public static final String MODEL_ID = "org.eclipse.papyrus.infra.core.resource.notation.NotationModel"; //$NON-NLS-1$
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public NotationModel() {
+
+ }
+
+ /**
+ * Get the file extension used for this model.
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
+ *
+ * @return
+ */
+ @Override
+ protected String getModelFileExtension() {
+ return NOTATION_FILE_EXTENSION;
+ }
+
+ /**
+ * Get the identifier used to register this model.
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getIdentifier()
+ *
+ * @return
+ */
+ @Override
+ public String getIdentifier() {
+ return MODEL_ID;
+ }
+
+ /**
+ * Add a new initialized {@link Diagram} to the model.
+ *
+ * @param newDiagram
+ * The diagram to add.
+ */
+ public void addDiagram(Diagram newDiagram) {
+ getResource().getContents().add(newDiagram);
+ }
+
+ // Prevent infinite loop from 2 models delegating to each other.
+ private boolean checkingControlState = false;
+
+ /**
+ * Notation resources are controlled if their base element is controlled
+ * In case the notation resource is empty, we should look at the associated resources and see if one of them is controlled.
+ */
+ @Override
+ public boolean isControlled(Resource resource) {
+ if (checkingControlState) {
+ return false;
+ }
+
+ try {
+ checkingControlState = true;
+
+ for (Resource resourceInModelSet : modelSet.getResources()) {
+ if (resource.getURI().trimFileExtension().equals(resourceInModelSet.getURI().trimFileExtension()) && !isRelatedResource(resourceInModelSet)) {
+ if (!resourceInModelSet.getContents().isEmpty()) {
+ EObject eObject = resourceInModelSet.getContents().get(0);
+ IModel iModel = modelSet.getModelFor(eObject);
+ if (iModel instanceof IEMFModel) {
+ if (((IEMFModel) iModel).isControlled(resourceInModelSet)) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ } finally {
+ checkingControlState = false;
+ }
+
+ return false;
+ }
+
+ @Override
+ public void handle(Resource resource) {
+ super.handle(resource);
+ if (resource == null) {
+ return;
+ }
+
+ // If the parameter resource is already a notation resource, nothing to do
+ if (!isRelatedResource(resource)) {
+ URI notationURI = resource.getURI().trimFileExtension().appendFileExtension(NOTATION_FILE_EXTENSION);
+ ResourceSet resourceSet = getResourceSet();
+ if (resourceSet != null && resourceSet.getURIConverter() != null) {
+ URIConverter converter = resourceSet.getURIConverter();
+ if (converter.exists(notationURI, Collections.emptyMap())) {
+ // If the notation resource associated to the parameter resource exists, load it
+ getResourceSet().getResource(notationURI, true);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Get a diagram by its name.
+ *
+ * @param diagramName
+ * Name of the diagram. This is the name set by the user.
+ * @return
+ * @throws NotFoundException
+ * @throws BadArgumentExcetion
+ */
+ public Diagram getDiagram(String diagramName) throws NotFoundException, BadArgumentExcetion {
+
+ if (diagramName == null || diagramName.length() == 0) {
+ throw new BadArgumentExcetion("Diagram name should not be null and size should be >0."); //$NON-NLS-1$
+ }
+
+ for (Resource current : getResources()) {
+ for (EObject element : current.getContents()) {
+ if (element instanceof Diagram) {
+ Diagram diagram = (Diagram) element;
+
+ if (diagramName.equals(diagram.getName())) {
+ // Found
+ return diagram;
+
+ }
+ }
+ }
+ }
+ // not found
+ throw new NotFoundException(NLS.bind("No Diagram named '{0}' can be found in Model.", diagramName)); //$NON-NLS-1$
+ }
+
+ /**
+ * An object is additionally a root element only if it has a corresponding
+ * viewpoint prototope.
+ */
+ @Override
+ protected boolean isRootElement(EObject object) {
+ return super.isRootElement(object) && ViewPrototype.isViewObject(object);
+ }
+
+ @Override
+ protected boolean isSupportedRoot(EObject object) {
+ return ViewPrototype.isViewObject(object);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
index abe00ff970f..fca433cae04 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+ * Copyright (c) 2009, 2016 Atos Origin, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,10 +8,12 @@
*
* Contributors:
* Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Christian W. Damus - bug 482220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.model;
+import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -194,6 +195,41 @@ public class NotationUtils {
}
/**
+ * Obtains all of the notation views (diagrams, tables, etc.) persisted in a resource-set.
+ *
+ * @param resourceSet
+ * a resource-set
+ *
+ * @return all of the notations within it
+ *
+ * @see #getAllNotations(ResourceSet, Class)
+ */
+ public static Iterable<EObject> getAllNotations(ResourceSet resourceSet) {
+ return getAllNotations(resourceSet, EObject.class);
+ }
+
+ /**
+ * Obtains all of the notation views of some type persisted in a resource-set.
+ *
+ * @param resourceSet
+ * a resource-set
+ * @param type
+ * the notation type (diagram, table, etc.)
+ *
+ * @return all of the notations of that {@code type} within it
+ */
+ public static <T extends EObject> Iterable<T> getAllNotations(ResourceSet resourceSet, Class<T> type) {
+ // Algorithm ported from NavigatorUtils::getNotationRoots() in the Model Explorer View bundle
+ return () -> resourceSet.getResources().stream()
+ .filter(r -> NotationModel.NOTATION_FILE_EXTENSION.equalsIgnoreCase(r.getURI().fileExtension()))
+ .map(Resource::getContents)
+ .flatMap(Collection::stream)
+ .filter(type::isInstance)
+ .map(type::cast)
+ .iterator();
+ }
+
+ /**
* Helper to retrieve the Notation resource associated to a ModelSet. May be null.
*
* @param from
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/IPasteCommandProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/IPasteCommandProvider.java
new file mode 100644
index 00000000000..84c3bbd2b92
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/IPasteCommandProvider.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.providers;
+
+import java.awt.datatransfer.Clipboard;
+import java.util.Collection;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+
+/**
+ *
+ * a paste provider has provide operation in order to paste by taking account system clipboard or papyrus clipboard
+ *
+ */
+public interface IPasteCommandProvider {
+
+ /**
+ * return the paste command to execute by taking account parameter
+ *
+ * @param targetEditPart
+ * the target where object will be paste
+ * @param systemClipboard
+ * contains info form the system copy paste
+ * @param papyrusCliboard
+ * the list of views to paste
+ * @return a command
+ */
+ public ICommand getPasteViewCommand(GraphicalEditPart targetEditPart, Clipboard systemClipboard, Collection<Object> papyrusCliboard);
+
+ /**
+ * return the paste command to execute by taking account parameter. It copy also element of the semantic model
+ *
+ * @param targetEditPart
+ * the target where object will be paste
+ * @param systemClipboard
+ * contains info form the system copy paste
+ * @param papyrusCliboard
+ * the list of views to paste
+ * @return a command
+ */
+ public ICommand getPasteWithModelCommand(GraphicalEditPart targetEditPart, Clipboard systemClipboard, Collection<Object> papyrusCliboard);
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler.java
index 2e0e82ffb6d..f9b8bf3aff8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler.java
@@ -8,7 +8,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.StringValueStyle;
/**
- * Instances of this base class are provided via "org.eclipse.papyrus.uml.diagram.common.diagramReconciler" extension point and provide migration of
+ * Instances of this base class are provided via "org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler" extension point and provide migration of
* the diagram instances from "previous" version to the "current" Papyrus version. The version is stored as a {@link StringValueStyle} with name {@link DiagramVersioningUtils#COMPATIBILITY_VERSION}.
* <p/>
* Every {@link DiagramReconciler} subclass provides statical descriptor of its capabilities (that is, the supported diagram type, outdated "previous" version and the expected "current" version). For some possible advanced cases it also gets a chance to
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/PasteCommandService.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/PasteCommandService.java
new file mode 100644
index 00000000000..a2aa3a342b8
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/PasteCommandService.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.service;
+
+import java.awt.datatransfer.Clipboard;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.IPasteCommandProvider;
+
+/**
+ * this singleton looks for in extension point to find a pasteCommandProvider
+ * and can provide a paste command
+ */
+
+
+public class PasteCommandService {
+
+ private static final String PASTECOMMANDPROVIDER_EXTENSION_ID = Activator.ID + ".pasteCommandProvider"; //$NON-NLS-1$
+
+ private static final String REALIZATION = "realization"; //$NON-NLS-1$
+
+ private static final String PRIORITY = "priority"; //$NON-NLS-1$
+
+ private static PasteCommandService instance = null;
+
+ public static PasteCommandService getInstance() {
+ if (instance == null) {
+ instance = new PasteCommandService();
+ }
+ return instance;
+ }
+
+
+ /**
+ * Load an instance of a class
+ *
+ * @param element
+ * the extension point
+ * @param classAttribute
+ * the name of the class to load
+ * @return the loaded Class
+ * @throws Exception
+ * if the class is not loaded
+ */
+ protected static Object createExtension(final IConfigurationElement element, final String classAttribute) throws Exception {
+ return element.createExecutableExtension(classAttribute);
+ }
+
+ protected Map<String, IPasteCommandProvider> pasteCommandProviderMap;
+
+
+ private PasteCommandService() {
+ // Reading data from plugins
+ IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(PASTECOMMANDPROVIDER_EXTENSION_ID);
+ pasteCommandProviderMap = new HashMap<String, IPasteCommandProvider>();
+ for (int i = 0; i < configElements.length; i++) {
+ getPasteCommandProvider(configElements[i]);
+ }
+
+ }
+
+ /**
+ * Load one rule
+ *
+ * @param element
+ * the extension point
+ */
+ protected void getPasteCommandProvider(IConfigurationElement element) {
+ IPasteCommandProvider pasteCommandProvider = null;
+ try {
+ pasteCommandProvider = (IPasteCommandProvider) createExtension(element, REALIZATION);
+ String priority = element.getAttribute(PRIORITY);
+ pasteCommandProviderMap.put(priority, pasteCommandProvider);
+
+ } catch (Exception e) {
+ Activator.log.error("- " + pasteCommandProvider + " can not be loaded: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
+ }
+ }
+
+ protected IPasteCommandProvider lookForProvider() {
+ String[] priority = { "Highest", "High", "Medium", "Low", "Lowest" };
+ IPasteCommandProvider selectedProvider = null;
+ int i = 0;
+ while (selectedProvider == null && i < priority.length) {
+ selectedProvider = pasteCommandProviderMap.get(priority[i]);
+ i++;
+ }
+ return selectedProvider;
+ }
+
+ /**
+ * return the paste command to execute by taking account parameter
+ *
+ * @param targetEditPart
+ * the target where object will be paste
+ * @param systemClipboard
+ * contains info form the system copy paste
+ * @param papyrusCliboard
+ * the list of views to paste
+ * @return a command
+ */
+ public ICommand getPasteViewCommand(GraphicalEditPart targetEditPart, Clipboard systemClipboard, Collection<Object> papyrusCliboard) {
+ IPasteCommandProvider selectedProvider = lookForProvider();
+ if (selectedProvider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return selectedProvider.getPasteViewCommand(targetEditPart, systemClipboard, papyrusCliboard);
+ }
+
+ /**
+ * return the paste command to execute by taking account parameter. It copy also element of the semantic model
+ *
+ * @param targetEditPart
+ * the target where object will be paste
+ * @param systemClipboard
+ * contains info form the system copy paste
+ * @param papyrusCliboard
+ * the list of views to paste
+ * @return a command
+ */
+ public ICommand getPasteWithModelCommand(GraphicalEditPart targetEditPart, Clipboard systemClipboard, Collection<Object> papyrusCliboard) {
+ IPasteCommandProvider selectedProvider = lookForProvider();
+ if (selectedProvider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return selectedProvider.getPasteWithModelCommand(targetEditPart, systemClipboard, papyrusCliboard);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/GraphicalDeletionHelperService.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/GraphicalDeletionHelperService.java
new file mode 100644
index 00000000000..d8eb431e328
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/GraphicalDeletionHelperService.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus 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:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.spi;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.papyrus.infra.tools.util.CompositeServiceTracker;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A delegating deletion helper that consults registered deletion-helper services.
+ */
+public class GraphicalDeletionHelperService implements IGraphicalDeletionHelper {
+
+ private final CompositeServiceTracker<IGraphicalDeletionHelper> tracker;
+
+ public GraphicalDeletionHelperService(BundleContext context) {
+ super();
+
+ tracker = new CompositeServiceTracker<>(context,
+ IGraphicalDeletionHelper.class,
+ IGraphicalDeletionHelper.DEFAULT,
+ IGraphicalDeletionHelper::compose);
+ tracker.open();
+ }
+
+ public void dispose() {
+ tracker.close();
+ }
+
+ @Override
+ public boolean canDelete(IGraphicalEditPart editPart) {
+ return tracker.getService().canDelete(editPart);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/IGraphicalDeletionHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/IGraphicalDeletionHelper.java
new file mode 100644
index 00000000000..e7b318c3139
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/spi/IGraphicalDeletionHelper.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus 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:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.spi;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+
+/**
+ * Protocol of a pluggable graphical deletion helper strategy.
+ */
+public interface IGraphicalDeletionHelper {
+ /** The default instance just checks whether the edit-part is not read-only. */
+ IGraphicalDeletionHelper DEFAULT = ep -> !DiagramEditPartsUtil.isReadOnly(ep);
+
+ /**
+ * Queries whether the specified edit-part can be deleted. If the helper
+ * does not have a specific positive answer for the edit-part, it should
+ * return {@code false} to let another helper answer (the ultimate fall-back
+ * checks the standard read-only state of the edit-part).
+ *
+ * @param editPart
+ * an edit-part that is proposed for deletion
+ *
+ * @return whether it may be delete, or {@code false} if I don't know
+ */
+ boolean canDelete(IGraphicalEditPart editPart);
+
+ /**
+ * Composes me with an{@code other} helper in a disjuntion
+ * on the {@link #canDelete(IGraphicalEditPart)} operation.
+ *
+ * @param other
+ * another graphical deletion helper
+ *
+ * @return the composed helper
+ */
+ default IGraphicalDeletionHelper compose(IGraphicalDeletionHelper other) {
+ return ep -> other.canDelete(ep) || this.canDelete(ep);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
index f276013441e..1e701af7a6d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
- *
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,8 +8,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- * Christian W. Damus - bug 433206
- * Christian W. Damus - bug 473148
+ * Christian W. Damus - bugs 433206, 473148, 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.utils;
@@ -30,6 +28,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.RootEditPart;
@@ -55,7 +54,13 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.infra.ui.util.EditorHelper;
import org.eclipse.ui.IEditorPart;
@@ -63,6 +68,7 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import com.google.common.base.Function;
+import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
@@ -907,4 +913,88 @@ public class DiagramEditPartsUtil {
return result;
}
+ /**
+ * Checks if is semantic deletion.
+ *
+ * @param editPart
+ * the edit part
+ * @return true, if is semantic deletion
+ */
+ public static boolean isSemanticDeletion(IGraphicalEditPart editPart) {
+ boolean isSemanticDeletion = false;
+ TransactionalEditingDomain editingDomain = null;
+
+ // Get Editing Domain
+ try {
+ editingDomain = ServiceUtilsForEditPart.getInstance().getTransactionalEditingDomain(editPart);
+ } catch (ServiceException e) {
+
+ }
+
+ if (editingDomain != null) {
+
+ IReadOnlyHandler2 readOnly = ReadOnlyManager.getReadOnlyHandler(editingDomain);
+ EObject semantic = EMFHelper.getEObject(editPart);
+ View graphical = NotationHelper.findView(editPart);
+
+ isSemanticDeletion = !(semantic == null || semantic == graphical || semantic.eContainer() == null);
+
+
+ if (isSemanticDeletion && readOnly != null) {
+ // Is the semantic element read-only?
+ Optional<Boolean> result = readOnly.isReadOnly(ReadOnlyAxis.anyAxis(), semantic);
+ if (!result.or(false) && (graphical != null)) {
+ // Or, if not, is the graphical element read-only?
+ result = readOnly.isReadOnly(ReadOnlyAxis.anyAxis(), graphical);
+ }
+
+ // Are both the semantic and graphical elements writable?
+ isSemanticDeletion = !result.or(false);
+ }
+ }
+
+
+ return isSemanticDeletion;
+ }
+
+ /**
+ * Checks if this is a read only element from the edit part.
+ *
+ * @param editPart
+ * the edit part
+ * @return true, if this is a read only element.
+ */
+ public static boolean isReadOnly(final IGraphicalEditPart editPart) {
+ boolean isReadOnly = true;
+ TransactionalEditingDomain editingDomain = null;
+
+ // Get Editing Domain
+ try {
+ editingDomain = ServiceUtilsForEditPart.getInstance().getTransactionalEditingDomain(editPart);
+ } catch (ServiceException e) {
+ // Do nothing
+ }
+
+ if (null != editingDomain) {
+
+ final IReadOnlyHandler2 readOnly = ReadOnlyManager.getReadOnlyHandler(editingDomain);
+ final EObject semantic = EMFHelper.getEObject(editPart);
+ final View graphical = NotationHelper.findView(editPart);
+
+ if (null != readOnly && null != semantic) {
+ // Is the semantic element read-only?
+ Optional<Boolean> result = readOnly.isReadOnly(ReadOnlyAxis.anyAxis(), semantic);
+ isReadOnly = result.get();
+
+ if (!isReadOnly && (graphical != null)) {
+ // Or, if not, is the graphical element read-only?
+ result = readOnly.isReadOnly(ReadOnlyAxis.anyAxis(), graphical);
+ isReadOnly = result.get();
+ }
+ }
+ }
+
+ return isReadOnly;
+ }
+
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/GMFUnsafe.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/GMFUnsafe.java
index 9a69ef17b2e..5838683d503 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/GMFUnsafe.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/GMFUnsafe.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,29 +8,26 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*/
package org.eclipse.papyrus.infra.gmfdiag.common.utils;
import java.util.Collection;
-import java.util.Collections;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
import org.eclipse.em