Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2018-01-09 05:09:46 -0500
committerQuentin Le Menez2018-01-09 08:18:15 -0500
commitd98116b5b376f18b6cf626ba4158a35fe9a4a64e (patch)
tree4458c9c5ada0a216b385813a56ea9a9b8c7b6509 /plugins/infra/gmfdiag/css
parent453e99bc2dcbd5fabad100f9d0d5f682013c3b19 (diff)
downloadorg.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.tar.gz
org.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.tar.xz
org.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.zip
Bug 515367 - [releng] Uniformization of the end of lines to Unix standard
- Format the EOL of all the files matched by: grep -rIUs . | xargs -Ifile dos2unix -k 'file' Change-Id: I5c41d540a9a67b50de9b912ab35e16cc9a912961 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/css')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF28
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/about.html54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/build.properties16
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/plugin.xml150
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/pom.xml20
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/Activator.java138
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/ApplyStyleHandler.java174
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/CreateStyleHandler.java154
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/EditStyleHandler.java88
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleCreationDialog.java434
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleEditionDialog.java532
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/DiagramTypeHelper.java114
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/XtextStylesheetHelper.java222
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java262
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java192
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/about.html54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml20
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/Activator.java138
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllCSSStyleSheetCommand.java130
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllModelStyleSheetCommand.java146
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCSSStyleSheetCommand.java122
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCssClassStyleCommand.java144
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddModelStyleSheetCommand.java116
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/CustomModelStyleSheetListener.java186
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/DiagramStyleSheetObservableList.java150
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java430
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllCSSStyleSheetValueCommand.java134
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllModelStyleSheetValueCommand.java168
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveCSSStyleSheetCommand.java118
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveObjectCommand.java142
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/SetCSSStyleSheetCommand.java90
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java272
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElementFactory.java90
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java172
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java68
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/META-INF/MANIFEST.MF14
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/about.html54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/build.properties12
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css376
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/about.html54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/build.properties22
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/plugin.properties6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/pom.xml20
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/domElementAdapter.exsd218
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/markertopseudoselectormappingprovider.exsd248
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/theme.exsd304
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/userAgentStyleSheet.exsd204
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSDecorationNodeImpl.java338
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSEdgeImpl.java354
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSNodeImpl.java354
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/CSSView.java148
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageBufferStyleDelegate.java112
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageStyleDelegate.java108
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSViewDelegate.java444
-rwxr-xr-xplugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/CssSvgPostProcessor.java844
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/BooleanConverter.java100
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java256
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/IntegerConverter.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/StringConverter.java96
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java1500
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java352
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicy.java512
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicyProvider.java112
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicy.java562
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicyProvider.java108
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/BaseCSSEngine.java244
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ElementProviderWrapper.java248
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngine.java324
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngineImpl.java874
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/GMFElementProvider.java130
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/GMFErrorHandler.java70
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ICSSElementProviderFactory.java48
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/LazyCSSEngine.java72
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ModelCSSEngine.java388
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ProjectCSSEngine.java456
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/enginecopy/ExtendedViewCSSImpl.java292
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/handler/ResetStyleHandler.java130
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/CSSDOMSemanticElementHelper.java402
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/CSSHelper.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/GradientHelper.java358
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/LabelDisplayHelper.java54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/ParserHelper.java190
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/ResetStyleHelper.java134
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/helper/StringHelper.java80
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/listener/StyleSheetChangeListener.java60
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/lists/ExtendedCSSRuleList.java138
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/lists/ExtendedSelectorList.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/lists/ExtendedStyleSheetList.java114
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSAnnotations.java52
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagram.java88
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSStyles.java124
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java288
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/StatefulView.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/preferences/ThemePreferences.java50
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSAppearanceProvider.java100
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java92
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CustomStyle.java56
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/IPapyrusElementProvider.java58
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/resource/CSSNotationModel.java52
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/resource/CSSNotationResource.java294
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/resource/CSSNotationResourceAdapter.java146
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/resource/CSSNotationResourceFactory.java88
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/CssMarkerEventManagerService.java478
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/IMarkerToPseudoSelectorMappingProvider.java22
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/service/MarkerToPseudoSelectorMappingService.java216
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSInjectorProvider.java96
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSUiInjectorProvider.java34
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF52
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/about.html54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml100
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/ui/AbstractCSSUiModule.java422
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/ui/CSSExecutableExtensionFactory.java58
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/antlr/PartialCSSContentAssistParser.java76
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/antlr/internal/InternalCSS.tokens212
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/ui/internal/CSSActivator.java190
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/CSSUiModule.java70
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CSSProposalProvider.xtend24
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/labeling/CSSDescriptionLabelProvider.xtend48
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/labeling/CSSLabelProvider.xtend58
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/outline/CSSOutlineTreeProvider.xtend26
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/quickfix/CSSQuickfixProvider.xtend52
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/.launch/Generate Language Infrastructure (org.eclipse.papyrus.infra.gmfdiag.css3.xtext).launch28
-rwxr-xr-xplugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/META-INF/MANIFEST.MF72
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/about.html54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/plugin.xml32
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/pom.xml100
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/AbstractCSSRuntimeModule.java350
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSStandaloneSetupGenerated.java120
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/AttributeSelector.java224
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/ClassSelector.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/ColorTok.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/CssSelector.java36
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/CssTok.java36
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/ElementSelector.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/FuncTok.java142
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/IdSelector.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/IdentifierTok.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/NumberTok.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/PseudoClass.java34
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/PseudoClassFunction.java262
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/PseudoClassName.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/PseudoClassOrFunc.java34
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/SimpleSelectorForNegation.java206
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/StringTok.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/SymbolTok.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/URLType.java164
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/UniversalSelector.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/UrlTok.java104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/WSTok.java34
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/charset.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/css_declaration.java206
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/css_property.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/font_face.java178
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/AttributeSelectorImpl.java600
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/ClassSelectorImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/ColorTokImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/CssSelectorImpl.java82
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/CssTokImpl.java82
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/ElementSelectorImpl.java358
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/FuncTokImpl.java488
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/IdSelectorImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/IdentifierTokImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/NumberTokImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/PseudoClassFunctionImpl.java766
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/PseudoClassImpl.java78
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/PseudoClassNameImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/PseudoClassOrFuncImpl.java78
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/SimpleSelectorForNegationImpl.java652
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/StringTokImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/SymbolTokImpl.java356
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/URLTypeImpl.java478
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/UniversalSelectorImpl.java358
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/UrlTokImpl.java392
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/WSTokImpl.java78
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/charsetImpl.java358
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/css_declarationImpl.java646
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/css_propertyImpl.java358
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/font_faceImpl.java562
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/importExpressionImpl.java358
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/keyframe_selectorImpl.java606
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/keyframesImpl.java82
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/mediaImpl.java484
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/pageImpl.java484
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/rulesetImpl.java404
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/selectorImpl.java644
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/simple_selectorImpl.java652
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/stylesheetImpl.java890
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/importExpression.java106
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/keyframe_selector.java206
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/keyframes.java36
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/media.java146
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/page.java146
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/ruleset.java122
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/selector.java206
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/simple_selector.java206
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/stylesheet.java326
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/parser/antlr/CSSAntlrTokenFileProvider.java32
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/parser/antlr/CSSParser.java78
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/parser/antlr/internal/InternalCSS.tokens212
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/parser/antlr/internal/InternalCSSLexer.java4146
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/parser/antlr/internal/InternalCSSParser.java25306
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/serializer/CSSSyntacticSequencer.java1016
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/validation/AbstractCSSValidator.java36
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src/org/eclipse/papyrus/infra/gmfdiag/css3/CSSRuntimeModule.java22
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src/org/eclipse/papyrus/infra/gmfdiag/css3/CSSStandaloneSetup.java30
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src/org/eclipse/papyrus/infra/gmfdiag/css3/GenerateCSS.mwe2250
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src/org/eclipse/papyrus/infra/gmfdiag/css3/generator/CSSGenerator.xtend48
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src/org/eclipse/papyrus/infra/gmfdiag/css3/scoping/CSSScopeProvider.xtend30
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src/org/eclipse/papyrus/infra/gmfdiag/css3/validation/CSSValidator.xtend50
212 files changed, 36883 insertions, 36883 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/.settings/org.eclipse.jdt.core.prefs
index 9ca8e68231b..f08be2b06c4 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/.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.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-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.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.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+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.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.configuration/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF
index 56d43f26261..e164bbf35b5 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF
@@ -1,14 +1,14 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler
-Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
- org.eclipse.e4.ui.css.core;bundle-version="[0.11.0,1.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 2.0.0.qualifier
-Bundle-Name: CSS Configuration
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.configuration;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.e4.ui.css.core;bundle-version="[0.11.0,1.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Name: CSS Configuration
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.configuration;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/about.html b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/about.html
index 209103075a7..dd3c089a94c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/about.html
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>November 14, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/build.properties b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/build.properties
index 44a8b669f12..461e5612867 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/build.properties
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/build.properties
@@ -1,8 +1,8 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- about.html
-src.includes = about.html
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/plugin.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/plugin.xml
index 292c0bbd300..20a0ac25226 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/plugin.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/plugin.xml
@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.uml.diagram.ui.popupmenu.format?after=org.eclipse.papyrus.uml.diagram.menu.commands.CopyAppearancePropertiesCommand">
- <separator
- name="org.eclipse.papyrus.infra.gmfdiag.css.separator"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.papyrus.infra.gmfdiag.css.createStyle"
- icon="icons/sourceEditor.gif"
- style="push">
- <visibleWhen
- checkEnabled="true">
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.gmfdiag.css.editStyle"
- icon="icons/sourceEditor.gif"
- style="push">
- <visibleWhen
- checkEnabled="true">
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.gmfdiag.css.applyStyle"
- icon="icons/sourceEditor.gif"
- style="push">
- <visibleWhen
- checkEnabled="true">
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.papyrus.editor.category"
- description="Creates a new style based on the selected item"
- id="org.eclipse.papyrus.infra.gmfdiag.css.createStyle"
- name="Create a new style">
- </command>
- <command
- description="Replace an existing style based on the selected item"
- id="org.eclipse.papyrus.infra.gmfdiag.css.editStyle"
- name="Edit an existing style">
- </command>
- <command
- categoryId="org.eclipse.papyrus.editor.category"
- description="Apply a style on the selected item"
- id="org.eclipse.papyrus.infra.gmfdiag.css.applyStyle"
- name="Apply a style">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.ApplyStyleHandler"
- commandId="org.eclipse.papyrus.infra.gmfdiag.css.applyStyle">
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.CreateStyleHandler"
- commandId="org.eclipse.papyrus.infra.gmfdiag.css.createStyle">
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.EditStyleHandler"
- commandId="org.eclipse.papyrus.infra.gmfdiag.css.editStyle">
- </handler>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.uml.diagram.ui.popupmenu.format?after=org.eclipse.papyrus.uml.diagram.menu.commands.CopyAppearancePropertiesCommand">
+ <separator
+ name="org.eclipse.papyrus.infra.gmfdiag.css.separator"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css.createStyle"
+ icon="icons/sourceEditor.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css.editStyle"
+ icon="icons/sourceEditor.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css.applyStyle"
+ icon="icons/sourceEditor.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Creates a new style based on the selected item"
+ id="org.eclipse.papyrus.infra.gmfdiag.css.createStyle"
+ name="Create a new style">
+ </command>
+ <command
+ description="Replace an existing style based on the selected item"
+ id="org.eclipse.papyrus.infra.gmfdiag.css.editStyle"
+ name="Edit an existing style">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Apply a style on the selected item"
+ id="org.eclipse.papyrus.infra.gmfdiag.css.applyStyle"
+ name="Apply a style">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.ApplyStyleHandler"
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css.applyStyle">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.CreateStyleHandler"
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css.createStyle">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.EditStyleHandler"
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css.editStyle">
+ </handler>
+ </extension>
+
+</plugin>
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 1b1c98a02e4..baf74d18a9b 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
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <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>
- <version>2.0.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <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>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/Activator.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/Activator.java
index 04f40e90953..c76f5cd991b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/Activator.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/Activator.java
@@ -1,69 +1,69 @@
-/*****************************************************************************
- * 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.configuration;
-
-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.configuration"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- 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 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.configuration;
+
+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.configuration"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ 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;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/ApplyStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/ApplyStyleHandler.java
index d4961793a6f..b204bd312f7 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/ApplyStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/ApplyStyleHandler.java
@@ -1,87 +1,87 @@
-/*****************************************************************************
- * Copyright (c) 2017 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:
- * Benoit Maggi (CEA LIST) - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.AddCssClassStyleCommand;
-import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
-import org.eclipse.papyrus.infra.widgets.editors.InputDialog;
-import org.eclipse.papyrus.infra.widgets.messages.Messages;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Apply a style to a view using a right click menu
- */
-public class ApplyStyleHandler extends AbstractHandler {
-
-
- /**
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- *
- * @param event
- * @return
- * @throws ExecutionException
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection;
- try {
- selection = ServiceUtilsForHandlers.getInstance().getNestedActiveIEditorPart(event).getSite().getSelectionProvider().getSelection();
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- Iterator iterator = ((IStructuredSelection) selection).iterator();
- List<View> selectedViews = new ArrayList<>();
- while (iterator.hasNext()) {
- Object it = iterator.next();
- View view = NotationHelper.findView(it);
- if (view != null) {
- selectedViews.add(view);
- }
- }
-
- if (!selectedViews.isEmpty()) {
- Shell parentShell = ((Event) event.getTrigger()).widget.getDisplay().getActiveShell();
- InputDialog dialog = new InputDialog(parentShell, Messages.StringEditionFactory_EnterANewValue, Messages.StringEditionFactory_EnterANewValue, "", null); //$NON-NLS-1$
- int result = dialog.open();
- if (result == Window.OK) {
- String newStyleValue = dialog.getText();
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(selectedViews.get(0));
- AddCssClassStyleCommand addCssClassStyleCommand = new AddCssClassStyleCommand(editingDomain, selectedViews, newStyleValue);
- editingDomain.getCommandStack().execute(addCssClassStyleCommand);
- return newStyleValue;
- }
- }
-
- }
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- }
- return null;
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2017 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:
+ * Benoit Maggi (CEA LIST) - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.AddCssClassStyleCommand;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.widgets.editors.InputDialog;
+import org.eclipse.papyrus.infra.widgets.messages.Messages;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Apply a style to a view using a right click menu
+ */
+public class ApplyStyleHandler extends AbstractHandler {
+
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection;
+ try {
+ selection = ServiceUtilsForHandlers.getInstance().getNestedActiveIEditorPart(event).getSite().getSelectionProvider().getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Iterator iterator = ((IStructuredSelection) selection).iterator();
+ List<View> selectedViews = new ArrayList<>();
+ while (iterator.hasNext()) {
+ Object it = iterator.next();
+ View view = NotationHelper.findView(it);
+ if (view != null) {
+ selectedViews.add(view);
+ }
+ }
+
+ if (!selectedViews.isEmpty()) {
+ Shell parentShell = ((Event) event.getTrigger()).widget.getDisplay().getActiveShell();
+ InputDialog dialog = new InputDialog(parentShell, Messages.StringEditionFactory_EnterANewValue, Messages.StringEditionFactory_EnterANewValue, "", null); //$NON-NLS-1$
+ int result = dialog.open();
+ if (result == Window.OK) {
+ String newStyleValue = dialog.getText();
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(selectedViews.get(0));
+ AddCssClassStyleCommand addCssClassStyleCommand = new AddCssClassStyleCommand(editingDomain, selectedViews, newStyleValue);
+ editingDomain.getCommandStack().execute(addCssClassStyleCommand);
+ return newStyleValue;
+ }
+ }
+
+ }
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ }
+ return null;
+ }
+
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/CreateStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/CreateStyleHandler.java
index 6cf970b662d..97349e5ebd9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/CreateStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/CreateStyleHandler.java
@@ -1,77 +1,77 @@
-/*****************************************************************************
- * 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.configuration.handler;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.infra.gmfdiag.css.configuration.helper.XtextStylesheetHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CSSFactory;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class CreateStyleHandler extends AbstractStyleHandler {
-
- @Override
- protected AbstractStyleDialog createStyleDialog(Shell shell, Map<css_declaration, Boolean> declarations, Map<AttributeSelector, Boolean> conditions, String selectorName, View context) {
- return new StyleCreationDialog(shell, conditions, declarations, selectorName, context);
- }
-
- @Override
- protected ruleset getRuleset(AbstractStyleDialog dialog) {
- return CSSFactory.eINSTANCE.createruleset();
- }
-
- @Override
- protected stylesheet getStyleSheet(AbstractStyleDialog dialog, View contextView) {
- StyleSheet styleSheet = ((StyleCreationDialog) dialog).getStyleSheet();
-
- if (styleSheet == null) {
- MessageDialog.open(MessageDialog.ERROR, dialog.getShell(), "Stylesheet error", "Invalid stylesheet", SWT.NONE);
- return null;
- }
-
- Resource resource;
-
- if (styleSheet instanceof StyleSheetReference) {
- resource = XtextStylesheetHelper.loadStylesheet((StyleSheetReference) styleSheet, null, contextView, dialog.getShell());
- if (resource == null) {
- return null;
- }
- } else {
- MessageDialog.open(MessageDialog.ERROR, dialog.getShell(), "Stylesheet error", "Embedded stylesheets are not yet supported", SWT.NONE);
- return null;
- }
-
- stylesheet xtextStylesheet;
-
- if (resource.getContents().isEmpty()) {
- xtextStylesheet = CSSFactory.eINSTANCE.createstylesheet();
- setCharset(xtextStylesheet, "UTF-8");
- resource.getContents().add(xtextStylesheet);
- } else {
- xtextStylesheet = (stylesheet) resource.getContents().get(0);
- }
-
- return xtextStylesheet;
- }
-
-}
+/*****************************************************************************
+ * 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.configuration.handler;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.gmfdiag.css.configuration.helper.XtextStylesheetHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CSSFactory;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class CreateStyleHandler extends AbstractStyleHandler {
+
+ @Override
+ protected AbstractStyleDialog createStyleDialog(Shell shell, Map<css_declaration, Boolean> declarations, Map<AttributeSelector, Boolean> conditions, String selectorName, View context) {
+ return new StyleCreationDialog(shell, conditions, declarations, selectorName, context);
+ }
+
+ @Override
+ protected ruleset getRuleset(AbstractStyleDialog dialog) {
+ return CSSFactory.eINSTANCE.createruleset();
+ }
+
+ @Override
+ protected stylesheet getStyleSheet(AbstractStyleDialog dialog, View contextView) {
+ StyleSheet styleSheet = ((StyleCreationDialog) dialog).getStyleSheet();
+
+ if (styleSheet == null) {
+ MessageDialog.open(MessageDialog.ERROR, dialog.getShell(), "Stylesheet error", "Invalid stylesheet", SWT.NONE);
+ return null;
+ }
+
+ Resource resource;
+
+ if (styleSheet instanceof StyleSheetReference) {
+ resource = XtextStylesheetHelper.loadStylesheet((StyleSheetReference) styleSheet, null, contextView, dialog.getShell());
+ if (resource == null) {
+ return null;
+ }
+ } else {
+ MessageDialog.open(MessageDialog.ERROR, dialog.getShell(), "Stylesheet error", "Embedded stylesheets are not yet supported", SWT.NONE);
+ return null;
+ }
+
+ stylesheet xtextStylesheet;
+
+ if (resource.getContents().isEmpty()) {
+ xtextStylesheet = CSSFactory.eINSTANCE.createstylesheet();
+ setCharset(xtextStylesheet, "UTF-8");
+ resource.getContents().add(xtextStylesheet);
+ } else {
+ xtextStylesheet = (stylesheet) resource.getContents().get(0);
+ }
+
+ return xtextStylesheet;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/EditStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/EditStyleHandler.java
index a38ee96831e..0911e11c174 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/EditStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/EditStyleHandler.java
@@ -1,44 +1,44 @@
-/*****************************************************************************
- * 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.configuration.handler;
-
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class EditStyleHandler extends AbstractStyleHandler {
-
- @Override
- protected AbstractStyleDialog createStyleDialog(Shell shell, Map<css_declaration, Boolean> declarations, Map<AttributeSelector, Boolean> conditions, String selectorName, View context) {
- return new StyleEditionDialog(shell, conditions, declarations, selectorName, context);
- }
-
- @Override
- protected ruleset getRuleset(AbstractStyleDialog dialog) {
- ruleset ruleset = ((StyleEditionDialog) dialog).getSelectedRuleset();
- ruleset.getSelectors().clear();
- ruleset.getDeclarations().clear();
- return ruleset;
- }
-
- @Override
- protected stylesheet getStyleSheet(AbstractStyleDialog dialog, View contextView) {
- return ((StyleEditionDialog) dialog).getStylesheet();
- }
-
-}
+/*****************************************************************************
+ * 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.configuration.handler;
+
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class EditStyleHandler extends AbstractStyleHandler {
+
+ @Override
+ protected AbstractStyleDialog createStyleDialog(Shell shell, Map<css_declaration, Boolean> declarations, Map<AttributeSelector, Boolean> conditions, String selectorName, View context) {
+ return new StyleEditionDialog(shell, conditions, declarations, selectorName, context);
+ }
+
+ @Override
+ protected ruleset getRuleset(AbstractStyleDialog dialog) {
+ ruleset ruleset = ((StyleEditionDialog) dialog).getSelectedRuleset();
+ ruleset.getSelectors().clear();
+ ruleset.getDeclarations().clear();
+ return ruleset;
+ }
+
+ @Override
+ protected stylesheet getStyleSheet(AbstractStyleDialog dialog, View contextView) {
+ return ((StyleEditionDialog) dialog).getStylesheet();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleCreationDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleCreationDialog.java
index 8a991ac6fc7..ca34f40554c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleCreationDialog.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleCreationDialog.java
@@ -1,217 +1,217 @@
-/*****************************************************************************
- * 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.configuration.handler;
-
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetContentProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
-import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
-import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
-import org.eclipse.papyrus.infra.widgets.editors.ReferenceDialog;
-import org.eclipse.papyrus.infra.widgets.editors.StringEditor;
-import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class StyleCreationDialog extends AbstractStyleDialog {
-
- private StringFileSelector externalStylesheetEditor;
-
- private StringEditor embeddedStylesheetEditor;
-
- private ReferenceDialog appliedStylesheetEditor;
-
- private boolean ignoreEvents = false;
-
- private AbstractEditor stylesheetSource;
-
- private StyleSheet stylesheet;
-
- /**
- *
- * @param shell
- * @param conditions
- * inout
- * @param declarations
- * inout
- * @param selectorName
- */
- public StyleCreationDialog(Shell shell, Map<AttributeSelector, Boolean> conditions, Map<css_declaration, Boolean> declarations, String selectorName, View context) {
- super(shell, conditions, declarations, selectorName, context);
- }
-
- @Override
- public void create() {
- super.create();
-
- Composite parent = getDialogArea();
-
- CTabItem stylesheetTab = new CTabItem(tabFolder, SWT.NONE);
- stylesheetTab.setText("Stylesheet");
-
- Composite stylesheetContainer = new Composite(tabFolder, SWT.NONE);
- stylesheetContainer.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true));
- stylesheetContainer.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
- stylesheetContainer.setBackgroundMode(SWT.INHERIT_DEFAULT);
-
- stylesheetTab.setControl(stylesheetContainer);
- createStylesheet(stylesheetContainer);
-
- getShell().setText("Create a new style");
- }
-
- @Override
- protected boolean isValid() {
- boolean result = true;
-
- // There must be a stylesheet
- if (getStyleSheet() == null) {
- setError("You must select a Stylesheet");
- result = false;
- }
-
- // EmbeddedStyleSheets are not yet supported
- if (getStyleSheet() instanceof EmbeddedStyleSheet) {
- setError("Edition of embedded stylesheets is not yet supported. Please select an external stylesheet");
- result = false;
- }
-
- return super.isValid() && result;
- }
-
- protected void createStylesheet(Composite parent) {
- // TODO: Use a preference to remember the last edited Stylesheet (Per model? Diagram? Workspace? With user choice?)
-
- parent.setLayout(new GridLayout(1, false));
-
- // Create or use an existing External Stylesheet
- externalStylesheetEditor = new StringFileSelector(parent, SWT.NONE);
- externalStylesheetEditor.setFilters(new String[] { "*.css", "*" }, new String[] { "CSS Stylesheets (*.css)", "All (*)" });
- externalStylesheetEditor.setAllowFileSystem(false);
- externalStylesheetEditor.setLabel("External stylesheet:");
- externalStylesheetEditor.setToolTipText("Create or use an existing external CSS Stylesheet");
- externalStylesheetEditor.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
- externalStylesheetEditor.addCommitListener(new ICommitListener() {
-
- @Override
- public void commit(AbstractEditor editor) {
- String path = (String) ((StringEditor) editor).getValue();
-
-
- if ((path != null && !"".equals(path)) || stylesheetSource == externalStylesheetEditor) {
- StyleSheetReference stylesheetReference = null;
- if (path != null && !"".equals(path)) {
- stylesheetReference = StylesheetsFactory.eINSTANCE.createStyleSheetReference();
- stylesheetReference.setPath(path);
- }
-
- stylesheet = stylesheetReference;
- resetStylesheetEditors(externalStylesheetEditor);
- updateButtons();
- }
- }
- });
-
- Label orLabel = new Label(parent, SWT.NONE);
- orLabel.setText("-- OR --");
-
- // Create a new Embedded Stylesheet
- embeddedStylesheetEditor = new StringEditor(parent, SWT.NONE);
- embeddedStylesheetEditor.setLabel("New local stylesheet:");
-
- // FIXME: Change the tooltip text when the X-Text editor can edit local stylesheets
- embeddedStylesheetEditor.setToolTipText("Enter the new local stylesheet's name");
- // embeddedStylesheetEditor.setToolTipText("Create a new local stylesheet. The stylesheet will be embedded in the current model. Unsupported yet");
-
- // FIXME: Set read only to false when the X-Text editor can edit local stylesheets
- embeddedStylesheetEditor.setReadOnly(true);
- embeddedStylesheetEditor.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
- embeddedStylesheetEditor.addCommitListener(new ICommitListener() {
-
- @Override
- public void commit(AbstractEditor editor) {
- // TODO: Check empty names & set the stylesheet to null when the name is null/empty
- String name = (String) ((StringEditor) editor).getValue();
- EmbeddedStyleSheet embeddedStylesheet = StylesheetsFactory.eINSTANCE.createEmbeddedStyleSheet();
- embeddedStylesheet.setLabel(name);
- stylesheet = embeddedStylesheet;
- resetStylesheetEditors(embeddedStylesheetEditor);
- updateButtons();
- }
- });
-
- orLabel = new Label(parent, SWT.NONE);
- orLabel.setText("-- OR --");
-
- // Use an existing applied stylesheet (Either Reference or Embedded)
- appliedStylesheetEditor = new ReferenceDialog(parent, SWT.NONE);
- appliedStylesheetEditor.setLabel("Applied stylesheet:");
- appliedStylesheetEditor.setToolTipText("Use an existing stylesheet, from the stylesheets applied to the current model");
- appliedStylesheetEditor.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
- appliedStylesheetEditor.setContentProvider(new CSSStyleSheetContentProvider(contextView));
- appliedStylesheetEditor.setLabelProvider(new CSSStyleSheetLabelProvider());
- appliedStylesheetEditor.addCommitListener(new ICommitListener() {
-
- @Override
- public void commit(AbstractEditor editor) {
- StyleSheet value = (StyleSheet) ((ReferenceDialog) editor).getValue();
- if (!(ignoreEvents && value == null)) {
- stylesheet = value;
- resetStylesheetEditors(appliedStylesheetEditor);
- }
- updateButtons();
- }
- });
-
- }
-
- private void resetStylesheetEditors(AbstractEditor stylesheetSource) {
- if (ignoreEvents) {
- return;
- }
-
- ignoreEvents = true;
- if (stylesheetSource != externalStylesheetEditor) {
- externalStylesheetEditor.setValue(null);
- }
-
- if (stylesheetSource != embeddedStylesheetEditor) {
- embeddedStylesheetEditor.setValue(null);
- }
-
- if (stylesheetSource != appliedStylesheetEditor) {
- appliedStylesheetEditor.setValue(null);
- }
-
- this.stylesheetSource = stylesheetSource;
- ignoreEvents = false;
- }
-
- public StyleSheet getStyleSheet() {
- return stylesheet;
- }
-
-}
+/*****************************************************************************
+ * 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.configuration.handler;
+
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetContentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLabelProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+import org.eclipse.papyrus.infra.widgets.editors.ReferenceDialog;
+import org.eclipse.papyrus.infra.widgets.editors.StringEditor;
+import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class StyleCreationDialog extends AbstractStyleDialog {
+
+ private StringFileSelector externalStylesheetEditor;
+
+ private StringEditor embeddedStylesheetEditor;
+
+ private ReferenceDialog appliedStylesheetEditor;
+
+ private boolean ignoreEvents = false;
+
+ private AbstractEditor stylesheetSource;
+
+ private StyleSheet stylesheet;
+
+ /**
+ *
+ * @param shell
+ * @param conditions
+ * inout
+ * @param declarations
+ * inout
+ * @param selectorName
+ */
+ public StyleCreationDialog(Shell shell, Map<AttributeSelector, Boolean> conditions, Map<css_declaration, Boolean> declarations, String selectorName, View context) {
+ super(shell, conditions, declarations, selectorName, context);
+ }
+
+ @Override
+ public void create() {
+ super.create();
+
+ Composite parent = getDialogArea();
+
+ CTabItem stylesheetTab = new CTabItem(tabFolder, SWT.NONE);
+ stylesheetTab.setText("Stylesheet");
+
+ Composite stylesheetContainer = new Composite(tabFolder, SWT.NONE);
+ stylesheetContainer.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true));
+ stylesheetContainer.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
+ stylesheetContainer.setBackgroundMode(SWT.INHERIT_DEFAULT);
+
+ stylesheetTab.setControl(stylesheetContainer);
+ createStylesheet(stylesheetContainer);
+
+ getShell().setText("Create a new style");
+ }
+
+ @Override
+ protected boolean isValid() {
+ boolean result = true;
+
+ // There must be a stylesheet
+ if (getStyleSheet() == null) {
+ setError("You must select a Stylesheet");
+ result = false;
+ }
+
+ // EmbeddedStyleSheets are not yet supported
+ if (getStyleSheet() instanceof EmbeddedStyleSheet) {
+ setError("Edition of embedded stylesheets is not yet supported. Please select an external stylesheet");
+ result = false;
+ }
+
+ return super.isValid() && result;
+ }
+
+ protected void createStylesheet(Composite parent) {
+ // TODO: Use a preference to remember the last edited Stylesheet (Per model? Diagram? Workspace? With user choice?)
+
+ parent.setLayout(new GridLayout(1, false));
+
+ // Create or use an existing External Stylesheet
+ externalStylesheetEditor = new StringFileSelector(parent, SWT.NONE);
+ externalStylesheetEditor.setFilters(new String[] { "*.css", "*" }, new String[] { "CSS Stylesheets (*.css)", "All (*)" });
+ externalStylesheetEditor.setAllowFileSystem(false);
+ externalStylesheetEditor.setLabel("External stylesheet:");
+ externalStylesheetEditor.setToolTipText("Create or use an existing external CSS Stylesheet");
+ externalStylesheetEditor.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+ externalStylesheetEditor.addCommitListener(new ICommitListener() {
+
+ @Override
+ public void commit(AbstractEditor editor) {
+ String path = (String) ((StringEditor) editor).getValue();
+
+
+ if ((path != null && !"".equals(path)) || stylesheetSource == externalStylesheetEditor) {
+ StyleSheetReference stylesheetReference = null;
+ if (path != null && !"".equals(path)) {
+ stylesheetReference = StylesheetsFactory.eINSTANCE.createStyleSheetReference();
+ stylesheetReference.setPath(path);
+ }
+
+ stylesheet = stylesheetReference;
+ resetStylesheetEditors(externalStylesheetEditor);
+ updateButtons();
+ }
+ }
+ });
+
+ Label orLabel = new Label(parent, SWT.NONE);
+ orLabel.setText("-- OR --");
+
+ // Create a new Embedded Stylesheet
+ embeddedStylesheetEditor = new StringEditor(parent, SWT.NONE);
+ embeddedStylesheetEditor.setLabel("New local stylesheet:");
+
+ // FIXME: Change the tooltip text when the X-Text editor can edit local stylesheets
+ embeddedStylesheetEditor.setToolTipText("Enter the new local stylesheet's name");
+ // embeddedStylesheetEditor.setToolTipText("Create a new local stylesheet. The stylesheet will be embedded in the current model. Unsupported yet");
+
+ // FIXME: Set read only to false when the X-Text editor can edit local stylesheets
+ embeddedStylesheetEditor.setReadOnly(true);
+ embeddedStylesheetEditor.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+ embeddedStylesheetEditor.addCommitListener(new ICommitListener() {
+
+ @Override
+ public void commit(AbstractEditor editor) {
+ // TODO: Check empty names & set the stylesheet to null when the name is null/empty
+ String name = (String) ((StringEditor) editor).getValue();
+ EmbeddedStyleSheet embeddedStylesheet = StylesheetsFactory.eINSTANCE.createEmbeddedStyleSheet();
+ embeddedStylesheet.setLabel(name);
+ stylesheet = embeddedStylesheet;
+ resetStylesheetEditors(embeddedStylesheetEditor);
+ updateButtons();
+ }
+ });
+
+ orLabel = new Label(parent, SWT.NONE);
+ orLabel.setText("-- OR --");
+
+ // Use an existing applied stylesheet (Either Reference or Embedded)
+ appliedStylesheetEditor = new ReferenceDialog(parent, SWT.NONE);
+ appliedStylesheetEditor.setLabel("Applied stylesheet:");
+ appliedStylesheetEditor.setToolTipText("Use an existing stylesheet, from the stylesheets applied to the current model");
+ appliedStylesheetEditor.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+ appliedStylesheetEditor.setContentProvider(new CSSStyleSheetContentProvider(contextView));
+ appliedStylesheetEditor.setLabelProvider(new CSSStyleSheetLabelProvider());
+ appliedStylesheetEditor.addCommitListener(new ICommitListener() {
+
+ @Override
+ public void commit(AbstractEditor editor) {
+ StyleSheet value = (StyleSheet) ((ReferenceDialog) editor).getValue();
+ if (!(ignoreEvents && value == null)) {
+ stylesheet = value;
+ resetStylesheetEditors(appliedStylesheetEditor);
+ }
+ updateButtons();
+ }
+ });
+
+ }
+
+ private void resetStylesheetEditors(AbstractEditor stylesheetSource) {
+ if (ignoreEvents) {
+ return;
+ }
+
+ ignoreEvents = true;
+ if (stylesheetSource != externalStylesheetEditor) {
+ externalStylesheetEditor.setValue(null);
+ }
+
+ if (stylesheetSource != embeddedStylesheetEditor) {
+ embeddedStylesheetEditor.setValue(null);
+ }
+
+ if (stylesheetSource != appliedStylesheetEditor) {
+ appliedStylesheetEditor.setValue(null);
+ }
+
+ this.stylesheetSource = stylesheetSource;
+ ignoreEvents = false;
+ }
+
+ public StyleSheet getStyleSheet() {
+ return stylesheet;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleEditionDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleEditionDialog.java
index 18adf894298..09d780cf7c9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleEditionDialog.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/StyleEditionDialog.java
@@ -1,266 +1,266 @@
-/*****************************************************************************
- * 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.configuration.handler;
-
-import static org.eclipse.papyrus.infra.gmfdiag.css.configuration.helper.DiagramTypeHelper.getDiagramType;
-
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.papyrus.infra.gmfdiag.css.configuration.providers.ExistingStyleContentProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.configuration.providers.StylesheetLabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ClassSelector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CssSelector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.selector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.simple_selector;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A dialog for editing an existing CSS Style, based on a selected element
- *
- * @author Camille Letavernier
- */
-// TODO: When a condition or property doesn't exist on the selected element,
-// but exists in the selected style, add it to #declarations/#conditions
-// TODO: Delete an existing style?
-// TODO: Use a combo-box + ListViewer instead of a TreeViewer
-// TODO: Remove read-only stylesheets (Or add a warning/Error when a ruleset from a readonly stylesheet is selected)
-// TODO: Load an external stylesheet (Which is not yet applied on the diagram)
-// TODO: Support embedded stylesheets
-public class StyleEditionDialog extends AbstractStyleDialog implements ISelectionChangedListener {
-
- protected Composite styleSelectionPanel;
-
- protected Composite styleEditionPanel;
-
- protected ruleset ruleset;
-
- /**
- *
- * @param shell
- * @param conditions
- * inout
- * @param declarations
- * inout
- * @param selectorName
- */
- public StyleEditionDialog(Shell shell, Map<AttributeSelector, Boolean> conditions, Map<css_declaration, Boolean> declarations, String selectorName, View context) {
- super(shell, conditions, declarations, selectorName, context);
- }
-
- @Override
- public void create() {
- super.create();
- createStyleSelectionPanel();
- getShell().setText("Edit an existing style");
- // getShell().pack();
- }
-
- @Override
- public Composite createDialogArea(Composite parent) {
- Composite dialogArea = (Composite) super.createDialogArea(parent);
-
- SashForm sash = new SashForm(dialogArea, SWT.HORIZONTAL);
- sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- // GridLayout parentLayout = (GridLayout)dialogArea.getLayout();
- // parentLayout.numColumns = 2;
- // parentLayout.makeColumnsEqualWidth = false;
-
- styleSelectionPanel = new Composite(sash, SWT.NONE);
-
- GridData data = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
- data.widthHint = 250;
- styleSelectionPanel.setLayoutData(data);
- styleSelectionPanel.setLayout(new GridLayout(1, true));
-
- styleEditionPanel = new Composite(sash, SWT.NONE);
- styleEditionPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- GridLayout layout = new GridLayout(1, true);
- // layout.marginWidth = 0;
- // layout.marginHeight = 0;
- styleEditionPanel.setLayout(layout);
-
- sash.setWeights(new int[] { 2, 5 });
-
- return styleEditionPanel;
- }
-
- protected void createStyleSelectionPanel() {
- // styleSelectionPanel.setBackground(styleSelectionPanel.getDisplay().getSystemColor(SWT.COLOR_WHITE));
- // styleSelectionPanel.setBackgroundMode(SWT.INHERIT_DEFAULT);
- TreeViewer viewer = new TreeViewer(styleSelectionPanel, SWT.BORDER);
- viewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- viewer.setContentProvider(new ExistingStyleContentProvider(contextView));
- viewer.setLabelProvider(new StylesheetLabelProvider());
- viewer.addSelectionChangedListener(this);
- viewer.setInput(new Object());
- styleSelectionPanel.layout();
- styleSelectionPanel.getParent().layout();
- }
-
- protected stylesheet getStylesheet() {
- if (ruleset != null) {
- return (stylesheet) ruleset.eContainer();
- }
- return null;
- }
-
- public ruleset getSelectedRuleset() {
- return ruleset;
- }
-
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection.isEmpty()) {
- // TODO: Conditions + Declaration -> Readonly
- }
-
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sSelection = (IStructuredSelection) selection;
- Object selectedElement = sSelection.getFirstElement();
- if (selectedElement instanceof ruleset) {
- handleSelectionChanged((ruleset) selectedElement);
- } else {
- ruleset = null;
- }
- }
-
- updateButtons();
- }
-
- protected void handleSelectionChanged(ruleset selectedRuleset) {
- this.ruleset = selectedRuleset;
-
- // Sets all conditions to false. They will be set to true if the selected style contains the same condition
- for (AttributeSelector attribute : conditions.keySet()) {
- conditions.put(attribute, false);
- }
-
- // Sets all properties to false. They will be set to true if the selected style contains the same property
- for (css_declaration declaration : declarations.keySet()) {
- declarations.put(declaration, false);
- }
-
- diagramRestriction = false;
-
- useSelectorName = false;
-
- cssClass = null;
-
- for (selector selector : selectedRuleset.getSelectors()) {
- handleSelector(selector);
- }
-
- handleDeclarations(selectedRuleset.getDeclarations());
-
- updateContents();
- updateSelectorLabel();
- }
-
- protected void handleDeclarations(List<css_declaration> declarations) {
- for (css_declaration declaration : declarations) {
- for (css_declaration currentDeclaration : this.declarations.keySet()) {
- if (equals(currentDeclaration.getProperty(), declaration.getProperty())) {
- this.declarations.put(currentDeclaration, true);
- break;
- }
- }
- }
- }
-
- protected void handleSelector(simple_selector selector) {
- if (getDiagramType(contextView.getDiagram()).equals(getElementName(selector))) {
- diagramRestriction = true;
- }
-
- if (contextView.getElement().eClass().getName().equals(getElementName(selector))) {
- useSelectorName = true;
- }
-
- for (CssSelector condition : selector.getSubSelectors()) {
- if (condition instanceof AttributeSelector) {
- AttributeSelector existingAttribute = (AttributeSelector) condition;
- for (AttributeSelector selectedAttribute : conditions.keySet()) {
- if (existingAttribute.getName().equals(selectedAttribute.getName())) {
- conditions.put(selectedAttribute, true);
- break;
- }
- }
- } else if (condition instanceof ClassSelector) {
- cssClass = ((ClassSelector) condition).getName();
- }
- }
- }
-
- protected void updateContents() {
- disposeContents(conditionsContainer);
- createConditions(conditionsContainer);
-
- disposeContents(declarationsContainer);
- createDeclarations(declarationsContainer);
-
- conditionsContainer.layout();
- declarationsContainer.layout();
- tabFolder.layout();
- getDialogArea().layout();
- }
-
- protected void disposeContents(Composite composite) {
- for (Control control : composite.getChildren()) {
- control.dispose();
- }
- }
-
- protected void handleSelector(selector selector) {
- if (selector == null) {
- return;
- }
-
- for (simple_selector simpleSelector : selector.getSimpleselectors()) {
- handleSelector(simpleSelector);
- }
-
- handleSelector(selector.getSelector());
- }
-
- @Override
- protected boolean isValid() {
- boolean result = true;
-
- if (ruleset == null) {
- setError("You must select an existing Style");
- result = false;
- }
-
- return super.isValid() && result;
- }
-
-}
+/*****************************************************************************
+ * 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.configuration.handler;
+
+import static org.eclipse.papyrus.infra.gmfdiag.css.configuration.helper.DiagramTypeHelper.getDiagramType;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.papyrus.infra.gmfdiag.css.configuration.providers.ExistingStyleContentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.configuration.providers.StylesheetLabelProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ClassSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CssSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.selector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.simple_selector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * A dialog for editing an existing CSS Style, based on a selected element
+ *
+ * @author Camille Letavernier
+ */
+// TODO: When a condition or property doesn't exist on the selected element,
+// but exists in the selected style, add it to #declarations/#conditions
+// TODO: Delete an existing style?
+// TODO: Use a combo-box + ListViewer instead of a TreeViewer
+// TODO: Remove read-only stylesheets (Or add a warning/Error when a ruleset from a readonly stylesheet is selected)
+// TODO: Load an external stylesheet (Which is not yet applied on the diagram)
+// TODO: Support embedded stylesheets
+public class StyleEditionDialog extends AbstractStyleDialog implements ISelectionChangedListener {
+
+ protected Composite styleSelectionPanel;
+
+ protected Composite styleEditionPanel;
+
+ protected ruleset ruleset;
+
+ /**
+ *
+ * @param shell
+ * @param conditions
+ * inout
+ * @param declarations
+ * inout
+ * @param selectorName
+ */
+ public StyleEditionDialog(Shell shell, Map<AttributeSelector, Boolean> conditions, Map<css_declaration, Boolean> declarations, String selectorName, View context) {
+ super(shell, conditions, declarations, selectorName, context);
+ }
+
+ @Override
+ public void create() {
+ super.create();
+ createStyleSelectionPanel();
+ getShell().setText("Edit an existing style");
+ // getShell().pack();
+ }
+
+ @Override
+ public Composite createDialogArea(Composite parent) {
+ Composite dialogArea = (Composite) super.createDialogArea(parent);
+
+ SashForm sash = new SashForm(dialogArea, SWT.HORIZONTAL);
+ sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ // GridLayout parentLayout = (GridLayout)dialogArea.getLayout();
+ // parentLayout.numColumns = 2;
+ // parentLayout.makeColumnsEqualWidth = false;
+
+ styleSelectionPanel = new Composite(sash, SWT.NONE);
+
+ GridData data = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
+ data.widthHint = 250;
+ styleSelectionPanel.setLayoutData(data);
+ styleSelectionPanel.setLayout(new GridLayout(1, true));
+
+ styleEditionPanel = new Composite(sash, SWT.NONE);
+ styleEditionPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ GridLayout layout = new GridLayout(1, true);
+ // layout.marginWidth = 0;
+ // layout.marginHeight = 0;
+ styleEditionPanel.setLayout(layout);
+
+ sash.setWeights(new int[] { 2, 5 });
+
+ return styleEditionPanel;
+ }
+
+ protected void createStyleSelectionPanel() {
+ // styleSelectionPanel.setBackground(styleSelectionPanel.getDisplay().getSystemColor(SWT.COLOR_WHITE));
+ // styleSelectionPanel.setBackgroundMode(SWT.INHERIT_DEFAULT);
+ TreeViewer viewer = new TreeViewer(styleSelectionPanel, SWT.BORDER);
+ viewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ viewer.setContentProvider(new ExistingStyleContentProvider(contextView));
+ viewer.setLabelProvider(new StylesheetLabelProvider());
+ viewer.addSelectionChangedListener(this);
+ viewer.setInput(new Object());
+ styleSelectionPanel.layout();
+ styleSelectionPanel.getParent().layout();
+ }
+
+ protected stylesheet getStylesheet() {
+ if (ruleset != null) {
+ return (stylesheet) ruleset.eContainer();
+ }
+ return null;
+ }
+
+ public ruleset getSelectedRuleset() {
+ return ruleset;
+ }
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ if (selection.isEmpty()) {
+ // TODO: Conditions + Declaration -> Readonly
+ }
+
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection sSelection = (IStructuredSelection) selection;
+ Object selectedElement = sSelection.getFirstElement();
+ if (selectedElement instanceof ruleset) {
+ handleSelectionChanged((ruleset) selectedElement);
+ } else {
+ ruleset = null;
+ }
+ }
+
+ updateButtons();
+ }
+
+ protected void handleSelectionChanged(ruleset selectedRuleset) {
+ this.ruleset = selectedRuleset;
+
+ // Sets all conditions to false. They will be set to true if the selected style contains the same condition
+ for (AttributeSelector attribute : conditions.keySet()) {
+ conditions.put(attribute, false);
+ }
+
+ // Sets all properties to false. They will be set to true if the selected style contains the same property
+ for (css_declaration declaration : declarations.keySet()) {
+ declarations.put(declaration, false);
+ }
+
+ diagramRestriction = false;
+
+ useSelectorName = false;
+
+ cssClass = null;
+
+ for (selector selector : selectedRuleset.getSelectors()) {
+ handleSelector(selector);
+ }
+
+ handleDeclarations(selectedRuleset.getDeclarations());
+
+ updateContents();
+ updateSelectorLabel();
+ }
+
+ protected void handleDeclarations(List<css_declaration> declarations) {
+ for (css_declaration declaration : declarations) {
+ for (css_declaration currentDeclaration : this.declarations.keySet()) {
+ if (equals(currentDeclaration.getProperty(), declaration.getProperty())) {
+ this.declarations.put(currentDeclaration, true);
+ break;
+ }
+ }
+ }
+ }
+
+ protected void handleSelector(simple_selector selector) {
+ if (getDiagramType(contextView.getDiagram()).equals(getElementName(selector))) {
+ diagramRestriction = true;
+ }
+
+ if (contextView.getElement().eClass().getName().equals(getElementName(selector))) {
+ useSelectorName = true;
+ }
+
+ for (CssSelector condition : selector.getSubSelectors()) {
+ if (condition instanceof AttributeSelector) {
+ AttributeSelector existingAttribute = (AttributeSelector) condition;
+ for (AttributeSelector selectedAttribute : conditions.keySet()) {
+ if (existingAttribute.getName().equals(selectedAttribute.getName())) {
+ conditions.put(selectedAttribute, true);
+ break;
+ }
+ }
+ } else if (condition instanceof ClassSelector) {
+ cssClass = ((ClassSelector) condition).getName();
+ }
+ }
+ }
+
+ protected void updateContents() {
+ disposeContents(conditionsContainer);
+ createConditions(conditionsContainer);
+
+ disposeContents(declarationsContainer);
+ createDeclarations(declarationsContainer);
+
+ conditionsContainer.layout();
+ declarationsContainer.layout();
+ tabFolder.layout();
+ getDialogArea().layout();
+ }
+
+ protected void disposeContents(Composite composite) {
+ for (Control control : composite.getChildren()) {
+ control.dispose();
+ }
+ }
+
+ protected void handleSelector(selector selector) {
+ if (selector == null) {
+ return;
+ }
+
+ for (simple_selector simpleSelector : selector.getSimpleselectors()) {
+ handleSelector(simpleSelector);
+ }
+
+ handleSelector(selector.getSelector());
+ }
+
+ @Override
+ protected boolean isValid() {
+ boolean result = true;
+
+ if (ruleset == null) {
+ setError("You must select an existing Style");
+ result = false;
+ }
+
+ return super.isValid() && result;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/DiagramTypeHelper.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/DiagramTypeHelper.java
index eb739d6c707..ef046825d58 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/DiagramTypeHelper.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/DiagramTypeHelper.java
@@ -1,57 +1,57 @@
-/*****************************************************************************
- * 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.configuration.helper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.notation.Diagram;
-
-/**
- * Helper to convert from the implementation-based Diagram Type (e.g. PapyrusUMLClassDiagram) to a more
- * user-readable (and consistent) Diagram name, used in CSS Stylesheets (e.g. ClassDiagram)
- *
- * @author Camille Letavernier
- */
-// TODO : Replace with an extension point, so that it is possible to use this kind of Label
-// anywhere in Papyrus (Preferences, CSS Stylesheets, property view, ...)
-// See org.eclipse.papyrus.infra.gmfdiag.css.GMFElementAdapter
-public class DiagramTypeHelper {
-
- public static String getDiagramType(Diagram diagram) {
- String type = diagram.getType();
- return diagramNameMappings.containsKey(type) ? diagramNameMappings.get(type) : type;
- }
-
- private static Map<String, String> diagramNameMappings = new HashMap<String, String>();
-
- static {
- // UML
- diagramNameMappings.put("CompositeStructure", "CompositeDiagram");
- diagramNameMappings.put("Package", "PackageDiagram");
- diagramNameMappings.put("PapyrusUMLActivityDiagram", "ActivityDiagram");
- diagramNameMappings.put("PapyrusUMLClassDiagram", "ClassDiagram");
- diagramNameMappings.put("PapyrusUMLCommunicationDiagram", "CommunicationDiagram");
- diagramNameMappings.put("PapyrusUMLComponentDiagram", "ComponentDiagram");
- diagramNameMappings.put("PapyrusUMLDeploymentDiagram", "DeploymentDiagram");
- diagramNameMappings.put("PapyrusUMLProfileDiagram", "ProfileDiagram");
- diagramNameMappings.put("PapyrusUMLSequenceDiagram", "SequenceDiagram");
- diagramNameMappings.put("PapyrusUMLStateMachineDiagram", "StateMachineDiagram");
- diagramNameMappings.put("UseCase", "UseCaseDiagram");
-
- // SysML
- diagramNameMappings.put("BlockDefinition", "BlockDiagram");
- diagramNameMappings.put("InternalBlock", "InternalBlockDiagram");
- diagramNameMappings.put("PapyrusSysMLRequirement", "RequirementDiagram");
- diagramNameMappings.put("Parametric", "ParametricDiagram");
- }
-}
+/*****************************************************************************
+ * 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.configuration.helper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.Diagram;
+
+/**
+ * Helper to convert from the implementation-based Diagram Type (e.g. PapyrusUMLClassDiagram) to a more
+ * user-readable (and consistent) Diagram name, used in CSS Stylesheets (e.g. ClassDiagram)
+ *
+ * @author Camille Letavernier
+ */
+// TODO : Replace with an extension point, so that it is possible to use this kind of Label
+// anywhere in Papyrus (Preferences, CSS Stylesheets, property view, ...)
+// See org.eclipse.papyrus.infra.gmfdiag.css.GMFElementAdapter
+public class DiagramTypeHelper {
+
+ public static String getDiagramType(Diagram diagram) {
+ String type = diagram.getType();
+ return diagramNameMappings.containsKey(type) ? diagramNameMappings.get(type) : type;
+ }
+
+ private static Map<String, String> diagramNameMappings = new HashMap<String, String>();
+
+ static {
+ // UML
+ diagramNameMappings.put("CompositeStructure", "CompositeDiagram");
+ diagramNameMappings.put("Package", "PackageDiagram");
+ diagramNameMappings.put("PapyrusUMLActivityDiagram", "ActivityDiagram");
+ diagramNameMappings.put("PapyrusUMLClassDiagram", "ClassDiagram");
+ diagramNameMappings.put("PapyrusUMLCommunicationDiagram", "CommunicationDiagram");
+ diagramNameMappings.put("PapyrusUMLComponentDiagram", "ComponentDiagram");
+ diagramNameMappings.put("PapyrusUMLDeploymentDiagram", "DeploymentDiagram");
+ diagramNameMappings.put("PapyrusUMLProfileDiagram", "ProfileDiagram");
+ diagramNameMappings.put("PapyrusUMLSequenceDiagram", "SequenceDiagram");
+ diagramNameMappings.put("PapyrusUMLStateMachineDiagram", "StateMachineDiagram");
+ diagramNameMappings.put("UseCase", "UseCaseDiagram");
+
+ // SysML
+ diagramNameMappings.put("BlockDefinition", "BlockDiagram");
+ diagramNameMappings.put("InternalBlock", "InternalBlockDiagram");
+ diagramNameMappings.put("PapyrusSysMLRequirement", "RequirementDiagram");
+ diagramNameMappings.put("Parametric", "ParametricDiagram");
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/XtextStylesheetHelper.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/XtextStylesheetHelper.java
index 0ffbcec1ec7..582116cdbc5 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/XtextStylesheetHelper.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/helper/XtextStylesheetHelper.java
@@ -1,111 +1,111 @@
-/*****************************************************************************
- * 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.configuration.helper;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.xtext.resource.XtextResourceSet;
-
-/**
- * A helper for XText stylesheets
- *
- * @author Camille Letavernier
- *
- */
-public class XtextStylesheetHelper {
-
- /**
- * Loads and returns a Resource containing an XText Stylesheet
- *
- * @param stylesheet
- * The object representing the Stylesheet's path or contents
- * @param resourceSet
- * The resourceSet in which the resource will be loaded. May be null.
- * @param contextView
- * The context view. If the stylesheet's path is relative, it will be resolved against this view's URI.
- * @param parentShell
- * The shell used to open error dialogs. May be null
- * @return
- * A resource containing the loaded stylesheet, or null if the stylesheet could not be resolved or is invalid
- */
- public static Resource loadStylesheet(StyleSheet stylesheet, ResourceSet resourceSet, View contextView, Shell parentShell) {
- if (stylesheet instanceof StyleSheetReference) {
- return loadStylesheet((StyleSheetReference) stylesheet, resourceSet, contextView, parentShell);
- } else if (stylesheet instanceof EmbeddedStyleSheet) {
- // TODO: Edit EmbeddedStyleSheets with XText
- throw new UnsupportedOperationException();
- }
- return null;
- }
-
- /**
- * Loads and returns a Resource containing an XText Stylesheet
- *
- * @param stylesheet
- * The object representing the Stylesheet's path
- * @param resourceSet
- * The resourceSet in which the resource will be loaded. May be null.
- * @param contextView
- * The context view. If the stylesheet's path is relative, it will be resolved against this view's URI.
- * @param parentShell
- * The shell used to open error dialogs. May be null
- * @return
- * A resource containing the loaded stylesheet, or null if the stylesheet could not be resolved or is invalid
- */
- public static Resource loadStylesheet(StyleSheetReference stylesheet, ResourceSet resourceSet, View contextView, Shell parentShell) {
- if (resourceSet == null) {
- resourceSet = new XtextResourceSet();
- }
-
- // Supported pathes:
- // /<plugin>/path/file.css (Workspace, platform:/resource/)
- // relative/path/file.css (Relative)
- String path = stylesheet.getPath();
- if (!path.endsWith(".css")) {
- // FIXME: The X-Text editor supports CSS Content Types, but it is not yet configured
- // to automatically accept other extensions than *.css
- // The parser should rely on the file's content type instead of the file extension
- // Attemps to serialize to a custom extension (even an extension compatible with CSS Content Type)
- // would result in xmi serialization. We'd better stop here.
- if (parentShell != null) {
- MessageDialog.open(MessageDialog.ERROR, parentShell, "Stylesheet error", "The stylesheet must have the *.css extension", SWT.NONE);
- }
- return null;
- }
-
- URI uri;
- if (path.startsWith("/")) {
- uri = URI.createPlatformResourceURI(path, true);
- } else {
- uri = URI.createURI(path);
- uri = uri.resolve(contextView.eResource().getURI());
- }
-
- Resource resource;
-
- try {
- resource = resourceSet.getResource(uri, true);
- } catch (Exception ex) {
- resource = resourceSet.createResource(uri, "org.eclipse.wst.css.core.csssource"); //$NON-NLS-1$
- }
-
- return resource;
- }
-}
+/*****************************************************************************
+ * 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.configuration.helper;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.xtext.resource.XtextResourceSet;
+
+/**
+ * A helper for XText stylesheets
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class XtextStylesheetHelper {
+
+ /**
+ * Loads and returns a Resource containing an XText Stylesheet
+ *
+ * @param stylesheet
+ * The object representing the Stylesheet's path or contents
+ * @param resourceSet
+ * The resourceSet in which the resource will be loaded. May be null.
+ * @param contextView
+ * The context view. If the stylesheet's path is relative, it will be resolved against this view's URI.
+ * @param parentShell
+ * The shell used to open error dialogs. May be null
+ * @return
+ * A resource containing the loaded stylesheet, or null if the stylesheet could not be resolved or is invalid
+ */
+ public static Resource loadStylesheet(StyleSheet stylesheet, ResourceSet resourceSet, View contextView, Shell parentShell) {
+ if (stylesheet instanceof StyleSheetReference) {
+ return loadStylesheet((StyleSheetReference) stylesheet, resourceSet, contextView, parentShell);
+ } else if (stylesheet instanceof EmbeddedStyleSheet) {
+ // TODO: Edit EmbeddedStyleSheets with XText
+ throw new UnsupportedOperationException();
+ }
+ return null;
+ }
+
+ /**
+ * Loads and returns a Resource containing an XText Stylesheet
+ *
+ * @param stylesheet
+ * The object representing the Stylesheet's path
+ * @param resourceSet
+ * The resourceSet in which the resource will be loaded. May be null.
+ * @param contextView
+ * The context view. If the stylesheet's path is relative, it will be resolved against this view's URI.
+ * @param parentShell
+ * The shell used to open error dialogs. May be null
+ * @return
+ * A resource containing the loaded stylesheet, or null if the stylesheet could not be resolved or is invalid
+ */
+ public static Resource loadStylesheet(StyleSheetReference stylesheet, ResourceSet resourceSet, View contextView, Shell parentShell) {
+ if (resourceSet == null) {
+ resourceSet = new XtextResourceSet();
+ }
+
+ // Supported pathes:
+ // /<plugin>/path/file.css (Workspace, platform:/resource/)
+ // relative/path/file.css (Relative)
+ String path = stylesheet.getPath();
+ if (!path.endsWith(".css")) {
+ // FIXME: The X-Text editor supports CSS Content Types, but it is not yet configured
+ // to automatically accept other extensions than *.css
+ // The parser should rely on the file's content type instead of the file extension
+ // Attemps to serialize to a custom extension (even an extension compatible with CSS Content Type)
+ // would result in xmi serialization. We'd better stop here.
+ if (parentShell != null) {
+ MessageDialog.open(MessageDialog.ERROR, parentShell, "Stylesheet error", "The stylesheet must have the *.css extension", SWT.NONE);
+ }
+ return null;
+ }
+
+ URI uri;
+ if (path.startsWith("/")) {
+ uri = URI.createPlatformResourceURI(path, true);
+ } else {
+ uri = URI.createURI(path);
+ uri = uri.resolve(contextView.eResource().getURI());
+ }
+
+ Resource resource;
+
+ try {
+ resource = resourceSet.getResource(uri, true);
+ } catch (Exception ex) {
+ resource = resourceSet.createResource(uri, "org.eclipse.wst.css.core.csssource"); //$NON-NLS-1$
+ }
+
+ return resource;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java
index c4fc5919385..027935fa74e 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java
@@ -1,131 +1,131 @@
-/*****************************************************************************
- * 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.configuration.providers;
-
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.infra.gmfdiag.css.configuration.helper.XtextStylesheetHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
-import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
-
-
-public class ExistingStyleContentProvider implements IHierarchicContentProvider {
-
- protected Map<StyleSheet, stylesheet> stylesheets;
-
- protected final View context;
-
- public ExistingStyleContentProvider(View context) {
- this.context = context;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- Collection<StyleSheet> stylesheets = getStyleSheets();
- if (stylesheets.isEmpty()) {
- // Display a message to let the user know why he cannot edit a stylesheet
- return new Object[] { "No stylesheet available" };
- }
- return stylesheets.toArray();
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof StyleSheet) {
- stylesheet xtextStylesheet = stylesheets.get(parentElement);
-
- return xtextStylesheet.getRuleset().toArray();
- } else {
- return new Object[0];
- }
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof stylesheet) {
- return null;
- }
-
- if (element instanceof ruleset) {
- return ((ruleset) element).eContainer();
- }
-
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0;
- }
-
- @Override
- public void dispose() {
-
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
- }
-
- @Override
- public boolean isValidValue(Object element) {
- return element instanceof ruleset;
- }
-
- protected Collection<StyleSheet> getStyleSheets() {
- if (stylesheets == null) {
- stylesheets = new LinkedHashMap<StyleSheet, stylesheet>();
- if (context.getDiagram() instanceof CSSDiagram) {
- CSSDiagram diagram = (CSSDiagram) context.getDiagram();
- parseStyleSheets(diagram.getStyleSheets());
- }
- }
- return stylesheets.keySet();
- }
-
- protected void parseStyleSheets(List<StyleSheet> appliedStylesheets) {
- for (StyleSheet stylesheet : appliedStylesheets) {
- if (stylesheet instanceof StyleSheetReference) {
- parseStyleSheet((StyleSheetReference) stylesheet);
- } else if (stylesheet instanceof EmbeddedStyleSheet) {
- // Unsupported yet
- }
- }
- }
-
- protected void parseStyleSheet(StyleSheetReference stylesheet) {
- Resource resource = XtextStylesheetHelper.loadStylesheet(stylesheet, null, context, null);
- if (resource.getContents().isEmpty()) {
- return;
- }
-
- for (EObject rootElement : resource.getContents()) {
- if (rootElement instanceof stylesheet) {
- stylesheets.put(stylesheet, (stylesheet) rootElement);
- }
- }
- }
-
-}
+/*****************************************************************************
+ * 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.configuration.providers;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.gmfdiag.css.configuration.helper.XtextStylesheetHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.stylesheet;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+
+
+public class ExistingStyleContentProvider implements IHierarchicContentProvider {
+
+ protected Map<StyleSheet, stylesheet> stylesheets;
+
+ protected final View context;
+
+ public ExistingStyleContentProvider(View context) {
+ this.context = context;
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Collection<StyleSheet> stylesheets = getStyleSheets();
+ if (stylesheets.isEmpty()) {
+ // Display a message to let the user know why he cannot edit a stylesheet
+ return new Object[] { "No stylesheet available" };
+ }
+ return stylesheets.toArray();
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof StyleSheet) {
+ stylesheet xtextStylesheet = stylesheets.get(parentElement);
+
+ return xtextStylesheet.getRuleset().toArray();
+ } else {
+ return new Object[0];
+ }
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof stylesheet) {
+ return null;
+ }
+
+ if (element instanceof ruleset) {
+ return ((ruleset) element).eContainer();
+ }
+
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ @Override
+ public void dispose() {
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+ @Override
+ public boolean isValidValue(Object element) {
+ return element instanceof ruleset;
+ }
+
+ protected Collection<StyleSheet> getStyleSheets() {
+ if (stylesheets == null) {
+ stylesheets = new LinkedHashMap<StyleSheet, stylesheet>();
+ if (context.getDiagram() instanceof CSSDiagram) {
+ CSSDiagram diagram = (CSSDiagram) context.getDiagram();
+ parseStyleSheets(diagram.getStyleSheets());
+ }
+ }
+ return stylesheets.keySet();
+ }
+
+ protected void parseStyleSheets(List<StyleSheet> appliedStylesheets) {
+ for (StyleSheet stylesheet : appliedStylesheets) {
+ if (stylesheet instanceof StyleSheetReference) {
+ parseStyleSheet((StyleSheetReference) stylesheet);
+ } else if (stylesheet instanceof EmbeddedStyleSheet) {
+ // Unsupported yet
+ }
+ }
+ }
+
+ protected void parseStyleSheet(StyleSheetReference stylesheet) {
+ Resource resource = XtextStylesheetHelper.loadStylesheet(stylesheet, null, context, null);
+ if (resource.getContents().isEmpty()) {
+ return;
+ }
+
+ for (EObject rootElement : resource.getContents()) {
+ if (rootElement instanceof stylesheet) {
+ stylesheets.put(stylesheet, (stylesheet) rootElement);
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java
index 2bfaede57ca..f77c0fd3e78 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/StylesheetLabelProvider.java
@@ -1,96 +1,96 @@
-/*****************************************************************************
- * 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.configuration.providers;
-
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.papyrus.infra.gmfdiag.css3.CSSRuntimeModule;
-import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
-import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.xtext.serializer.ISerializer;
-
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-
-//TODO: Add a context to this LabelProvider (Selected View)
-//TODO: When a Ruleset is applied/applicable on the selected View, change its color
-public class StylesheetLabelProvider extends EMFLabelProvider {
-
- @Inject
- private ISerializer serializer;
-
- public StylesheetLabelProvider() {
- Injector injector = Guice.createInjector(new CSSRuntimeModule());
- injector.injectMembers(this);
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof ruleset) {
- return getText((ruleset) element);
- }
-
- if (element instanceof StyleSheetReference) {
- return getText((StyleSheetReference) element);
- }
-
- if (element instanceof EmbeddedStyleSheet) {
- return getText((EmbeddedStyleSheet) element);
- }
-
- return super.getText(element);
- }
-
- public String getText(ruleset ruleset) {
- // Delegate the label to XText serialization
- String label = "";
-
- if (!ruleset.getSelectors().isEmpty()) {
- label += serializer.serialize(ruleset.getSelectors().get(0));
- for (int i = 1; i < ruleset.getSelectors().size(); i++) {
- label += ", " + serializer.serialize(ruleset.getSelectors().get(i));
- }
- label = label.trim().replaceAll("\\s+", " ");
- }
-
- return label;
- }
-
- public String getText(StyleSheetReference stylesheet) {
- return stylesheet.getPath();
- }
-
- public String getText(EmbeddedStyleSheet stylesheet) {
- return stylesheet.getLabel();
- }
-
- @Override
- public Color getForeground(Object element) {
- if (!(element instanceof ruleset)) {
- return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
- }
- return super.getForeground(element);
- }
-
- @Override
- public Image getImage(Object element) {
- // if(element instanceof StyleSheetReference) {
- // return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "/icons/sourceEditor.gif");
- // }
- return null;
- }
-}
+/*****************************************************************************
+ * 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.configuration.providers;
+
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.gmfdiag.css3.CSSRuntimeModule;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ruleset;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.xtext.serializer.ISerializer;
+
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+
+//TODO: Add a context to this LabelProvider (Selected View)
+//TODO: When a Ruleset is applied/applicable on the selected View, change its color
+public class StylesheetLabelProvider extends EMFLabelProvider {
+
+ @Inject
+ private ISerializer serializer;
+
+ public StylesheetLabelProvider() {
+ Injector injector = Guice.createInjector(new CSSRuntimeModule());
+ injector.injectMembers(this);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ruleset) {
+ return getText((ruleset) element);
+ }
+
+ if (element instanceof StyleSheetReference) {
+ return getText((StyleSheetReference) element);
+ }
+
+ if (element instanceof EmbeddedStyleSheet) {
+ return getText((EmbeddedStyleSheet) element);
+ }
+
+ return super.getText(element);
+ }
+
+ public String getText(ruleset ruleset) {
+ // Delegate the label to XText serialization
+ String label = "";
+
+ if (!ruleset.getSelectors().isEmpty()) {
+ label += serializer.serialize(ruleset.getSelectors().get(0));
+ for (int i = 1; i < ruleset.getSelectors().size(); i++) {
+ label += ", " + serializer.serialize(ruleset.getSelectors().get(i));
+ }
+ label = label.trim().replaceAll("\\s+", " ");
+ }
+
+ return label;
+ }
+
+ public String getText(StyleSheetReference stylesheet) {
+ return stylesheet.getPath();
+ }
+
+ public String getText(EmbeddedStyleSheet stylesheet) {
+ return stylesheet.getLabel();
+ }
+
+ @Override
+ public Color getForeground(Object element) {
+ if (!(element instanceof ruleset)) {
+ return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
+ }
+ return super.getForeground(element);
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ // if(element instanceof StyleSheetReference) {
+ // return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "/icons/sourceEditor.gif");
+ // }
+ return null;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..c585cc455ae 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/.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.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
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/about.html b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/about.html
index 209103075a7..dd3c089a94c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/about.html
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>November 14, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
</html> \ No newline at end of file
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 77cc362428d..a3240dd9e62 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
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <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>
- <version>3.0.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <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>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/Activator.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/Activator.java
index 333942e1ee3..4ba29982eec 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/Activator.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/Activator.java
@@ -1,69 +1,69 @@
-/*****************************************************************************
- * 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;
-
-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.properties"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- 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 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;
+
+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.properties"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ 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;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllCSSStyleSheetCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllCSSStyleSheetCommand.java
index 46362ca75d3..cc825d3a06e 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllCSSStyleSheetCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllCSSStyleSheetCommand.java
@@ -1,65 +1,65 @@
-/*****************************************************************************
- * 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.databinding;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.AddAllCustomStyleListValueCommand;
-
-
-public class AddAllCSSStyleSheetCommand extends AddAllCustomStyleListValueCommand {
-
- protected final Set<EObject> createdEObjects = new HashSet<EObject>();
-
- public AddAllCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Collection<?> values, int index) {
- super(domain, view, styleName, styleClass, styleFeature, values, index);
- }
-
- public AddAllCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature feature, Collection<?> values) {
- super(domain, view, styleName, styleClass, feature, values);
- }
-
- @Override
- public void execute() {
- for (Object value : values) {
- if (value instanceof EObject) {
- EObject eObject = (EObject) value;
- if (eObject.eResource() == null) {
- view.eResource().getContents().add(eObject);
- createdEObjects.add(eObject);
- }
- }
- }
- super.execute();
- }
-
- @Override
- public void undo() {
- for (Object value : values) {
- if (value instanceof EObject) {
- EObject eObject = (EObject) value;
- if (createdEObjects.contains(eObject)) {
- eObject.eResource().getContents().remove(eObject);
- }
- }
- }
- super.undo();
- }
-
-}
+/*****************************************************************************
+ * 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.databinding;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.AddAllCustomStyleListValueCommand;
+
+
+public class AddAllCSSStyleSheetCommand extends AddAllCustomStyleListValueCommand {
+
+ protected final Set<EObject> createdEObjects = new HashSet<EObject>();
+
+ public AddAllCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Collection<?> values, int index) {
+ super(domain, view, styleName, styleClass, styleFeature, values, index);
+ }
+
+ public AddAllCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature feature, Collection<?> values) {
+ super(domain, view, styleName, styleClass, feature, values);
+ }
+
+ @Override
+ public void execute() {
+ for (Object value : values) {
+ if (value instanceof EObject) {
+ EObject eObject = (EObject) value;
+ if (eObject.eResource() == null) {
+ view.eResource().getContents().add(eObject);
+ createdEObjects.add(eObject);
+ }
+ }
+ }
+ super.execute();
+ }
+
+ @Override
+ public void undo() {
+ for (Object value : values) {
+ if (value instanceof EObject) {
+ EObject eObject = (EObject) value;
+ if (createdEObjects.contains(eObject)) {
+ eObject.eResource().getContents().remove(eObject);
+ }
+ }
+ }
+ super.undo();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllModelStyleSheetCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllModelStyleSheetCommand.java
index 61a780cef90..df8c98b7479 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllModelStyleSheetCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddAllModelStyleSheetCommand.java
@@ -1,73 +1,73 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * MickaŽl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-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;
-
-/**
- * Add stylesheet's model Command.
- *
- * @author Mickael ADAM
- */
-public class AddAllModelStyleSheetCommand extends RecordingCommand {
-
- /** The resource. */
- private Resource resource;
-
- /** The values. */
- private Collection<?> values;
-
- /**
- * Constructor.
- *
- * @param domain
- * the domain
- * @param resource
- * the resource
- * @param values
- * the values
- */
- public AddAllModelStyleSheetCommand(TransactionalEditingDomain domain, Resource resource, Collection<?> values) {
- super(domain);
- this.resource = resource;
- this.values = values;
- }
-
- /**
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
- @Override
- public void doExecute() {
-
- // Get the model styleSheet on the resource
- Object modelStyleSheetObject = EcoreUtil.getObjectByType(resource.getContents(), StylesheetsPackage.Literals.MODEL_STYLE_SHEETS);
-
- // For each styleSheet
- for (Object styleSheetRef : values) {
- // Add it to the modelStyleSheet
- ((ModelStyleSheets) modelStyleSheetObject).getStylesheets().add((StyleSheet) styleSheetRef);
- }
- // Add the modelStyleSheet to the resource
- resource.getContents().add(((ModelStyleSheets) modelStyleSheetObject));
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * MickaŽl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+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;
+
+/**
+ * Add stylesheet's model Command.
+ *
+ * @author Mickael ADAM
+ */
+public class AddAllModelStyleSheetCommand extends RecordingCommand {
+
+ /** The resource. */
+ private Resource resource;
+
+ /** The values. */
+ private Collection<?> values;
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * the domain
+ * @param resource
+ * the resource
+ * @param values
+ * the values
+ */
+ public AddAllModelStyleSheetCommand(TransactionalEditingDomain domain, Resource resource, Collection<?> values) {
+ super(domain);
+ this.resource = resource;
+ this.values = values;
+ }
+
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ public void doExecute() {
+
+ // Get the model styleSheet on the resource
+ Object modelStyleSheetObject = EcoreUtil.getObjectByType(resource.getContents(), StylesheetsPackage.Literals.MODEL_STYLE_SHEETS);
+
+ // For each styleSheet
+ for (Object styleSheetRef : values) {
+ // Add it to the modelStyleSheet
+ ((ModelStyleSheets) modelStyleSheetObject).getStylesheets().add((StyleSheet) styleSheetRef);
+ }
+ // Add the modelStyleSheet to the resource
+ resource.getContents().add(((ModelStyleSheets) modelStyleSheetObject));
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCSSStyleSheetCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCSSStyleSheetCommand.java
index 214a02de491..a5aa6744209 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCSSStyleSheetCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCSSStyleSheetCommand.java
@@ -1,61 +1,61 @@
-/*****************************************************************************
- * 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.databinding;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.AddCustomStyleListValueCommand;
-
-
-public class AddCSSStyleSheetCommand extends AddCustomStyleListValueCommand implements Command {
-
- protected boolean createdEObject = false;
-
- public AddCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Object value) {
- super(domain, view, styleName, styleClass, styleFeature, value);
- }
-
- public AddCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Object value, int index) {
- super(domain, view, styleName, styleClass, styleFeature, value, index);
- }
-
- @Override
- public void execute() {
- if (value instanceof EObject) {
- EObject eObject = (EObject) value;
- if (eObject.eResource() == null) {
- view.eResource().getContents().add(eObject);
- createdEObject = true;
- }
- }
-
- super.execute();
- }
-
- @Override
- public void undo() {
- if (value instanceof EObject) {
- EObject eObject = (EObject) value;
- if (createdEObject) {
- eObject.eResource().getContents().remove(eObject);
- }
- }
- super.undo();
- }
-
-
-
-}
+/*****************************************************************************
+ * 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.databinding;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.AddCustomStyleListValueCommand;
+
+
+public class AddCSSStyleSheetCommand extends AddCustomStyleListValueCommand implements Command {
+
+ protected boolean createdEObject = false;
+
+ public AddCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Object value) {
+ super(domain, view, styleName, styleClass, styleFeature, value);
+ }
+
+ public AddCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Object value, int index) {
+ super(domain, view, styleName, styleClass, styleFeature, value, index);
+ }
+
+ @Override
+ public void execute() {
+ if (value instanceof EObject) {
+ EObject eObject = (EObject) value;
+ if (eObject.eResource() == null) {
+ view.eResource().getContents().add(eObject);
+ createdEObject = true;
+ }
+ }
+
+ super.execute();
+ }
+
+ @Override
+ public void undo() {
+ if (value instanceof EObject) {
+ EObject eObject = (EObject) value;
+ if (createdEObject) {
+ eObject.eResource().getContents().remove(eObject);
+ }
+ }
+ super.undo();
+ }
+
+
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCssClassStyleCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCssClassStyleCommand.java
index 1041bab9e02..00b912a4ade 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCssClassStyleCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddCssClassStyleCommand.java
@@ -1,72 +1,72 @@
-/*****************************************************************************
- * Copyright (c) 2017 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:
- * Benoit Maggi (CEA LIST) - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.StringListValueStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
-
-
-/**
- * EMF Command to add a new style
- * Stored in Notation with CSSStyles.CSS_GMF_CLASS_KEY
- */
-public class AddCssClassStyleCommand extends RecordingCommand implements Command {
-
- private Collection<View> views;
-
- private String style;
-
- /**
- * Constructor.
- *
- * @param namedStyle
- * @param newValue
- */
- public AddCssClassStyleCommand(TransactionalEditingDomain domain, View view, String newValue) {
- this(domain, Collections.singleton(view), newValue);
- }
-
- public AddCssClassStyleCommand(TransactionalEditingDomain domain, Collection<View> views, String style) {
- super(domain);
- this.views = views;
- this.style = style;
- }
-
-
- /**
- * Add the style to the existing list or initialize a new list with it
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
- @Override
- protected void doExecute() {
- for (View view : views) {
- StringListValueStyle namedStyle = (StringListValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getStringListValueStyle(), CSSStyles.CSS_GMF_CLASS_KEY);
- if (namedStyle == null) {
- namedStyle = (StringListValueStyle) view.createStyle(NotationPackage.eINSTANCE.getStringListValueStyle());
- namedStyle.setName(CSSStyles.CSS_GMF_CLASS_KEY);
- }
- namedStyle.getStringListValue().add(style);
- }
-
-
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2017 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:
+ * Benoit Maggi (CEA LIST) - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringListValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
+
+
+/**
+ * EMF Command to add a new style
+ * Stored in Notation with CSSStyles.CSS_GMF_CLASS_KEY
+ */
+public class AddCssClassStyleCommand extends RecordingCommand implements Command {
+
+ private Collection<View> views;
+
+ private String style;
+
+ /**
+ * Constructor.
+ *
+ * @param namedStyle
+ * @param newValue
+ */
+ public AddCssClassStyleCommand(TransactionalEditingDomain domain, View view, String newValue) {
+ this(domain, Collections.singleton(view), newValue);
+ }
+
+ public AddCssClassStyleCommand(TransactionalEditingDomain domain, Collection<View> views, String style) {
+ super(domain);
+ this.views = views;
+ this.style = style;
+ }
+
+
+ /**
+ * Add the style to the existing list or initialize a new list with it
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ for (View view : views) {
+ StringListValueStyle namedStyle = (StringListValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getStringListValueStyle(), CSSStyles.CSS_GMF_CLASS_KEY);
+ if (namedStyle == null) {
+ namedStyle = (StringListValueStyle) view.createStyle(NotationPackage.eINSTANCE.getStringListValueStyle());
+ namedStyle.setName(CSSStyles.CSS_GMF_CLASS_KEY);
+ }
+ namedStyle.getStringListValue().add(style);
+ }
+
+
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddModelStyleSheetCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddModelStyleSheetCommand.java
index 2cb0fb92415..2559c5ecfd9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddModelStyleSheetCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/AddModelStyleSheetCommand.java
@@ -1,58 +1,58 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * MickaŽl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-
-/**
- * Command to add a object to the resource.
- *
- * @author Mickael ADAM
- */
-public class AddModelStyleSheetCommand extends RecordingCommand {
-
- /** The resource. */
- private Resource resource;
-
- /** The object. */
- private EObject object;
-
- /**
- * Instantiates a new adds the model style sheet command.
- *
- * @param domain
- * the domain
- * @param resource
- * the resource
- * @param object
- * the object
- */
- public AddModelStyleSheetCommand(TransactionalEditingDomain domain, Resource resource, EObject object) {
- super(domain);
- this.resource = resource;
- this.object = object;
- }
-
- /**
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
-
- @Override
- public void doExecute() {
- resource.getContents().add(object);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * MickaŽl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * Command to add a object to the resource.
+ *
+ * @author Mickael ADAM
+ */
+public class AddModelStyleSheetCommand extends RecordingCommand {
+
+ /** The resource. */
+ private Resource resource;
+
+ /** The object. */
+ private EObject object;
+
+ /**
+ * Instantiates a new adds the model style sheet command.
+ *
+ * @param domain
+ * the domain
+ * @param resource
+ * the resource
+ * @param object
+ * the object
+ */
+ public AddModelStyleSheetCommand(TransactionalEditingDomain domain, Resource resource, EObject object) {
+ super(domain);
+ this.resource = resource;
+ this.object = object;
+ }
+
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+
+ @Override
+ public void doExecute() {
+ resource.getContents().add(object);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/CustomModelStyleSheetListener.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/CustomModelStyleSheetListener.java
index 02c67061ebf..5ddac5db99f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/CustomModelStyleSheetListener.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/CustomModelStyleSheetListener.java
@@ -1,93 +1,93 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * MickaŽl ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.resource.Resource;
-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;
-
-/**
- * A Listener for ModelStyleSheet List
- *
- * @author MickaŽl ADAM
- */
-public class CustomModelStyleSheetListener extends AdapterImpl {
-
- private final IChangeListener listener;
-
- private boolean disposed;
-
- /**
- * Instantiates a new custom model styleSheet listener.
- *
- * @param notationResource
- * the notation resource
- * @param source
- * the source
- * @param listener
- * the listener
- */
- public CustomModelStyleSheetListener(Resource notationResource, ModelStyleSheets source, IChangeListener listener) {
-
- this.listener = listener;
-
- // add an eAdapter on it
- source.eAdapters().add(this);
- // Get all StyleSheets from the modelStyleSheet
- EList<StyleSheet> objectsFromModelSS = source.getStylesheets();
-
- for (StyleSheet styleSheet : objectsFromModelSS) {
- styleSheet.eAdapters().add(this);
- }
- }
-
- /**
- * Notify changed.
- *
- * @param notification
- * the notification
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- @Override
- public void notifyChanged(Notification notification) {
- // The listener has been disposed: remove it from the notifier
- // and ignore the notification
- if (disposed) {
- ((Notifier) notification.getNotifier()).eAdapters().remove(this);
- return;
- }
-
- if (notification.getFeature() == StylesheetsPackage.eINSTANCE.getModelStyleSheets_Stylesheets()) {
- if (!notification.isTouch()) {
- handleChange(notification.getNotifier());
- }
- }
- }
-
- private void handleChange(Object value) {
- if (value instanceof ModelStyleSheets) {
- listener.handleChange(null);
- }
- }
-
- public void dispose() {
- this.disposed = true;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * MickaŽl ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.resource.Resource;
+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;
+
+/**
+ * A Listener for ModelStyleSheet List
+ *
+ * @author MickaŽl ADAM
+ */
+public class CustomModelStyleSheetListener extends AdapterImpl {
+
+ private final IChangeListener listener;
+
+ private boolean disposed;
+
+ /**
+ * Instantiates a new custom model styleSheet listener.
+ *
+ * @param notationResource
+ * the notation resource
+ * @param source
+ * the source
+ * @param listener
+ * the listener
+ */
+ public CustomModelStyleSheetListener(Resource notationResource, ModelStyleSheets source, IChangeListener listener) {
+
+ this.listener = listener;
+
+ // add an eAdapter on it
+ source.eAdapters().add(this);
+ // Get all StyleSheets from the modelStyleSheet
+ EList<StyleSheet> objectsFromModelSS = source.getStylesheets();
+
+ for (StyleSheet styleSheet : objectsFromModelSS) {
+ styleSheet.eAdapters().add(this);
+ }
+ }
+
+ /**
+ * Notify changed.
+ *
+ * @param notification
+ * the notification
+ * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ // The listener has been disposed: remove it from the notifier
+ // and ignore the notification
+ if (disposed) {
+ ((Notifier) notification.getNotifier()).eAdapters().remove(this);
+ return;
+ }
+
+ if (notification.getFeature() == StylesheetsPackage.eINSTANCE.getModelStyleSheets_Stylesheets()) {
+ if (!notification.isTouch()) {
+ handleChange(notification.getNotifier());
+ }
+ }
+ }
+
+ private void handleChange(Object value) {
+ if (value instanceof ModelStyleSheets) {
+ listener.handleChange(null);
+ }
+ }
+
+ public void dispose() {
+ this.disposed = true;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/DiagramStyleSheetObservableList.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/DiagramStyleSheetObservableList.java
index 079230ec4eb..5c925730610 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/DiagramStyleSheetObservableList.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/DiagramStyleSheetObservableList.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.databinding;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomEObjectStyleObservableList;
-
-/**
- * An ObservableList for manipulating CSS StyleSheets in a Diagram. The styleSheets
- * are stored in the view's Resource, and added as a CustomStyle (GMF NamedStyle)
- * in the view. When the last reference to a CSS Stylesheet is removed, it is
- * removed from the view's resource.
- *
- * A Stylesheet will only be deleted if it is contained in the same resource as
- * the argument View (A Model B referencing a StyleSheet from a Model A cannot
- * delete it).
- *
- *
- * @author Camille Letavernier
- */
-public class DiagramStyleSheetObservableList extends CustomEObjectStyleObservableList {
-
- public DiagramStyleSheetObservableList(View view, EditingDomain domain, String styleName) {
- super(view, domain, styleName);
- }
-
- @Override
- public Command getAddCommand(int index, Object value) {
- return new AddCSSStyleSheetCommand(domain, view, styleName, eClass, feature, value, index);
- }
-
- @Override
- public Command getAddCommand(Object value) {
- return new AddCSSStyleSheetCommand(domain, view, styleName, eClass, feature, value);
- }
-
- @Override
- public Command getAddAllCommand(Collection<?> values) {
- return new AddAllCSSStyleSheetCommand(domain, view, styleName, eClass, feature, values);
- }
-
- @Override
- public Command getAddAllCommand(int index, Collection<?> values) {
- return new AddAllCSSStyleSheetCommand(domain, view, styleName, eClass, feature, values, index);
- }
-
- @Override
- public Command getRemoveCommand(Object value) {
- return new RemoveCSSStyleSheetCommand(domain, view, styleName, eClass, feature, value);
- }
-
- @Override
- public Command getRemoveAllCommand(Collection<?> values) {
- return new RemoveAllCSSStyleSheetValueCommand(domain, view, styleName, eClass, feature, values);
- }
-
- @Override
- public Command getSetCommand(int index, Object value) {
- return new SetCSSStyleSheetCommand(domain, view, styleName, eClass, feature, index, value);
- }
-
-}
+/*****************************************************************************
+ * 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.databinding;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomEObjectStyleObservableList;
+
+/**
+ * An ObservableList for manipulating CSS StyleSheets in a Diagram. The styleSheets
+ * are stored in the view's Resource, and added as a CustomStyle (GMF NamedStyle)
+ * in the view. When the last reference to a CSS Stylesheet is removed, it is
+ * removed from the view's resource.
+ *
+ * A Stylesheet will only be deleted if it is contained in the same resource as
+ * the argument View (A Model B referencing a StyleSheet from a Model A cannot
+ * delete it).
+ *
+ *
+ * @author Camille Letavernier
+ */
+public class DiagramStyleSheetObservableList extends CustomEObjectStyleObservableList {
+
+ public DiagramStyleSheetObservableList(View view, EditingDomain domain, String styleName) {
+ super(view, domain, styleName);
+ }
+
+ @Override
+ public Command getAddCommand(int index, Object value) {
+ return new AddCSSStyleSheetCommand(domain, view, styleName, eClass, feature, value, index);
+ }
+
+ @Override
+ public Command getAddCommand(Object value) {
+ return new AddCSSStyleSheetCommand(domain, view, styleName, eClass, feature, value);
+ }
+
+ @Override
+ public Command getAddAllCommand(Collection<?> values) {
+ return new AddAllCSSStyleSheetCommand(domain, view, styleName, eClass, feature, values);
+ }
+
+ @Override
+ public Command getAddAllCommand(int index, Collection<?> values) {
+ return new AddAllCSSStyleSheetCommand(domain, view, styleName, eClass, feature, values, index);
+ }
+
+ @Override
+ public Command getRemoveCommand(Object value) {
+ return new RemoveCSSStyleSheetCommand(domain, view, styleName, eClass, feature, value);
+ }
+
+ @Override
+ public Command getRemoveAllCommand(Collection<?> values) {
+ return new RemoveAllCSSStyleSheetValueCommand(domain, view, styleName, eClass, feature, values);
+ }
+
+ @Override
+ public Command getSetCommand(int index, Object value) {
+ return new SetCSSStyleSheetCommand(domain, view, styleName, eClass, feature, index, value);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java
index 9069087ccbc..d34cf0500f4 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/ModelStyleSheetObservableList.java
@@ -1,215 +1,215 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * MickaÔŅĹl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-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.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.EObjectListValueStyle;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ModelCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
-import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
-import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
-
-
-/**
- *
- * EMFObservableList containing stylesheets of the model.
- *
- * @author Mickael ADAM
- *
- */
-public class ModelStyleSheetObservableList extends EMFObservableList implements IChangeListener {
-
- /** The notation resource. */
- private Resource notationResource;
-
- /** The domain. */
- private TransactionalEditingDomain domain;
-
- /** The listener. */
- private CustomModelStyleSheetListener listener;
-
- /**
- * Constructor.
- *
- * @param notationResource
- * the notation resource
- * @param wrappedList
- * the wrapped list
- * @param domain
- * the domain
- * @param source
- * the source
- * @param feature
- * the feature
- */
- public ModelStyleSheetObservableList(Resource notationResource, List<?> wrappedList, TransactionalEditingDomain domain, EObject source, EStructuralFeature feature) {
- super(wrappedList, domain, source, feature);
- this.notationResource = notationResource;
- this.domain = domain;
-
- source.eAdapters().add(listener = new CustomModelStyleSheetListener(notationResource, (ModelStyleSheets) source, this));
- }
-
- /**
- * Used to add manually.
- *
- * @param values
- * the values
- * @return the command to add values
- * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddAllCommand(java.util.Collection)
- */
- @Override
- public Command getAddAllCommand(Collection<?> values) {
- CompoundCommand compoundCommand = new CompoundCommand();
-
- if (source.eResource() == null) {
- compoundCommand.append(new RecordingCommand(domain, "Create ModelStylesheet") {
- /**
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
- @Override
- protected void doExecute() {
- notationResource.getContents().add(source);
- }
-
- });
-
- compoundCommand.append(new AbstractCommand("Initialize ModelCSSEngine Adapter") {
-
- public void redo() {
- execute();
- }
-
- public void execute() {
- ExtendedCSSEngine engine = CSSNotationResource.getEngine(notationResource);
- if (engine instanceof ModelCSSEngine) {
- ((ModelCSSEngine) engine).initAdapter();
- }
- }
-
- /**
- * @see org.eclipse.emf.common.command.AbstractCommand#canUndo()
- *
- * @return
- */
- @Override
- public boolean canUndo() {
- return true;
- }
-
- /**
- * @see org.eclipse.emf.common.command.AbstractCommand#undo()
- *
- */
- @Override
- public void undo() {
- ExtendedCSSEngine engine = CSSNotationResource.getEngine(notationResource);
- if (engine instanceof ModelCSSEngine) {
- ((ModelCSSEngine) engine).disposeAdapter();
- }
- }
-
- /**
- * @see org.eclipse.emf.common.command.AbstractCommand#prepare()
- *
- * @return
- */
- @Override
- protected boolean prepare() {
- return true;
- }
- });
- }
-
- compoundCommand.append(super.getAddAllCommand(values));
- compoundCommand.append(new AddAllModelStyleSheetCommand(domain, notationResource, values));
- return compoundCommand;
- }
-
- /**
- * Used to remove manually styleSheet.
- *
- * @param value
- * the value
- * @return the removes command
- * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveCommand(java.lang.Object)
- */
- @Override
- public Command getRemoveCommand(Object value) {
- CompoundCommand compoundCommand = new CompoundCommand();
- compoundCommand.append(super.getRemoveCommand(value));
-
- // Retrieve all instance of EObjectListValueStyleImpl on all CSSDiagramImpl to
- EList<EObject> objectsFromResource = notationResource.getContents();
- for (Object objectFromResource : objectsFromResource) {
- // For each CSSDiagramImpl of the resource look for EObjectListValueStyleImpl
- if (objectFromResource instanceof CSSDiagram) {
- EList<EObject> objectsFromDiagram = ((CSSDiagram) objectFromResource).getStyles();
- for (Object objectFromDiagram : objectsFromDiagram) {
- // For each EObjectListValueStyleImpl of each diagram
- if (objectFromDiagram instanceof EObjectListValueStyle) {
- for (Object styleSheetReference : ((EObjectListValueStyle) objectFromDiagram).getEObjectListValue()) {
- // If the current style sheet to delete from model exist on a diagram, add it on the root
- if (value == styleSheetReference) {
- compoundCommand.append(new RemoveObjectCommand(domain, (EObject) styleSheetReference));
- compoundCommand.append(new AddModelStyleSheetCommand(domain, notationResource, (EObject) styleSheetReference));
- }
- }
- }
- }
- }
- }
- return compoundCommand;
- }
-
- /**
- * Used to remove all StyleSheets before replace the new list.
- *
- * @param values
- * the values
- * @return the removes the all command
- * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveAllCommand(java.util.Collection)
- */
- @Override
- public Command getRemoveAllCommand(Collection<?> values) {
- return new RemoveAllModelStyleSheetValueCommand(domain, notationResource, values);
- }
-
- /**
- * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#dispose()
- *
- */
- @Override
- public void dispose() {
- source.eAdapters().remove(listener);
- listener.dispose();
- listener = null;
- super.dispose();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * MickaÔŅĹl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.IChangeListener;
+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.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.EObjectListValueStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ModelCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList;
+
+
+/**
+ *
+ * EMFObservableList containing stylesheets of the model.
+ *
+ * @author Mickael ADAM
+ *
+ */
+public class ModelStyleSheetObservableList extends EMFObservableList implements IChangeListener {
+
+ /** The notation resource. */
+ private Resource notationResource;
+
+ /** The domain. */
+ private TransactionalEditingDomain domain;
+
+ /** The listener. */
+ private CustomModelStyleSheetListener listener;
+
+ /**
+ * Constructor.
+ *
+ * @param notationResource
+ * the notation resource
+ * @param wrappedList
+ * the wrapped list
+ * @param domain
+ * the domain
+ * @param source
+ * the source
+ * @param feature
+ * the feature
+ */
+ public ModelStyleSheetObservableList(Resource notationResource, List<?> wrappedList, TransactionalEditingDomain domain, EObject source, EStructuralFeature feature) {
+ super(wrappedList, domain, source, feature);
+ this.notationResource = notationResource;
+ this.domain = domain;
+
+ source.eAdapters().add(listener = new CustomModelStyleSheetListener(notationResource, (ModelStyleSheets) source, this));
+ }
+
+ /**
+ * Used to add manually.
+ *
+ * @param values
+ * the values
+ * @return the command to add values
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getAddAllCommand(java.util.Collection)
+ */
+ @Override
+ public Command getAddAllCommand(Collection<?> values) {
+ CompoundCommand compoundCommand = new CompoundCommand();
+
+ if (source.eResource() == null) {
+ compoundCommand.append(new RecordingCommand(domain, "Create ModelStylesheet") {
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ notationResource.getContents().add(source);
+ }
+
+ });
+
+ compoundCommand.append(new AbstractCommand("Initialize ModelCSSEngine Adapter") {
+
+ public void redo() {
+ execute();
+ }
+
+ public void execute() {
+ ExtendedCSSEngine engine = CSSNotationResource.getEngine(notationResource);
+ if (engine instanceof ModelCSSEngine) {
+ ((ModelCSSEngine) engine).initAdapter();
+ }
+ }
+
+ /**
+ * @see org.eclipse.emf.common.command.AbstractCommand#canUndo()
+ *
+ * @return
+ */
+ @Override
+ public boolean canUndo() {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.emf.common.command.AbstractCommand#undo()
+ *
+ */
+ @Override
+ public void undo() {
+ ExtendedCSSEngine engine = CSSNotationResource.getEngine(notationResource);
+ if (engine instanceof ModelCSSEngine) {
+ ((ModelCSSEngine) engine).disposeAdapter();
+ }
+ }
+
+ /**
+ * @see org.eclipse.emf.common.command.AbstractCommand#prepare()
+ *
+ * @return
+ */
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+ });
+ }
+
+ compoundCommand.append(super.getAddAllCommand(values));
+ compoundCommand.append(new AddAllModelStyleSheetCommand(domain, notationResource, values));
+ return compoundCommand;
+ }
+
+ /**
+ * Used to remove manually styleSheet.
+ *
+ * @param value
+ * the value
+ * @return the removes command
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveCommand(java.lang.Object)
+ */
+ @Override
+ public Command getRemoveCommand(Object value) {
+ CompoundCommand compoundCommand = new CompoundCommand();
+ compoundCommand.append(super.getRemoveCommand(value));
+
+ // Retrieve all instance of EObjectListValueStyleImpl on all CSSDiagramImpl to
+ EList<EObject> objectsFromResource = notationResource.getContents();
+ for (Object objectFromResource : objectsFromResource) {
+ // For each CSSDiagramImpl of the resource look for EObjectListValueStyleImpl
+ if (objectFromResource instanceof CSSDiagram) {
+ EList<EObject> objectsFromDiagram = ((CSSDiagram) objectFromResource).getStyles();
+ for (Object objectFromDiagram : objectsFromDiagram) {
+ // For each EObjectListValueStyleImpl of each diagram
+ if (objectFromDiagram instanceof EObjectListValueStyle) {
+ for (Object styleSheetReference : ((EObjectListValueStyle) objectFromDiagram).getEObjectListValue()) {
+ // If the current style sheet to delete from model exist on a diagram, add it on the root
+ if (value == styleSheetReference) {
+ compoundCommand.append(new RemoveObjectCommand(domain, (EObject) styleSheetReference));
+ compoundCommand.append(new AddModelStyleSheetCommand(domain, notationResource, (EObject) styleSheetReference));
+ }
+ }
+ }
+ }
+ }
+ }
+ return compoundCommand;
+ }
+
+ /**
+ * Used to remove all StyleSheets before replace the new list.
+ *
+ * @param values
+ * the values
+ * @return the removes the all command
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#getRemoveAllCommand(java.util.Collection)
+ */
+ @Override
+ public Command getRemoveAllCommand(Collection<?> values) {
+ return new RemoveAllModelStyleSheetValueCommand(domain, notationResource, values);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableList#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ source.eAdapters().remove(listener);
+ listener.dispose();
+ listener = null;
+ super.dispose();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllCSSStyleSheetValueCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllCSSStyleSheetValueCommand.java
index c2bf8504376..f9d58cbaa00 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllCSSStyleSheetValueCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllCSSStyleSheetValueCommand.java
@@ -1,67 +1,67 @@
-/*****************************************************************************
- * 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.databinding;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.RemoveAllCustomStyleListValueCommand;
-
-
-public class RemoveAllCSSStyleSheetValueCommand extends RemoveAllCustomStyleListValueCommand {
-
- protected final Set<EObject> deletedEObjects = new HashSet<EObject>();
-
- public RemoveAllCSSStyleSheetValueCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, Collection<?> values) {
- super(domain, view, styleName, eClass, feature, values);
- }
-
- @Override
- public void execute() {
- for (Object value : values) {
- if (value instanceof EObject) {
- EObject styleSheet = (EObject) value;
- Collection<EStructuralFeature.Setting> references = EMFHelper.getUsages(styleSheet);
- // We're removing the last reference to this styleSheet (Only if the stylesheet is contained
- // in the same resource as the view referencing it... We don't modify external models)
- if (references.size() == 1 && styleSheet.eResource() == view.eResource()) {
- deletedEObjects.add(styleSheet);
- styleSheet.eResource().getContents().remove(styleSheet);
- }
- }
- }
-
- super.execute();
- }
-
- @Override
- public void undo() {
- for (Object value : values) {
- if (value instanceof EObject) {
- EObject eObject = (EObject) value;
- if (deletedEObjects.contains(eObject)) {
- // We destroyed the StyleSheet EObject: recreate it in its previous resource
- view.eResource().getContents().add(eObject);
- }
- }
- }
- super.undo();
- }
-
-}
+/*****************************************************************************
+ * 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.databinding;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.RemoveAllCustomStyleListValueCommand;
+
+
+public class RemoveAllCSSStyleSheetValueCommand extends RemoveAllCustomStyleListValueCommand {
+
+ protected final Set<EObject> deletedEObjects = new HashSet<EObject>();
+
+ public RemoveAllCSSStyleSheetValueCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, Collection<?> values) {
+ super(domain, view, styleName, eClass, feature, values);
+ }
+
+ @Override
+ public void execute() {
+ for (Object value : values) {
+ if (value instanceof EObject) {
+ EObject styleSheet = (EObject) value;
+ Collection<EStructuralFeature.Setting> references = EMFHelper.getUsages(styleSheet);
+ // We're removing the last reference to this styleSheet (Only if the stylesheet is contained
+ // in the same resource as the view referencing it... We don't modify external models)
+ if (references.size() == 1 && styleSheet.eResource() == view.eResource()) {
+ deletedEObjects.add(styleSheet);
+ styleSheet.eResource().getContents().remove(styleSheet);
+ }
+ }
+ }
+
+ super.execute();
+ }
+
+ @Override
+ public void undo() {
+ for (Object value : values) {
+ if (value instanceof EObject) {
+ EObject eObject = (EObject) value;
+ if (deletedEObjects.contains(eObject)) {
+ // We destroyed the StyleSheet EObject: recreate it in its previous resource
+ view.eResource().getContents().add(eObject);
+ }
+ }
+ }
+ super.undo();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllModelStyleSheetValueCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllModelStyleSheetValueCommand.java
index 26eb1affb5e..239a19a2efd 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllModelStyleSheetValueCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveAllModelStyleSheetValueCommand.java
@@ -1,84 +1,84 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * MickaŽl ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import java.util.Collection;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-
-/**
- *
- * Command to remove all styleSheets from the resource.
- *
- * @author Mickael ADAM
- *
- */
-public class RemoveAllModelStyleSheetValueCommand extends RecordingCommand {
-
- /** The values. */
- private Collection<?> values;
-
- /** The resource. */
- private Resource resource;
-
- /** The domain. */
- private TransactionalEditingDomain domain;
-
- /**
- * Constructor.
- *
- * @param domain
- * the domain
- * @param resource
- * the resource
- * @param values
- * the values
- */
- public RemoveAllModelStyleSheetValueCommand(TransactionalEditingDomain domain, Resource resource, Collection<?> values) {
- super(domain);
- this.resource = resource;
- this.values = values;
- this.domain = domain;
- }
-
- /**
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
- @Override
- public void doExecute() {
- for (Object value : values) {
- if (value instanceof StyleSheetReference) {
- StyleSheetReference styleSheet = (StyleSheetReference) value;
-
- // Create a request to delete the styleSheet
- DestroyElementRequest request = new DestroyElementRequest(domain, styleSheet, false);
- // Get the command to delete the styleSheet
- DestroyElementCommand command = new DestroyElementCommand(request);
- try {
- // execute command
- command.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * MickaŽl ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import java.util.Collection;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+
+/**
+ *
+ * Command to remove all styleSheets from the resource.
+ *
+ * @author Mickael ADAM
+ *
+ */
+public class RemoveAllModelStyleSheetValueCommand extends RecordingCommand {
+
+ /** The values. */
+ private Collection<?> values;
+
+ /** The resource. */
+ private Resource resource;
+
+ /** The domain. */
+ private TransactionalEditingDomain domain;
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * the domain
+ * @param resource
+ * the resource
+ * @param values
+ * the values
+ */
+ public RemoveAllModelStyleSheetValueCommand(TransactionalEditingDomain domain, Resource resource, Collection<?> values) {
+ super(domain);
+ this.resource = resource;
+ this.values = values;
+ this.domain = domain;
+ }
+
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ public void doExecute() {
+ for (Object value : values) {
+ if (value instanceof StyleSheetReference) {
+ StyleSheetReference styleSheet = (StyleSheetReference) value;
+
+ // Create a request to delete the styleSheet
+ DestroyElementRequest request = new DestroyElementRequest(domain, styleSheet, false);
+ // Get the command to delete the styleSheet
+ DestroyElementCommand command = new DestroyElementCommand(request);
+ try {
+ // execute command
+ command.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveCSSStyleSheetCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveCSSStyleSheetCommand.java
index 721eb5bd119..fd90e303291 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveCSSStyleSheetCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveCSSStyleSheetCommand.java
@@ -1,59 +1,59 @@
-/*****************************************************************************
- * 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.databinding;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.RemoveCustomStyleListValueCommand;
-
-
-public class RemoveCSSStyleSheetCommand extends RemoveCustomStyleListValueCommand {
-
- protected Resource previousResource;
-
- public RemoveCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, Object value) {
- super(domain, view, styleName, eClass, feature, value);
- }
-
- @Override
- public void execute() {
- if (value instanceof EObject) {
- EObject styleSheet = (EObject) value;
- Collection<EStructuralFeature.Setting> references = EMFHelper.getUsages(styleSheet);
- // We're removing the last reference to this styleSheet (Only if the stylesheet is contained
- // in the same resource as the view referencing it... We don't modify external models)
- if (references.size() == 1 && styleSheet.eResource() == view.eResource()) {
- previousResource = styleSheet.eResource();
- styleSheet.eResource().getContents().remove(styleSheet);
- }
- }
-
- super.execute();
- }
-
- @Override
- public void undo() {
- // We destroyed the StyleSheet EObject: recreate it in its previous resource
- if (previousResource != null) {
- previousResource.getContents().add((EObject) value);
- }
- super.undo();
- }
-
-}
+/*****************************************************************************
+ * 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.databinding;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.RemoveCustomStyleListValueCommand;
+
+
+public class RemoveCSSStyleSheetCommand extends RemoveCustomStyleListValueCommand {
+
+ protected Resource previousResource;
+
+ public RemoveCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, Object value) {
+ super(domain, view, styleName, eClass, feature, value);
+ }
+
+ @Override
+ public void execute() {
+ if (value instanceof EObject) {
+ EObject styleSheet = (EObject) value;
+ Collection<EStructuralFeature.Setting> references = EMFHelper.getUsages(styleSheet);
+ // We're removing the last reference to this styleSheet (Only if the stylesheet is contained
+ // in the same resource as the view referencing it... We don't modify external models)
+ if (references.size() == 1 && styleSheet.eResource() == view.eResource()) {
+ previousResource = styleSheet.eResource();
+ styleSheet.eResource().getContents().remove(styleSheet);
+ }
+ }
+
+ super.execute();
+ }
+
+ @Override
+ public void undo() {
+ // We destroyed the StyleSheet EObject: recreate it in its previous resource
+ if (previousResource != null) {
+ previousResource.getContents().add((EObject) value);
+ }
+ super.undo();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveObjectCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveObjectCommand.java
index 72637735fbc..888866dad50 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveObjectCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/RemoveObjectCommand.java
@@ -1,71 +1,71 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * MickaŽl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-
-/**
- *
- * Command to remove an EObject from its containing resource and/or its containing object.
- *
- * @author Mickael ADAM
- *
- */
-public class RemoveObjectCommand extends RecordingCommand {
-
-
- /** The object. */
- private EObject object;
-
- /** The domain. */
- private TransactionalEditingDomain domain;
-
- /**
- * Constructor.
- *
- * @param domain
- * the domain
- * @param object
- * the object
- */
- public RemoveObjectCommand(TransactionalEditingDomain domain, EObject object) {
- super(domain);
- this.domain = domain;
- this.object = object;
- }
-
- /**
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
- @Override
- protected void doExecute() {
- // Create a request to delete the object
- DestroyElementRequest request = new DestroyElementRequest(domain, object, false);
- // Get the command to delete the object
- DestroyElementCommand command = new DestroyElementCommand(request);
- try {
- // execute command
- command.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * MickaŽl Adam (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+
+/**
+ *
+ * Command to remove an EObject from its containing resource and/or its containing object.
+ *
+ * @author Mickael ADAM
+ *
+ */
+public class RemoveObjectCommand extends RecordingCommand {
+
+
+ /** The object. */
+ private EObject object;
+
+ /** The domain. */
+ private TransactionalEditingDomain domain;
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * the domain
+ * @param object
+ * the object
+ */
+ public RemoveObjectCommand(TransactionalEditingDomain domain, EObject object) {
+ super(domain);
+ this.domain = domain;
+ this.object = object;
+ }
+
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ // Create a request to delete the object
+ DestroyElementRequest request = new DestroyElementRequest(domain, object, false);
+ // Get the command to delete the object
+ DestroyElementCommand command = new DestroyElementCommand(request);
+ try {
+ // execute command
+ command.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/SetCSSStyleSheetCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/SetCSSStyleSheetCommand.java
index 1e290bccd86..35b2d74806c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/SetCSSStyleSheetCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/databinding/SetCSSStyleSheetCommand.java
@@ -1,45 +1,45 @@
-/*****************************************************************************
- * 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.databinding;
-
-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.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.SetCustomStyleListValueCommand;
-
-//TODO: This a remove & add command
-//This command is currently never called in Papyrus
-//See DiagramStyleSheetObservableList#getSetCommand(int, Object)
-public class SetCSSStyleSheetCommand extends SetCustomStyleListValueCommand {
-
- public SetCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, int index, Object value) {
- super(domain, view, styleName, eClass, feature, index, value);
- // TODO: implement execute & undo
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void execute() {
- // TODO: Check whether we're removing an element. If so, remove it (And delete it, eventually).
- // In any case, create the new element and add it in the resource. Keep track of each.
- super.execute();
- }
-
- @Override
- public void undo() {
- // TODO: If an element has been removed, recreate it and add it in the view's resource
- // Remove the newly created element
- super.undo();
- }
-
-}
+/*****************************************************************************
+ * 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.databinding;
+
+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.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.SetCustomStyleListValueCommand;
+
+//TODO: This a remove & add command
+//This command is currently never called in Papyrus
+//See DiagramStyleSheetObservableList#getSetCommand(int, Object)
+public class SetCSSStyleSheetCommand extends SetCustomStyleListValueCommand {
+
+ public SetCSSStyleSheetCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, int index, Object value) {
+ super(domain, view, styleName, eClass, feature, index, value);
+ // TODO: implement execute & undo
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void execute() {
+ // TODO: Check whether we're removing an element. If so, remove it (And delete it, eventually).
+ // In any case, create the new element and add it in the resource. Keep track of each.
+ super.execute();
+ }
+
+ @Override
+ public void undo() {
+ // TODO: If an element has been removed, recreate it and add it in the view's resource
+ // Remove the newly created element
+ super.undo();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java
index 73818b6f88a..b8514f795c2 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java
@@ -1,136 +1,136 @@
-/*****************************************************************************
- * Copyright (c) 2014 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
- * MickaÔŅĹl Adam (ALL4TEC) mickael.adam@all4tec.net - bug 429642
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.creation.StyleSheetFactory;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.DiagramStyleSheetObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.ModelStyleSheetObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetContentProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSClassContentProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
-import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.CustomStyleModelElement;
-import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
-import org.eclipse.papyrus.infra.widgets.creation.StringEditionFactory;
-import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
-
-public class CSSModelElement extends CustomStyleModelElement {
-
- public CSSModelElement(View source, DataContextElement context) {
- super(source, context);
- }
-
- public CSSModelElement(View source, EditingDomain domain, DataContextElement element) {
- super(source, domain, element);
- }
-
- @Override
- public ReferenceValueFactory getValueFactory(String propertyPath) {
- if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
- return new StyleSheetFactory((View) this.source);
- }
- if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
- return new StyleSheetFactory((View) this.source);
- }
- if (CSSStyles.CSS_GMF_CLASS_KEY.equals(propertyPath)) {
- StringEditionFactory factory = new StringEditionFactory();
- factory.setContentProvider(getContentProvider(propertyPath));
- return factory;
- }
- return super.getValueFactory(propertyPath);
- }
-
- @Override
- public IObservable doGetObservable(String propertyPath) {
- if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
- if (source instanceof View) {
- return new DiagramStyleSheetObservableList((View) source, domain, propertyPath);
- }
- }
- if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
- // Get the resource
- final Resource notationResource = source.eResource();
- if (notationResource == null) { // May happen e.g. during deletion of the diagram
- return null;
- }
- // Get the model styleSheet Object
- Object modelStyleSheetObject = EcoreUtil.getObjectByType(notationResource.getContents(), StylesheetsPackage.Literals.MODEL_STYLE_SHEETS);
- // The model styleSheet
- final ModelStyleSheets modelStyleSheetsSource = modelStyleSheetObject instanceof ModelStyleSheets ? (ModelStyleSheets) modelStyleSheetObject : StylesheetsFactory.eINSTANCE.createModelStyleSheets();
- // If the modelStylesheet doesn't exist
-
- return new ModelStyleSheetObservableList(notationResource, modelStyleSheetsSource.getStylesheets(), (TransactionalEditingDomain) domain, modelStyleSheetsSource, StylesheetsPackage.Literals.MODEL_STYLE_SHEETS__STYLESHEETS);
- }
- return super.doGetObservable(propertyPath);
- }
-
- @Override
- public ILabelProvider getLabelProvider(String propertyPath) {
- if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
- return new CSSStyleSheetLabelProvider();
- }
- if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
- return new CSSStyleSheetLabelProvider();
- }
- return super.getLabelProvider(propertyPath);
- }
-
- @Override
- public IStaticContentProvider getContentProvider(String propertyPath) {
- if (propertyPath.equals(CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY)) {
- return new CSSStyleSheetContentProvider(source);
- }
- if (propertyPath.equals(CSSStyles.CSS_MODEL_STYLESHEETS_KEY)) {
- return new CSSStyleSheetContentProvider(source);
- }
- if (propertyPath.equals(CSSStyles.CSS_GMF_CLASS_KEY)) {
- Diagram diagram = ((View) source).getDiagram();
- if (diagram instanceof CSSDiagram) {
- EObject semanticElement = ((View) source).getElement();
- if (semanticElement != null) {
- // TODO: For Diagrams, we should use the right DiagramKind (See GMFElementAdapter)
- // Until then, we list all available classes (*)
- String elementName = source instanceof Diagram ? "*" : semanticElement.eClass().getName();
- return new CSSClassContentProvider(elementName, ((CSSDiagram) diagram).getEngine());
- }
- }
- return null;
- }
- return null;
- }
-
- @Override
- public boolean isUnique(String propertyPath) {
- if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
- return true;
- }
- if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
- return true;
- }
- return super.isUnique(propertyPath);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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
+ * MickaÔŅĹl Adam (ALL4TEC) mickael.adam@all4tec.net - bug 429642
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
+
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.creation.StyleSheetFactory;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.DiagramStyleSheetObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.ModelStyleSheetObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetContentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLabelProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSClassContentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
+import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.CustomStyleModelElement;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.creation.StringEditionFactory;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+public class CSSModelElement extends CustomStyleModelElement {
+
+ public CSSModelElement(View source, DataContextElement context) {
+ super(source, context);
+ }
+
+ public CSSModelElement(View source, EditingDomain domain, DataContextElement element) {
+ super(source, domain, element);
+ }
+
+ @Override
+ public ReferenceValueFactory getValueFactory(String propertyPath) {
+ if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
+ return new StyleSheetFactory((View) this.source);
+ }
+ if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
+ return new StyleSheetFactory((View) this.source);
+ }
+ if (CSSStyles.CSS_GMF_CLASS_KEY.equals(propertyPath)) {
+ StringEditionFactory factory = new StringEditionFactory();
+ factory.setContentProvider(getContentProvider(propertyPath));
+ return factory;
+ }
+ return super.getValueFactory(propertyPath);
+ }
+
+ @Override
+ public IObservable doGetObservable(String propertyPath) {
+ if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
+ if (source instanceof View) {
+ return new DiagramStyleSheetObservableList((View) source, domain, propertyPath);
+ }
+ }
+ if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
+ // Get the resource
+ final Resource notationResource = source.eResource();
+ if (notationResource == null) { // May happen e.g. during deletion of the diagram
+ return null;
+ }
+ // Get the model styleSheet Object
+ Object modelStyleSheetObject = EcoreUtil.getObjectByType(notationResource.getContents(), StylesheetsPackage.Literals.MODEL_STYLE_SHEETS);
+ // The model styleSheet
+ final ModelStyleSheets modelStyleSheetsSource = modelStyleSheetObject instanceof ModelStyleSheets ? (ModelStyleSheets) modelStyleSheetObject : StylesheetsFactory.eINSTANCE.createModelStyleSheets();
+ // If the modelStylesheet doesn't exist
+
+ return new ModelStyleSheetObservableList(notationResource, modelStyleSheetsSource.getStylesheets(), (TransactionalEditingDomain) domain, modelStyleSheetsSource, StylesheetsPackage.Literals.MODEL_STYLE_SHEETS__STYLESHEETS);
+ }
+ return super.doGetObservable(propertyPath);
+ }
+
+ @Override
+ public ILabelProvider getLabelProvider(String propertyPath) {
+ if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
+ return new CSSStyleSheetLabelProvider();
+ }
+ if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
+ return new CSSStyleSheetLabelProvider();
+ }
+ return super.getLabelProvider(propertyPath);
+ }
+
+ @Override
+ public IStaticContentProvider getContentProvider(String propertyPath) {
+ if (propertyPath.equals(CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY)) {
+ return new CSSStyleSheetContentProvider(source);
+ }
+ if (propertyPath.equals(CSSStyles.CSS_MODEL_STYLESHEETS_KEY)) {
+ return new CSSStyleSheetContentProvider(source);
+ }
+ if (propertyPath.equals(CSSStyles.CSS_GMF_CLASS_KEY)) {
+ Diagram diagram = ((View) source).getDiagram();
+ if (diagram instanceof CSSDiagram) {
+ EObject semanticElement = ((View) source).getElement();
+ if (semanticElement != null) {
+ // TODO: For Diagrams, we should use the right DiagramKind (See GMFElementAdapter)
+ // Until then, we list all available classes (*)
+ String elementName = source instanceof Diagram ? "*" : semanticElement.eClass().getName();
+ return new CSSClassContentProvider(elementName, ((CSSDiagram) diagram).getEngine());
+ }
+ }
+ return null;
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isUnique(String propertyPath) {
+ if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
+ return true;
+ }
+ if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
+ return true;
+ }
+ return super.isUnique(propertyPath);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElementFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElementFactory.java
index b0b432daa46..21add7b604b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElementFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElementFactory.java
@@ -1,45 +1,45 @@
-/*****************************************************************************
- * 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.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator;
-import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.CustomStyleModelElement;
-import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.CustomStyleModelElementFactory;
-import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-
-
-public class CSSModelElementFactory extends CustomStyleModelElementFactory {
-
- @Override
- protected CustomStyleModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
- View view = NotationHelper.findView(sourceElement);
- if (view == null) {
- Activator.log.warn("The selected element cannot be resolved to a GMF View");
- return null;
- }
-
- EditingDomain domain = EMFHelper.resolveEditingDomain(view);
-
- if (domain == null) {
- return new CSSModelElement(view, context);
- } else {
- return new CSSModelElement(view, domain, 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.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.CustomStyleModelElement;
+import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.CustomStyleModelElementFactory;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+
+
+public class CSSModelElementFactory extends CustomStyleModelElementFactory {
+
+ @Override
+ protected CustomStyleModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
+ View view = NotationHelper.findView(sourceElement);
+ if (view == null) {
+ Activator.log.warn("The selected element cannot be resolved to a GMF View");
+ return null;
+ }
+
+ EditingDomain domain = EMFHelper.resolveEditingDomain(view);
+
+ if (domain == null) {
+ return new CSSModelElement(view, context);
+ } else {
+ return new CSSModelElement(view, domain, context);
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java
index 6ec9d987cc0..67e8cacf2f5 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetContentProvider.java
@@ -1,86 +1,86 @@
-/*****************************************************************************
- * 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.provider;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-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.ui.emf.providers.EMFContentProvider;
-import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
-
-
-public class CSSStyleSheetContentProvider extends EMFContentProvider {
-
- private EObject context;
-
- public CSSStyleSheetContentProvider(EObject sourceEObject) {
- super(sourceEObject, StylesheetsPackage.eINSTANCE.getModelStyleSheets_Stylesheets());
- this.context = sourceEObject;
- }
-
- /**
- * Returns the content provider associated to feature being edited
- *
- * @param editedEObject
- * The object being edited
- * @param feature
- * The object's feature being edited
- * @return
- * A content provider returning all the values valid for the given feature
- */
- @Override
- protected IStructuredContentProvider getSemanticProvider(EObject editedEObject, EStructuralFeature feature) {
-
- return new AbstractStaticContentProvider() {
-
- public Object[] getElements() {
- List<Object> result = new LinkedList<Object>();
- if (context == null || context.eResource() == null) {
- return new Object[0];
- }
- Resource contextResource = context.eResource();
- List<Resource> resources;
- if (contextResource.getResourceSet() == null) {
- resources = Collections.singletonList(contextResource);
- } else {
- resources = new ArrayList<Resource>(contextResource.getResourceSet().getResources());
- }
-
- for (Resource resource : resources) {
- for (Object object : resource.getContents()) {
- if (object instanceof ModelStyleSheets) {
- ModelStyleSheets styleSheets = (ModelStyleSheets) object;
- for (StyleSheet styleSheet : styleSheets.getStylesheets()) {
- result.add(styleSheet);
- }
- } else {
- if (object instanceof StyleSheet) {
- result.add(object);
- }
- }
- }
- }
- return result.toArray();
- }
- };
- }
-
-}
+/*****************************************************************************
+ * 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.provider;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+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.ui.emf.providers.EMFContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
+
+
+public class CSSStyleSheetContentProvider extends EMFContentProvider {
+
+ private EObject context;
+
+ public CSSStyleSheetContentProvider(EObject sourceEObject) {
+ super(sourceEObject, StylesheetsPackage.eINSTANCE.getModelStyleSheets_Stylesheets());
+ this.context = sourceEObject;
+ }
+
+ /**
+ * Returns the content provider associated to feature being edited
+ *
+ * @param editedEObject
+ * The object being edited
+ * @param feature
+ * The object's feature being edited
+ * @return
+ * A content provider returning all the values valid for the given feature
+ */
+ @Override
+ protected IStructuredContentProvider getSemanticProvider(EObject editedEObject, EStructuralFeature feature) {
+
+ return new AbstractStaticContentProvider() {
+
+ public Object[] getElements() {
+ List<Object> result = new LinkedList<Object>();
+ if (context == null || context.eResource() == null) {
+ return new Object[0];
+ }
+ Resource contextResource = context.eResource();
+ List<Resource> resources;
+ if (contextResource.getResourceSet() == null) {
+ resources = Collections.singletonList(contextResource);
+ } else {
+ resources = new ArrayList<Resource>(contextResource.getResourceSet().getResources());
+ }
+
+ for (Resource resource : resources) {
+ for (Object object : resource.getContents()) {
+ if (object instanceof ModelStyleSheets) {
+ ModelStyleSheets styleSheets = (ModelStyleSheets) object;
+ for (StyleSheet styleSheet : styleSheets.getStylesheets()) {
+ result.add(styleSheet);
+ }
+ } else {
+ if (object instanceof StyleSheet) {
+ result.add(object);
+ }
+ }
+ }
+ }
+ return result.toArray();
+ }
+ };
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java
index d32fe961370..ba69721e207 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/provider/CSSStyleSheetLabelProvider.java
@@ -1,34 +1,34 @@
-/*****************************************************************************
- * 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.provider;
-
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
-
-
-public class CSSStyleSheetLabelProvider extends EMFLabelProvider {
-
- @Override
- public String getText(Object element) {
- if (element instanceof StyleSheetReference) {
- return ((StyleSheetReference) element).getPath();
- } else if (element instanceof EmbeddedStyleSheet) {
- EmbeddedStyleSheet styleSheet = (EmbeddedStyleSheet) element;
- if (styleSheet.getLabel() == null || "".equals(styleSheet.getLabel())) {
- return "EmbeddedStyleSheet";
- }
- return styleSheet.getLabel();
- }
- return super.getText(element);
- }
-}
+/*****************************************************************************
+ * 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.provider;
+
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider;
+
+
+public class CSSStyleSheetLabelProvider extends EMFLabelProvider {
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof StyleSheetReference) {
+ return ((StyleSheetReference) element).getPath();
+ } else if (element instanceof EmbeddedStyleSheet) {
+ EmbeddedStyleSheet styleSheet = (EmbeddedStyleSheet) element;
+ if (styleSheet.getLabel() == null || "".equals(styleSheet.getLabel())) {
+ return "EmbeddedStyleSheet";
+ }
+ return styleSheet.getLabel();
+ }
+ return super.getText(element);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/META-INF/MANIFEST.MF
index 150597af75e..d5851eef9fb 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.1.0,3.0.0)"
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: Papyrus Theme
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.theme;singleton:=true
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.1.0,3.0.0)"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: Papyrus Theme
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.theme;singleton:=true
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/about.html b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/about.html
index 209103075a7..dd3c089a94c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/about.html
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>November 14, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/build.properties b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/build.properties
index c9a45b0f12d..f5ef57ba3b9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/build.properties
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/build.properties
@@ -1,6 +1,6 @@
-bin.includes = META-INF/,\
- plugin.xml,\
- icons/,\
- theme/,\
- about.html
-src.includes = about.html
+bin.includes = META-INF/,\
+ plugin.xml,\
+ icons/,\
+ theme/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css
index a70e1c2c1d0..c0be6083596 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css
@@ -1,188 +1,188 @@
-/*****************************************************************************
- * 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
- *****************************************************************************/
-
-/*
- * Papyrus CSS v0.9
- */
-
-* {
-
- /**
- * GMF Display
- */
-
- fillColor:#C3D1D5;
-
- /* fontHeight:9; */
-
- /**
- * Gradient
- */
-
- /* gradientColor:white; */
- /* gradientStyle:vertical; */
-
- /*
- * Global gradient (Equivalent to the latter)
- */
-
- gradient: white vertical; /* vertical white; is currently invalid */
-
- /*
- * Global gradient (2)
- * Unsupported by diagrams (Color2 is unused)
- */
-
- /* gradient:white blue vertical */
-
- /**
- * UML Display
- */
-
- elementIcon: true;
- /* shadow:false; */
- /* qualifiedNameDepth:Full; */
-
- /**
- * UML Stereotypes display
- */
-
- /* stereotypeDisplay:"Text and Icon"; */
- /* textAlignment:Vertical; */
- /* displayPlace:"With brace"; */
-}
-
-Class {
- fillColor: #C3D7DD;
-}
-
-Comment {
- fillColor: #FFFFCC;
-}
-
-Constraint {
- fillColor: #C8FFE6;
-}
-
-Package {
- fillColor: white;
-}
-
-Operation[isAbstract=true] {
- italic:true;
-}
-
-/** This is the Diagram's root element. It doesn't support
-gradient and should have the same color as the diagram */
-SequenceDiagram > Interaction {
- fillColor:white;
-}
-
-SequenceDiagram CombinedFragment,ConsiderIgnoreFragment,
-SequenceDiagram CombinedFragment,ConsiderIgnoreFragment * {
- fillColor:white;
-}
-
-TimingDiagram OccurrenceSpecification,MessageOccurrenceSpecification {
- fillColor: #006000;
- lineColor: #006000;
-}
-
-TimingDiagram Lifeline {
- gradient: white vertical;
- fontHeight: 12;
-}
-
-TimingDiagram StateInvariant {
- lineColor: black;
- fillColor: #9BC7CC;
- gradient: white vertical;
-}
-
-TimingDiagram Interaction {
- fillColor: #9BC7CC;
- gradient: none;
-}
-
-TimingDiagram Gate {
- fillColor: #2A52BE;
- lineColor: #2A52BE;
-}
-
-ParametricDiagram [appliedStereotypes~=ConstraintProperty] Property,
-ParametricDiagram [appliedStereotypes~=ConstraintProperty] {
- elementIcon:false;
-}
-
-Label {
- elementIcon: false;
-}
-
-ActivityDiagram Activity *,InteractionOverviewDiagram Activity * {
- elementIcon:false;
-}
-
-/* no gradiant for symbol to permit to change color */
-ActivityDiagram MergeNode,
-ActivityDiagram ActivityFinalNode,
-ActivityDiagram FlowFinalNode,
-ActivityDiagram DecisionNode,
-ActivityDiagram SendSignalAction,
-ActivityDiagram AcceptEventAction,
-InteractionOverviewDiagram MergeNode,
-InteractionOverviewDiagram ActivityFinalNode,
-InteractionOverviewDiagram FlowFinalNode,
-InteractionOverviewDiagram DecisionNode
-{
- gradient:none;
- fillColor:white;
-}
-
-ActivityDiagram InitialNode,
-InteractionOverviewDiagram InitialNode{
- gradient:none;
- fillColor:black;
-}
-
-ClassDiagram Dependency{
- fillColor:Black;
- gradient:none;
-}
-
-/*
- * The Actor element icon is not useful either
- */
-UseCaseDiagram Actor {
- elementIcon:false;
-}
-
-TimingDiagram * {
- gradient:none;
-}
-
-UseCaseDiagram UseCase {
- fillColor:white;
-}
-
-StateMachineDiagram Pseudostate[kind="exitPoint"],
-StateMachineDiagram Pseudostate[kind="entryPoint"]
-{
- fillColor:white;
-}
-
-StateMachineDiagram Pseudostate[kind="initial"],
-StateMachineDiagram Pseudostate[kind="junction"]
-{
- gradient:none;
- fillColor:black;
-}
-
+/*****************************************************************************
+ * 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
+ *****************************************************************************/
+
+/*
+ * Papyrus CSS v0.9
+ */
+
+* {
+
+ /**
+ * GMF Display
+ */
+
+ fillColor:#C3D1D5;
+
+ /* fontHeight:9; */
+
+ /**
+ * Gradient
+ */
+
+ /* gradientColor:white; */
+ /* gradientStyle:vertical; */
+
+ /*
+ * Global gradient (Equivalent to the latter)
+ */
+
+ gradient: white vertical; /* vertical white; is currently invalid */
+
+ /*
+ * Global gradient (2)
+ * Unsupported by diagrams (Color2 is unused)
+ */
+
+ /* gradient:white blue vertical */
+
+ /**
+ * UML Display
+ */
+
+ elementIcon: true;
+ /* shadow:false; */
+ /* qualifiedNameDepth:Full; */
+
+ /**
+ * UML Stereotypes display
+ */
+
+ /* stereotypeDisplay:"Text and Icon"; */
+ /* textAlignment:Vertical; */
+ /* displayPlace:"With brace"; */
+}
+
+Class {
+ fillColor: #C3D7DD;
+}
+
+Comment {
+ fillColor: #FFFFCC;
+}
+
+Constraint {
+ fillColor: #C8FFE6;
+}
+
+Package {
+ fillColor: white;
+}
+
+Operation[isAbstract=true] {
+ italic:true;
+}
+
+/** This is the Diagram's root element. It doesn't support
+gradient and should have the same color as the diagram */
+SequenceDiagram > Interaction {
+ fillColor:white;
+}
+
+SequenceDiagram CombinedFragment,ConsiderIgnoreFragment,
+SequenceDiagram CombinedFragment,ConsiderIgnoreFragment * {
+ fillColor:white;
+}
+
+TimingDiagram OccurrenceSpecification,MessageOccurrenceSpecification {
+ fillColor: #006000;
+ lineColor: #006000;
+}
+
+TimingDiagram Lifeline {
+ gradient: white vertical;
+ fontHeight: 12;
+}
+
+TimingDiagram StateInvariant {
+ lineColor: black;
+ fillColor: #9BC7CC;
+ gradient: white vertical;
+}
+
+TimingDiagram Interaction {
+ fillColor: #9BC7CC;
+ gradient: none;
+}
+
+TimingDiagram Gate {
+ fillColor: #2A52BE;
+ lineColor: #2A52BE;
+}
+
+ParametricDiagram [appliedStereotypes~=ConstraintProperty] Property,
+ParametricDiagram [appliedStereotypes~=ConstraintProperty] {
+ elementIcon:false;
+}
+
+Label {
+ elementIcon: false;
+}
+
+ActivityDiagram Activity *,InteractionOverviewDiagram Activity * {
+ elementIcon:false;
+}
+
+/* no gradiant for symbol to permit to change color */
+ActivityDiagram MergeNode,
+ActivityDiagram ActivityFinalNode,
+ActivityDiagram FlowFinalNode,
+ActivityDiagram DecisionNode,
+ActivityDiagram SendSignalAction,
+ActivityDiagram AcceptEventAction,
+InteractionOverviewDiagram MergeNode,
+InteractionOverviewDiagram ActivityFinalNode,
+InteractionOverviewDiagram FlowFinalNode,
+InteractionOverviewDiagram DecisionNode
+{
+ gradient:none;
+ fillColor:white;
+}
+
+ActivityDiagram InitialNode,
+InteractionOverviewDiagram InitialNode{
+ gradient:none;
+ fillColor:black;
+}
+
+ClassDiagram Dependency{
+ fillColor:Black;
+ gradient:none;
+}
+
+/*
+ * The Actor element icon is not useful either
+ */
+UseCaseDiagram Actor {
+ elementIcon:false;
+}
+
+TimingDiagram * {
+ gradient:none;
+}
+
+UseCaseDiagram UseCase {
+ fillColor:white;
+}
+
+StateMachineDiagram Pseudostate[kind="exitPoint"],
+StateMachineDiagram Pseudostate[kind="entryPoint"]
+{
+ fillColor:white;
+}
+
+StateMachineDiagram Pseudostate[kind="initial"],
+StateMachineDiagram Pseudostate[kind="junction"]
+{
+ gradient:none;
+ fillColor:black;
+}
+
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/about.html b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/about.html
index 209103075a7..dd3c089a94c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/about.html
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>November 14, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/build.properties b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/build.properties
index 739424b7358..a38d917d5b7 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/build.properties
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/build.properties
@@ -1,11 +1,11 @@
-source.. = src/,src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.xml,\
- plugin.properties,\
- resources/,\
- schema/,\
- icons/
-src.includes = about.html
+source.. = src/,src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties,\
+ resources/,\
+ schema/,\
+ icons/
+src.includes = about.html
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/plugin.properties b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/plugin.properties
index 631f999e437..a5238f29374 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/plugin.properties
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/plugin.properties
@@ -1,3 +1,3 @@
-#Properties file for org.eclipse.papyrus.infra.gmfdiag.css
-pluginName = CSS Support for GMF
-providerName = Eclipse Modeling Project
+#Properties file for org.eclipse.papyrus.infra.gmfdiag.css
+pluginName = CSS Support for GMF
+providerName = Eclipse Modeling Project
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 8e80d150e0a..0faaee1c716 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
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <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>
- <version>2.2.1-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <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>
+ <version>2.2.1-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/domElementAdapter.exsd b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/domElementAdapter.exsd
index b4d5e973c71..e029839762d 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/domElementAdapter.exsd
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/domElementAdapter.exsd
@@ -1,109 +1,109 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="domElementAdapter" name="domElementAdapter"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="factory" minOccurs="1" 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="factory">
- <complexType>
- <attribute name="order" type="string" use="default" value="50">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="factory" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.css.engine.ICSSElementProviderFactory"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="domElementAdapter" name="domElementAdapter"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="factory" minOccurs="1" 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="factory">
+ <complexType>
+ <attribute name="order" type="string" use="default" value="50">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="factory" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.css.engine.ICSSElementProviderFactory"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/markertopseudoselectormappingprovider.exsd b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/markertopseudoselectormappingprovider.exsd
index 97e34d027a8..7a9ea2b16d5 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/markertopseudoselectormappingprovider.exsd
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/markertopseudoselectormappingprovider.exsd
@@ -1,125 +1,125 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="markertopseudoselectormappingprovider" name="MarkerToPseudoSelectorMappingProvider"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
-<element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- <documentation>
- [Enter description]
- </documentation>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="provider"/>
- </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="provider">
- <complexType>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.css.service.IMarkerToPseudoSelectorMappingProvider"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter documentation]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- /*****************************************************************************
- * 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
- </documentation>
- </annotation>
-
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="markertopseudoselectormappingprovider" name="MarkerToPseudoSelectorMappingProvider"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+<element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ <documentation>
+ [Enter description]
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="provider"/>
+ </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="provider">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.css.service.IMarkerToPseudoSelectorMappingProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter documentation]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ /*****************************************************************************
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+ </documentation>
+ </annotation>
+
</schema> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/theme.exsd b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/theme.exsd
index 107b8280d21..44182894b58 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/theme.exsd
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/theme.exsd
@@ -1,152 +1,152 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="theme" name="CSS Theme"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <choice>
- <sequence>
- <element ref="themeContribution" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <element ref="themeDefinition" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <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="themeContribution">
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="stylesheet"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.papyrus.infra.gmfdiag.css.theme/themeDefinition/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="stylesheet">
- <complexType>
- <attribute name="stylesheetPath" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="themeDefinition">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="theme" name="CSS Theme"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice>
+ <sequence>
+ <element ref="themeContribution" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <element ref="themeDefinition" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <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="themeContribution">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="stylesheet"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.papyrus.infra.gmfdiag.css.theme/themeDefinition/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="stylesheet">
+ <complexType>
+ <attribute name="stylesheetPath" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="themeDefinition">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/userAgentStyleSheet.exsd b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/userAgentStyleSheet.exsd
index 71680da8957..5cb5a248f87 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/userAgentStyleSheet.exsd
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/schema/userAgentStyleSheet.exsd
@@ -1,102 +1,102 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="userAgentStyleSheet" name="user Agent Style Sheet"/>
- </appinfo>
- <documentation>
- this extension point permits to define CSS to the USER_AGENT cascade scope.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="stylesheet" minOccurs="1" 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="stylesheet">
- <complexType>
- <attribute name="stylesheetPath" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- see org.eclipse.papyrus.uml.diagram.css
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.css" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.css" id="userAgentStyleSheet" name="user Agent Style Sheet"/>
+ </appinfo>
+ <documentation>
+ this extension point permits to define CSS to the USER_AGENT cascade scope.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="stylesheet" minOccurs="1" 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="stylesheet">
+ <complexType>
+ <attribute name="stylesheetPath" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ see org.eclipse.papyrus.uml.diagram.css
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSDecorationNodeImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSDecorationNodeImpl.java
index 5aa5e95da79..dd831083e1d 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSDecorationNodeImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSDecorationNodeImpl.java
@@ -1,169 +1,169 @@
-/*****************************************************************************
- * Copyright (c) 2014, 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:
- * CEA LIST - Initial API and implementation
- * Christian W. Damus - bugs 433206, 436665
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.impl.DecorationNodeImpl;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
-
-
-public class CSSDecorationNodeImpl extends DecorationNodeImpl implements CustomStyle, CSSView.Internal {
-
- protected ExtendedCSSEngine engine;
-
- private CSSView cssView;
-
- private CustomStyle customStyle;
-
- protected ExtendedCSSEngine getEngine() {
- if (engine == null) {
- engine = ((CSSDiagramImpl) getDiagram()).getEngine();
- }
- return engine;
- }
-
- protected CustomStyle getCustomStyle() {
- if (customStyle == null) {
- customStyle = new CSSCustomStyleDelegate(this, getEngine());
- }
- return customStyle;
- }
-
- protected CSSView getCSSView() {
- if (cssView == null) {
- cssView = new CSSViewDelegate(this, getEngine());
- }
- return cssView;
- }
-
- @Override
- public void resetCSS() {
- cssView = null;
- engine = null;
- }
-
-
- // ////////////////////////////////////////
- // Forwards accesses to CSS properties //
- // ////////////////////////////////////////
-
- @Override
- public boolean isVisible() {
- return isCSSVisible();
- }
-
- @Override
- public boolean isCSSVisible() {
- boolean value = super.isVisible();
-
- if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
- return value;
- } else {
- return getCSSView().isCSSVisible();
- }
- }
-
-
- // //////////////////////////////////////////////
- // Implements a setter for each CSS property //
- // //////////////////////////////////////////////
-
- @Override
- public void setVisible(boolean value) {
- super.setVisible(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
- ForceValueHelper.setValue(this, feature, value);
- }
-
-
- // ////////////////////////////////
- // Implements the unset method //
- // ////////////////////////////////
-
- @Override
- public void eUnset(int featureId) {
- super.eUnset(featureId);
-
- EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
- ForceValueHelper.unsetValue(this, feature);
- }
-
- // /////////////////////////////////
- // Implements the custom styles //
- // /////////////////////////////////
-
- @Override
- public boolean showElementIcon() {
- return getCustomStyle().showElementIcon();
- }
-
- @Override
- public int getQualifiedNameDepth() {
- return getCustomStyle().getQualifiedNameDepth();
- }
-
- @Override
- public boolean showShadow() {
- return getCustomStyle().showShadow();
- }
-
- // ////////////////////////////////
- // Implements the getNamedStyle //
- // ////////////////////////////////
-
- @Override
- public NamedStyle getNamedStyle(EClass eClass, String name) {
- return getCSSNamedStyle(eClass, name);
- }
-
- @Override
- public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
- NamedStyle userStyle = super.getNamedStyle(eClass, name);
- if (userStyle != null) {
- return userStyle;
- }
-
- return getCSSView().getCSSNamedStyle(eClass, name);
- }
-
- // /////////////////////////////////
- // Implements the getStyle method //
- // /////////////////////////////////
-
- @Override
- public Style getStyle(EClass eClass) {
- return getCSSStyle(eClass);
- }
-
- @Override
- public Style getCSSStyle(EClass eClass) {
- Style userStyle = super.getStyle(eClass);
- if (userStyle != null) {
- return userStyle;
- }
-
- return getCSSView().getCSSStyle(eClass);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014, 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:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+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.impl.DecorationNodeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+
+public class CSSDecorationNodeImpl extends DecorationNodeImpl implements CustomStyle, CSSView.Internal {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSEdgeImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSEdgeImpl.java
index 741c32ace7e..14a4845cfc1 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSEdgeImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSEdgeImpl.java
@@ -1,177 +1,177 @@
-/*****************************************************************************
- * 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 - bugs 433206, 436665
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.impl.EdgeImpl;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
-
-public class CSSEdgeImpl extends EdgeImpl implements CSSView.Internal, CustomStyle {
-
- protected ExtendedCSSEngine engine;
-
- private CSSView cssView;
-
- private CustomStyle customStyle;
-
- protected ExtendedCSSEngine getEngine() {
- if (engine == null) {
- engine = ((CSSDiagramImpl) getDiagram()).getEngine();
- }
- return engine;
- }
-
- protected CSSView getCSSView() {
- if (cssView == null) {
- cssView = new CSSViewDelegate(this, getEngine());
- }
- return cssView;
- }
-
- @Override
- public void resetCSS() {
- cssView = null;
- engine = null;
- }
-
- protected CustomStyle getCustomStyle() {
- if (customStyle == null) {
- customStyle = new CSSCustomStyleDelegate(this, getEngine());
- }
- return customStyle;
- }
-
- @Override
- public boolean isVisible() {
- return isCSSVisible();
- }
-
- @Override
- public boolean isCSSVisible() {
- boolean value = super.isVisible();
-
- if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
- return value;
- } else {
- return getCSSView().isCSSVisible();
- }
- }
-
- // //////////////////////////////////////////////
- // Implements a setter for each CSS property //
- // //////////////////////////////////////////////
-
- @Override
- public void setVisible(boolean value) {
- super.setVisible(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
- ForceValueHelper.setValue(this, feature, value);
- }
-
- @Override
- public void setType(java.lang.String value) {
- super.setType(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
- ForceValueHelper.setValue(this, feature, value);
- }
-
- @Override
- public void setMutable(boolean value) {
- super.setMutable(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
- ForceValueHelper.setValue(this, feature, value);
- }
-
- // ////////////////////////////////
- // Implements the unset method //
- // ////////////////////////////////
-
- @Override
- public void eUnset(int featureId) {
- super.eUnset(featureId);
-
- EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
- ForceValueHelper.unsetValue(this, feature);
- }
-
- // ////////////////////////////////
- // Implements the getNamedStyle //
- // ////////////////////////////////
-
- @Override
- public NamedStyle getNamedStyle(EClass eClass, String name) {
- return getCSSNamedStyle(eClass, name);
- }
-
- @Override
- public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
- NamedStyle userStyle = super.getNamedStyle(eClass, name);
- if (userStyle != null) {
- return userStyle;
- }
-
- return getCSSView().getCSSNamedStyle(eClass, name);
- }
-
- // /////////////////////////////////
- // Implements the custom styles //
- // /////////////////////////////////
-
- @Override
- public boolean showElementIcon() {
- return getCustomStyle().showElementIcon();
- }
-
- @Override
- public int getQualifiedNameDepth() {
- return getCustomStyle().getQualifiedNameDepth();
- }
-
- @Override
- public boolean showShadow() {
- return getCustomStyle().showShadow();
- }
-
- // /////////////////////////////////
- // Implements the getStyle method //
- // /////////////////////////////////
-
- @Override
- public Style getStyle(EClass eClass) {
- return getCSSStyle(eClass);
- }
-
- @Override
- public Style getCSSStyle(EClass eClass) {
- Style userStyle = super.getStyle(eClass);
- if (userStyle != null) {
- return userStyle;
- }
-
- return getCSSView().getCSSStyle(eClass);
- }
-
-}
+/*****************************************************************************
+ * 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 - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+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.impl.EdgeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSEdgeImpl extends EdgeImpl implements CSSView.Internal, CustomStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSNodeImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSNodeImpl.java
index 0a48060cd0f..68bbac909ba 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSNodeImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSNodeImpl.java
@@ -1,177 +1,177 @@
-/*****************************************************************************
- * 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 - bugs 433206, 436665
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.impl.NodeImpl;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
-import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
-
-public class CSSNodeImpl extends NodeImpl implements CSSView.Internal, CustomStyle {
-
- protected ExtendedCSSEngine engine;
-
- private CSSView cssView;
-
- private CustomStyle customStyle;
-
- protected ExtendedCSSEngine getEngine() {
- if (engine == null) {
- engine = ((CSSDiagramImpl) getDiagram()).getEngine();
- }
- return engine;
- }
-
- protected CSSView getCSSView() {
- if (cssView == null) {
- cssView = new CSSViewDelegate(this, getEngine());
- }
- return cssView;
- }
-
- @Override
- public void resetCSS() {
- cssView = null;
- engine = null;
- }
-
- protected CustomStyle getCustomStyle() {
- if (customStyle == null) {
- customStyle = new CSSCustomStyleDelegate(this, getEngine());
- }
- return customStyle;
- }
-
- @Override
- public boolean isVisible() {
- return isCSSVisible();
- }
-
- @Override
- public boolean isCSSVisible() {
- boolean value = super.isVisible();
-
- if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
- return value;
- } else {
- return getCSSView().isCSSVisible();
- }
- }
-
- // //////////////////////////////////////////////
- // Implements a setter for each CSS property //
- // //////////////////////////////////////////////
-
- @Override
- public void setVisible(boolean value) {
- super.setVisible(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
- ForceValueHelper.setValue(this, feature, value);
- }
-
- @Override
- public void setType(java.lang.String value) {
- super.setType(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
- ForceValueHelper.setValue(this, feature, value);
- }
-
- @Override
- public void setMutable(boolean value) {
- super.setMutable(value);
-
- EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
- ForceValueHelper.setValue(this, feature, value);
- }
-
- // ////////////////////////////////
- // Implements the unset method //
- // ////////////////////////////////
-
- @Override
- public void eUnset(int featureId) {
- super.eUnset(featureId);
-
- EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
- ForceValueHelper.unsetValue(this, feature);
- }
-
- // ////////////////////////////////
- // Implements the getNamedStyle //
- // ////////////////////////////////
-
- @Override
- public NamedStyle getNamedStyle(EClass eClass, String name) {
- return getCSSNamedStyle(eClass, name);
- }
-
- @Override
- public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
- NamedStyle userStyle = super.getNamedStyle(eClass, name);
- if (userStyle != null) {
- return userStyle;
- }
-
- return getCSSView().getCSSNamedStyle(eClass, name);
- }
-
- // /////////////////////////////////
- // Implements the custom styles //
- // /////////////////////////////////
-
- @Override
- public boolean showElementIcon() {
- return getCustomStyle().showElementIcon();
- }
-
- @Override
- public int getQualifiedNameDepth() {
- return getCustomStyle().getQualifiedNameDepth();
- }
-
- @Override
- public boolean showShadow() {
- return getCustomStyle().showShadow();
- }
-
- // /////////////////////////////////
- // Implements the getStyle method //
- // /////////////////////////////////
-
- @Override
- public Style getStyle(EClass eClass) {
- return getCSSStyle(eClass);
- }
-
- @Override
- public Style getCSSStyle(EClass eClass) {
- Style userStyle = super.getStyle(eClass);
- if (userStyle != null) {
- return userStyle;
- }
-
- return getCSSView().getCSSStyle(eClass);
- }
-
-}
+/*****************************************************************************
+ * 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 - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+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.impl.NodeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSNodeImpl extends NodeImpl implements CSSView.Internal, CustomStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/CSSView.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/CSSView.java
index 5de889423cf..5006e0a981d 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/CSSView.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/CSSView.java
@@ -1,74 +1,74 @@
-/*****************************************************************************
- * 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
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- * Christian W. Damus - bugs 433206, 436665
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.style;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.Style;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public interface CSSView {
-
- /**
- * CSS Implementation of the isVisible() method
- *
- * @return
- *
- * @see View#isVisible()
- */
- public boolean isCSSVisible();
-
- /**
- * CSS Implementation of the getNamedStyle() method
- *
- * @param eClass
- * @param name
- * @return
- *
- * @see View#getNamedStyle(EClass, String)
- */
- public NamedStyle getCSSNamedStyle(EClass eClass, String name);
-
- /**
- * CSS implementation of the {@link View#getStyle(EClass)} API.
- *
- * @param eClass
- * the style kind to get
- * @return the (possibly implicitly defined) CSS implementation of the style
- *
- * @see View#getStyle(EClass)
- */
- public Style getCSSStyle(EClass eClass);
-
- //
- // Nested types
- //
-
- /**
- * Private interface for management of CSS lifecycle and other
- * internal concerns
- *
- * @since 1.2
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noreference This method is not intended to be referenced by clients.
- */
- interface Internal extends CSSView {
- /**
- * Resets my association with the CSS engine and any local caches
- * thereof that I may have.
- */
- void resetCSS();
- }
-}
+/*****************************************************************************
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.style;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.gmf.runtime.notation.View;
+
+
+public interface CSSView {
+
+ /**
+ * CSS Implementation of the isVisible() method
+ *
+ * @return
+ *
+ * @see View#isVisible()
+ */
+ public boolean isCSSVisible();
+
+ /**
+ * CSS Implementation of the getNamedStyle() method
+ *
+ * @param eClass
+ * @param name
+ * @return
+ *
+ * @see View#getNamedStyle(EClass, String)
+ */
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name);
+
+ /**
+ * CSS implementation of the {@link View#getStyle(EClass)} API.
+ *
+ * @param eClass
+ * the style kind to get
+ * @return the (possibly implicitly defined) CSS implementation of the style
+ *
+ * @see View#getStyle(EClass)
+ */
+ public Style getCSSStyle(EClass eClass);
+
+ //
+ // Nested types
+ //
+
+ /**
+ * Private interface for management of CSS lifecycle and other
+ * internal concerns
+ *
+ * @since 1.2
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noreference This method is not intended to be referenced by clients.
+ */
+ interface Internal extends CSSView {
+ /**
+ * Resets my association with the CSS engine and any local caches
+ * thereof that I may have.
+ */
+ void resetCSS();
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageBufferStyleDelegate.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageBufferStyleDelegate.java
index fa2dfeaf9d3..bdf3375d75f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageBufferStyleDelegate.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageBufferStyleDelegate.java
@@ -1,56 +1,56 @@
-/*****************************************************************************
- * 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.style.impl;
-
-import org.eclipse.gmf.runtime.notation.ImageBufferStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSImageBufferStyle;
-import org.w3c.dom.css.CSSValue;
-
-public class CSSImageBufferStyleDelegate implements CSSImageBufferStyle {
-
- private ImageBufferStyle imageBufferStyle;
-
- private ExtendedCSSEngine engine;
-
- public CSSImageBufferStyleDelegate(ImageBufferStyle imageBufferStyle, ExtendedCSSEngine engine) {
- this.imageBufferStyle = imageBufferStyle;
- this.engine = engine;
- }
-
- // //////////////////////////////////////////////
- // Implements a getter for each CSS property //
- // //////////////////////////////////////////////
-
- @Override
- public java.lang.Boolean getCSSAntiAlias() {
- CSSValue cssValue = engine.retrievePropertyValue(imageBufferStyle, "antiAlias");
- if (cssValue == null) {
- Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_AntiAlias().getDefaultValue();
- return (java.lang.Boolean) defaultValue;
- }
-
- return (Boolean) engine.convert(cssValue, Boolean.class, null);
- }
-
- @Override
- public java.lang.Boolean getCSSMaintainAspectRatio() {
- CSSValue cssValue = engine.retrievePropertyValue(imageBufferStyle, "maintainAspectRatio");
- if (cssValue == null) {
- Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio().getDefaultValue();
- return (java.lang.Boolean) defaultValue;
- }
-
- return (Boolean) engine.convert(cssValue, Boolean.class, null);
- }
-}
+/*****************************************************************************
+ * 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.style.impl;
+
+import org.eclipse.gmf.runtime.notation.ImageBufferStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSImageBufferStyle;
+import org.w3c.dom.css.CSSValue;
+
+public class CSSImageBufferStyleDelegate implements CSSImageBufferStyle {
+
+ private ImageBufferStyle imageBufferStyle;
+
+ private ExtendedCSSEngine engine;
+
+ public CSSImageBufferStyleDelegate(ImageBufferStyle imageBufferStyle, ExtendedCSSEngine engine) {
+ this.imageBufferStyle = imageBufferStyle;
+ this.engine = engine;
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a getter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public java.lang.Boolean getCSSAntiAlias() {
+ CSSValue cssValue = engine.retrievePropertyValue(imageBufferStyle, "antiAlias");
+ if (cssValue == null) {
+ Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_AntiAlias().getDefaultValue();
+ return (java.lang.Boolean) defaultValue;
+ }
+
+ return (Boolean) engine.convert(cssValue, Boolean.class, null);
+ }
+
+ @Override
+ public java.lang.Boolean getCSSMaintainAspectRatio() {
+ CSSValue cssValue = engine.retrievePropertyValue(imageBufferStyle, "maintainAspectRatio");
+ if (cssValue == null) {
+ Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio().getDefaultValue();
+ return (java.lang.Boolean) defaultValue;
+ }
+
+ return (Boolean) engine.convert(cssValue, Boolean.class, null);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageStyleDelegate.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageStyleDelegate.java
index 569de488320..36deb29ace3 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageStyleDelegate.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSImageStyleDelegate.java
@@ -1,54 +1,54 @@
-/*****************************************************************************
- * 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.style.impl;
-
-import org.eclipse.gmf.runtime.notation.ImageStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSImageStyle;
-import org.w3c.dom.css.CSSValue;
-
-public class CSSImageStyleDelegate implements CSSImageStyle {
-
- private ImageStyle imageStyle;
-
- private ExtendedCSSEngine engine;
-
- public CSSImageStyleDelegate(ImageStyle imageStyle, ExtendedCSSEngine engine) {
- this.imageStyle = imageStyle;
- this.engine = engine;
- }
-
- // //////////////////////////////////////////////
- // Implements a getter for each CSS property //
- // //////////////////////////////////////////////
-
- @Override
- public java.lang.Boolean getCSSAntiAlias() {
- CSSValue cssValue = engine.retrievePropertyValue(imageStyle, "antiAlias");
- if (cssValue == null) {
- Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_AntiAlias().getDefaultValue();
- return (java.lang.Boolean) defaultValue;
- }
- return (Boolean) engine.convert(cssValue, Boolean.class, null);
- }
-
- @Override
- public java.lang.Boolean getCSSMaintainAspectRatio() {
- CSSValue cssValue = engine.retrievePropertyValue(imageStyle, "maintainAspectRatio");
- if (cssValue == null) {
- Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio().getDefaultValue();
- return (java.lang.Boolean) defaultValue;
- }
- return (Boolean) engine.convert(cssValue, Boolean.class, null);
- }
-}
+/*****************************************************************************
+ * 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.style.impl;
+
+import org.eclipse.gmf.runtime.notation.ImageStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSImageStyle;
+import org.w3c.dom.css.CSSValue;
+
+public class CSSImageStyleDelegate implements CSSImageStyle {
+
+ private ImageStyle imageStyle;
+
+ private ExtendedCSSEngine engine;
+
+ public CSSImageStyleDelegate(ImageStyle imageStyle, ExtendedCSSEngine engine) {
+ this.imageStyle = imageStyle;
+ this.engine = engine;
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a getter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public java.lang.Boolean getCSSAntiAlias() {
+ CSSValue cssValue = engine.retrievePropertyValue(imageStyle, "antiAlias");
+ if (cssValue == null) {
+ Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_AntiAlias().getDefaultValue();
+ return (java.lang.Boolean) defaultValue;
+ }
+ return (Boolean) engine.convert(cssValue, Boolean.class, null);
+ }
+
+ @Override
+ public java.lang.Boolean getCSSMaintainAspectRatio() {
+ CSSValue cssValue = engine.retrievePropertyValue(imageStyle, "maintainAspectRatio");
+ if (cssValue == null) {
+ Object defaultValue = NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio().getDefaultValue();
+ return (java.lang.Boolean) defaultValue;
+ }
+ return (Boolean) engine.convert(cssValue, Boolean.class, null);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSViewDelegate.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSViewDelegate.java
index cab251a50a3..55b8d4e5a96 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSViewDelegate.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/style/impl/CSSViewDelegate.java
@@ -1,222 +1,222 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2015 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:
- * CEA LIST - Initial API and implementation
- * Christian W. Damus - bug 433206
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.style.impl;
-
-import java.util.Arrays;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
-import org.eclipse.gmf.runtime.notation.CanonicalStyle;
-import org.eclipse.gmf.runtime.notation.DoubleValueStyle;
-import org.eclipse.gmf.runtime.notation.IntValueStyle;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.StringListValueStyle;
-import org.eclipse.gmf.runtime.notation.StringValueStyle;
-import org.eclipse.gmf.runtime.notation.Style;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.Activator;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.helper.ParserHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
-import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
-import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
-import org.w3c.dom.css.CSSValue;
-
-public class CSSViewDelegate implements CSSView {
-
- private View view;
-
- private ExtendedCSSEngine engine;
-
- public CSSViewDelegate(View view, ExtendedCSSEngine engine) {
- this.view = view;
- this.engine = engine;
- }
-
- @Override
- public boolean isCSSVisible() {
- CSSValue cssValue = engine.retrievePropertyValue(view, "visible");
- if (cssValue == null) {
- Object defaultValue = NotationPackage.eINSTANCE.getView_Visible().getDefaultValue();
- return (Boolean) defaultValue;
- }
-
- return (Boolean) engine.convert(cssValue, Boolean.class, null);
- }
-
- private boolean lookupStyle = false;
-
- @Override
- public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
- if (!CSSNotationResource.isCSSEnabled(view.eResource())) {
- return null;
- }
-
- if (!NotationPackage.eINSTANCE.getNamedStyle().isSuperTypeOf(eClass)) {
- return null;
- }
-
- // /////////////////////////////////////////////
- // This method may call getNamedStyle() to retrieve the applied CSS Styles. Prevent overflow
- if (CSSStyles.RESERVED_KEYWORDS.contains(name)) {
- return null;
- }
-
- CSSValue cssValue;
- synchronized (this) {
- if (lookupStyle) {
- return null;
- }
-
- try {
- lookupStyle = true;
- cssValue = engine.retrievePropertyValue(view, name);
- if (cssValue == null) {
- return null;
- }
- } finally {
- lookupStyle = false;
- }
- }
- // /////////////////////////////////////////////
-
- try {
- switch (eClass.getClassifierID()) {
- case NotationPackage.BOOLEAN_VALUE_STYLE:
-
- Boolean booleanValue = (Boolean) engine.convert(cssValue, Boolean.class, null);
- BooleanValueStyle booleanStyle = NotationFactory.eINSTANCE.createBooleanValueStyle();
-
- booleanStyle.setBooleanValue(booleanValue);
- booleanStyle.setName(name);
-
- return booleanStyle;
-
- case NotationPackage.STRING_VALUE_STYLE:
-
- String stringValue = (String) engine.convert(cssValue, String.class, null);
- StringValueStyle stringStyle = NotationFactory.eINSTANCE.createStringValueStyle();
-
- stringStyle.setName(name);
- stringStyle.setStringValue(stringValue);
-
- return stringStyle;
-
- case NotationPackage.INT_VALUE_STYLE:
-
- Integer intValue = (Integer) engine.convert(cssValue, Integer.class, null);
- IntValueStyle intStyle = NotationFactory.eINSTANCE.createIntValueStyle();
-
- intStyle.setName(name);
- intStyle.setIntValue(intValue);
-
- return intStyle;
- case NotationPackage.DOUBLE_VALUE_STYLE:
-
- Double doubleValue = (Double) engine.convert(cssValue, Double.class, null);
- DoubleValueStyle doubleStyle = NotationFactory.eINSTANCE.createDoubleValueStyle();
-
- doubleStyle.setName(name);
- doubleStyle.setDoubleValue(doubleValue);
-
- return doubleStyle;
- case NotationPackage.STRING_LIST_VALUE_STYLE:
- String[] values = ParserHelper.parseValues(engine, cssValue);
-
- StringListValueStyle stringListStyle = NotationFactory.eINSTANCE.createStringListValueStyle();
- stringListStyle.setName(name);
- stringListStyle.getStringListValue().addAll(Arrays.asList(values));
-
- return stringListStyle;
- default:
- return null;
- }
- } catch (Exception ex) {
- Activator.log.error(ex);
- return null;
- }
- }
-
- /**
- * For now, we support delegation of single-attribute styles:
- * <ul>
- * <li>{@link CanonicalStyle}</li>
- * </ul>
- */
- @Override
- public Style getCSSStyle(EClass eClass) {
- if (NotationPackage.Literals.NAMED_STYLE.isSuperTypeOf(eClass)) {
- // Should use getCSSNamedStyle for these
- return null;
- }
-
- if (!NotationPackage.Literals.STYLE.isSuperTypeOf(eClass)) {
- // Not even a style. Sheesh
- return null;
- }
-
- // Gate on supported single-attribute styles
- switch (eClass.getClassifierID()) {
- case NotationPackage.CANONICAL_STYLE:
- break;
- default:
- return null;
- }
-
- // There is exactly one feature in this style (that's why we're here)
- final String attrName = eClass.getEStructuralFeatures().get(0).getName();
-
- // /////////////////////////////////////////////
- // This method may call getNamedStyle() to retrieve the applied CSS Styles. Prevent overflow
- CSSValue cssValue;
- synchronized (this) {
- if (lookupStyle) {
- return null;
- }
-
- try {
- lookupStyle = true;
- cssValue = engine.retrievePropertyValue(view, attrName);
- if (cssValue == null) {
- return null;
- }
- } finally {
- lookupStyle = false;
- }
- }
- // /////////////////////////////////////////////
-
- Style result = null;
-
- try {
- switch (eClass.getClassifierID()) {
- case NotationPackage.CANONICAL_STYLE:
- Boolean booleanValue = (Boolean) engine.convert(cssValue, Boolean.class, null);
- CanonicalStyle canonicalStyle = NotationFactory.eINSTANCE.createCanonicalStyle();
-
- canonicalStyle.setCanonical(booleanValue);
-
- result = canonicalStyle;
- break;
- default:
- break;
- }
- } catch (Exception e) {
- Activator.log.error(e);
- }
-
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 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:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.style.impl;
+
+import java.util.Arrays;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
+import org.eclipse.gmf.runtime.notation.DoubleValueStyle;
+import org.eclipse.gmf.runtime.notation.IntValueStyle;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringListValueStyle;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.ParserHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
+import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.w3c.dom.css.CSSValue;
+
+public class CSSViewDelegate implements CSSView {
+
+ private View view;
+
+ private ExtendedCSSEngine engine;
+
+ public CSSViewDelegate(View view, ExtendedCSSEngine engine) {
+ this.view = view;
+ this.engine = engine;
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ CSSValue cssValue = engine.retrievePropertyValue(view, "visible");
+ if (cssValue == null) {
+ Object defaultValue = NotationPackage.eINSTANCE.getView_Visible().getDefaultValue();
+ return (Boolean) defaultValue;
+ }
+
+ return (Boolean) engine.convert(cssValue, Boolean.class, null);
+ }
+
+ private boolean lookupStyle = false;
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ if (!CSSNotationResource.isCSSEnabled(view.eResource())) {
+ return null;
+ }
+
+ if (!NotationPackage.eINSTANCE.getNamedStyle().isSuperTypeOf(eClass)) {
+ return null;
+ }
+
+ // /////////////////////////////////////////////
+ // This method may call getNamedStyle() to retrieve the applied CSS Styles. Prevent overflow
+ if (CSSStyles.RESERVED_KEYWORDS.contains(name)) {
+ return null;
+ }
+
+ CSSValue cssValue;
+ synchronized (this) {
+ if (lookupStyle) {
+ return null;
+ }
+
+ try {
+ lookupStyle = true;
+ cssValue = engine.retrievePropertyValue(view, name);
+ if (cssValue == null) {
+ return null;
+ }
+ } finally {
+ lookupStyle = false;
+ }
+ }
+ // /////////////////////////////////////////////
+
+ try {
+ switch (eClass.getClassifierID()) {
+ case NotationPackage.BOOLEAN_VALUE_STYLE:
+
+ Boolean booleanValue = (Boolean) engine.convert(cssValue, Boolean.class, null);
+ BooleanValueStyle booleanStyle = NotationFactory.eINSTANCE.createBooleanValueStyle();
+
+ booleanStyle.setBooleanValue(booleanValue);
+ booleanStyle.setName(name);
+
+ return booleanStyle;
+
+ case NotationPackage.STRING_VALUE_STYLE:
+
+ String stringValue = (String) engine.convert(cssValue, String.class, null);
+ StringValueStyle stringStyle = NotationFactory.eINSTANCE.createStringValueStyle();
+
+ stringStyle.setName(name);
+ stringStyle.setStringValue(stringValue);
+
+ return stringStyle;
+
+ case NotationPackage.INT_VALUE_STYLE:
+
+ Integer intValue = (Integer) engine.convert(cssValue, Integer.class, null);
+ IntValueStyle intStyle = NotationFactory.eINSTANCE.createIntValueStyle();
+
+ intStyle.setName(name);
+ intStyle.setIntValue(intValue);
+
+ return intStyle;
+ case NotationPackage.DOUBLE_VALUE_STYLE:
+
+ Double doubleValue = (Double) engine.convert(cssValue, Double.class, null);
+ DoubleValueStyle doubleStyle = NotationFactory.eINSTANCE.createDoubleValueStyle();
+
+ doubleStyle.setName(name);
+ doubleStyle.setDoubleValue(doubleValue);
+
+ return doubleStyle;
+ case NotationPackage.STRING_LIST_VALUE_STYLE:
+ String[] values = ParserHelper.parseValues(engine, cssValue);
+
+ StringListValueStyle stringListStyle = NotationFactory.eINSTANCE.createStringListValueStyle();
+ stringListStyle.setName(name);
+ stringListStyle.getStringListValue().addAll(Arrays.asList(values));
+
+ return stringListStyle;
+ default:
+ return null;
+ }
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ return null;
+ }
+ }
+
+ /**
+ * For now, we support delegation of single-attribute styles:
+ * <ul>
+ * <li>{@link CanonicalStyle}</li>
+ * </ul>
+ */
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ if (NotationPackage.Literals.NAMED_STYLE.isSuperTypeOf(eClass)) {
+ // Should use getCSSNamedStyle for these
+ return null;
+ }
+
+ if (!NotationPackage.Literals.STYLE.isSuperTypeOf(eClass)) {
+ // Not even a style. Sheesh
+ return null;
+ }
+
+ // Gate on supported single-attribute styles
+ switch (eClass.getClassifierID()) {
+ case NotationPackage.CANONICAL_STYLE:
+ break;
+ default:
+ return null;
+ }
+
+ // There is exactly one feature in this style (that's why we're here)
+ final String attrName = eClass.getEStructuralFeatures().get(0).getName();
+
+ // /////////////////////////////////////////////
+ // This method may call getNamedStyle() to retrieve the applied CSS Styles. Prevent overflow
+ CSSValue cssValue;
+ synchronized (this) {
+ if (lookupStyle) {
+ return null;
+ }
+
+ try {
+ lookupStyle = true;
+ cssValue = engine.retrievePropertyValue(view, attrName);
+ if (cssValue == null) {
+ return null;
+ }
+ } finally {
+ lookupStyle = false;
+ }
+ }
+ // /////////////////////////////////////////////
+
+ Style result = null;
+
+ try {
+ switch (eClass.getClassifierID()) {
+ case NotationPackage.CANONICAL_STYLE:
+ Boolean booleanValue = (Boolean) engine.convert(cssValue, Boolean.class, null);
+ CanonicalStyle canonicalStyle = NotationFactory.eINSTANCE.createCanonicalStyle();
+
+ canonicalStyle.setCanonical(booleanValue);
+
+ result = canonicalStyle;
+ break;
+ default:
+ break;
+ }
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/CssSvgPostProcessor.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/CssSvgPostProcessor.java
index d6cce3a9945..e979ddbc6ab 100755
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/CssSvgPostProcessor.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/CssSvgPostProcessor.java
@@ -1,422 +1,422 @@
-/*****************************************************************************
- * Copyright (c) 2013 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:
- * Laurent Wouters <laurent.wouters@cea.fr> CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.WeakHashMap;
-
-import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.eclipse.e4.ui.css.core.impl.dom.CSSStyleRuleImpl;
-import org.eclipse.e4.ui.css.core.impl.sac.ExtendedSelector;
-import org.eclipse.e4.ui.css.xml.engine.CSSXMLEngineImpl;
-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.URIConverter;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.StringValueStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.handler.IRefreshHandlerPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.handler.RefreshHandler;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.SVGPostProcessor;
-import org.eclipse.ui.IEditorPart;
-import org.w3c.css.sac.SelectorList;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSStyleRule;
-import org.w3c.dom.css.CSSStyleSheet;
-import org.w3c.dom.css.DocumentCSS;
-import org.w3c.dom.stylesheets.StyleSheet;
-import org.w3c.dom.svg.SVGDocument;
-
-/**
- * Represents a SVG post-processor that applies the current CSS style provided by the view
- *
- * @author Laurent Wouters
- */
-// TODO: This post processor doesn't depend on the GMF/CSS integration. It could be possible to apply styles to SVG images
-// without having the GMF/CSS integration. This class might be moved to gmfdiag.common
-@SuppressWarnings("restriction")
-public class CssSvgPostProcessor implements SVGPostProcessor, IRefreshHandlerPart {
-
- /**
- * The name of the CSS property that points to the CSS file for the SVG figure
- */
- private static final String CSS_PROPERTY_SVG_STYLESHEET = "svgCSSFile";
-
- /**
- * The name of the CSS property that defines the name of the CSS class to look for in the SVG figure
- */
- private static final String CSS_PROPERTY_SVG_CLASS = "svgCSSClass";
-
- /**
- * The CSS engine for this post-processor
- */
- private CSSEngine engine;
-
- /**
- * Maps of URIs for CSS stylesheets refered to with relative paths
- */
- private WeakHashMap<Resource, Map<String, URI>> relativePaths;
-
- /**
- * List of the loaded stylesheets
- */
- private Collection<URI> loadedSheets;
-
- /**
- * List of stylesheets that could not be loaded
- */
- private Collection<URI> failedSheets;
-
- /**
- * Hive of styled SVG element per document that stores the original style of the SVG elements
- */
- private Map<SVGDocument, Map<Element, Map<String, String>>> styledDocuments;
-
- /**
- * Initializes this processor
- */
- public CssSvgPostProcessor() {
- engine = new CSSXMLEngineImpl();
- relativePaths = new WeakHashMap<Resource, Map<String, URI>>();
- loadedSheets = new ArrayList<URI>();
- failedSheets = new ArrayList<URI>();
- styledDocuments = new HashMap<SVGDocument, Map<Element, Map<String, String>>>();
- RefreshHandler.register(this);
- }
-
- /**
- * @see org.eclipse.papyrus.infra.gmfdiag.common.handler.IRefreshHandlerPart#refresh(org.eclipse.ui.IEditorPart)
- */
- @Override
- public void refresh(IEditorPart editorPart) {
- relativePaths.clear();
- loadedSheets.clear();
- failedSheets.clear();
- styledDocuments.clear();
- engine.reset();
- }
-
- /**
- * @see org.eclipse.papyrus.infra.gmfdiag.common.service.shape.SVGPostProcessor#postProcess(org.eclipse.emf.ecore.EObject, org.w3c.dom.svg.SVGDocument)
- */
- @Override
- public void postProcess(EObject view, SVGDocument document) {
- if (document == null) {
- return;
- }
- if (view instanceof org.eclipse.gmf.runtime.notation.Node) {
- View shape = (View) view;
- // Retrieve the applied CSS stylesheet if necessary
- StringValueStyle nsURI = (StringValueStyle) shape.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), CSS_PROPERTY_SVG_STYLESHEET);
- if (nsURI != null) {
- loadStylesheet(getCanonicalURI(shape.getElement(), nsURI.getStringValue()));
- }
- // Retrieve the applied CSS class
- StringValueStyle nsClassName = (StringValueStyle) shape.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), CSS_PROPERTY_SVG_CLASS);
- String className = "";
- if (nsClassName != null) {
- className = nsClassName.getStringValue();
- }
- // Apply the style
- document.getDocumentElement().setAttribute("class", className);
- applyStyles(document);
- }
- }
-
- /**
- * Loads the stylesheet at the given URI into the CSS engine
- *
- * @param uri
- * The URI to load the stylesheet from
- */
- private void loadStylesheet(URI uri) {
- if (uri == null || uri.isEmpty()) {
- return;
- }
- if (loadedSheets.contains(uri)) {
- return;
- }
- if (failedSheets.contains(uri)) {
- return;
- }
- InputStream stream;
- try {
- stream = URIConverter.INSTANCE.createInputStream(uri);
- } catch (IOException e) {
- Activator.log.error("Failed to locate stylesheet from " + uri, e);
- failedSheets.add(uri);
- return;
- }
- StyleSheet sheet = null;
- try {
- sheet = engine.parseStyleSheet(stream);
- } catch (IOException e) {
- Activator.log.error("Failed to load stylesheet at " + uri, e);
- failedSheets.add(uri);
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- }
- }
- if (sheet != null) {
- loadedSheets.add(uri);
- }
- }
-
- /**
- * Translates the given uri as a string to a canonical Eclipse URI
- * The URI may be relative to the currently edited EMF resource
- *
- * @param model
- * The model element used to retrieve the EMF resource that is currently edited
- * @param uri
- * The potentially relative URI of a stylesheet
- * @return The canonical URI of the resource
- */
- private URI getCanonicalURI(EObject model, String uri) {
- if (uri.startsWith("platform:/")) {
- return URI.createURI(uri);
- }
-
- Map<String, URI> resMap = relativePaths.get(model.eResource());
- if (resMap == null) {
- resMap = new HashMap<String, URI>();
- relativePaths.put(model.eResource(), resMap);
- }
- URI canonical = resMap.get(uri);
- if (canonical != null) {
- return canonical;
- }
-
- URI resURI = model.eResource().getURI();
- if (!resURI.isPlatform()) {
- return null;
- }
- StringBuilder builder = new StringBuilder("platform:/");
- String[] segments = resURI.segments();
- for (int i = 0; i < segments.length - 1; i++) {
- builder.append(segments[i]);
- builder.append("/");
- }
- builder.append(uri);
- canonical = URI.createURI(builder.toString());
- resMap.put(uri, canonical);
- return canonical;
- }
-
-
- /**
- * Applies the CSS styles to the given SVG document
- *
- * @param document
- * The SVG document
- */
- private void applyStyles(SVGDocument document) {
- List<CSSStyleRule> rules = getAllRulesIn(engine.getDocumentCSS());
- Map<Element, Map<String, String>> originals = styledDocuments.get(document);
- if (originals == null) {
- originals = new HashMap<Element, Map<String, String>>();
- styledDocuments.put(document, originals);
- }
- applyStyles(document.getDocumentElement(), rules, originals);
- }
-
- /**
- * Recursively applies the CSS rule on this SVG element
- *
- * @param element
- * The SVG element
- * @param rules
- * The CSS rules in effect
- * @param originals
- * The original styling properties of the elements
- */
- private void applyStyles(Element element, List<CSSStyleRule> rules, Map<Element, Map<String, String>> originals) {
- // recursively apply to DOM elements
- for (int i = 0; i != element.getChildNodes().getLength(); i++) {
- Node child = element.getChildNodes().item(i);
- if (child instanceof Element) {
- applyStyles((Element) child, rules, originals);
- }
- }
-
- // make a copy of the original styling properties
- Map<String, String> style = originals.get(element);
- if (style == null) {
- style = getBaseStyle(element);
- originals.put(element, style);
- }
- style = new HashMap<String, String>(style);
-
- // get the applicable CSS rules
- List<CSSStyleRule> applicable = getApplicableRules(element, rules);
- // apply the CSS rules to the styling properties
- for (CSSStyleRule rule : applicable) {
- applyRuleTo(rule, style);
- }
-
- // serialize the result and put it back into the DOM
- StringBuilder builder = new StringBuilder();
- int count = 0;
- for (Entry<String, String> entry : style.entrySet()) {
- if (count != 0) {
- builder.append(";");
- }
- builder.append(entry.getKey());
- builder.append(":");
- builder.append(entry.getValue());
- count++;
- }
- element.setAttribute("style", builder.toString());
- }
-
- /**
- * Builds a list of the CSS style rules for the given CSS document
- *
- * @param css
- * The CSS document
- * @return The CSS style rules
- */
- private List<CSSStyleRule> getAllRulesIn(DocumentCSS css) {
- List<CSSStyleRule> result = new ArrayList<CSSStyleRule>();
- for (int i = 0; i != css.getStyleSheets().getLength(); i++) {
- StyleSheet ss = css.getStyleSheets().item(i);
- if (ss instanceof CSSStyleSheet) {
- CSSStyleSheet cs = (CSSStyleSheet) ss;
- for (int j = 0; j != cs.getCssRules().getLength(); j++) {
- CSSRule rule = cs.getCssRules().item(j);
- if (rule.getType() == CSSRule.STYLE_RULE) {
- result.add((CSSStyleRule) rule);
- }
- }
- }
- }
- return result;
- }
-
- /**
- * Filters the CSS rules that applies for the given SVG element
- *
- * @param svgElement
- * A SVG element
- * @param rules
- * The set of active rules
- * @return The matching rules
- */
- private List<CSSStyleRule> getApplicableRules(Element svgElement, List<CSSStyleRule> rules) {
- List<CSSStyleRule> matching = new ArrayList<CSSStyleRule>();
-
- // Matches the rules using the selectors
- for (CSSStyleRule rule : rules) {
- SelectorList selectors = ((CSSStyleRuleImpl) rule).getSelectorList();
- boolean match = true;
- for (int i = 0; i != selectors.getLength(); i++) {
- ExtendedSelector xs = (ExtendedSelector) selectors.item(i);
- if (!xs.match(svgElement, null)) {
- match = false;
- break;
- }
- }
- if (match) {
- matching.add(rule);
- }
- }
-
- // No match => stop
- if (matching.isEmpty()) {
- return matching;
- }
-
- // Remove the parent rules
- boolean[] available = new boolean[matching.size()];
- Arrays.fill(available, 0, available.length, true);
- for (int i = 0; i != matching.size(); i++) {
- CSSStyleRule rule = matching.get(i);
- if (rule != null && rule.getParentRule() != null) {
- for (int j = 0; j != matching.size(); j++) {
- if (matching.get(i) == rule.getParentRule()) {
- available[i] = false;
- break;
- }
- }
- }
- }
- List<CSSStyleRule> result = new ArrayList<CSSStyleRule>();
- for (int i = 0; i != matching.size(); i++) {
- if (available[i]) {
- result.add(matching.get(i));
- }
- }
- return result;
- }
-
- /**
- * Loads the styling properties of a SVG element from the DOM
- *
- * @param element
- * The SVG element
- * @return The styling properties in the DOM
- */
- private Map<String, String> getBaseStyle(Element element) {
- HashMap<String, String> result = new HashMap<String, String>();
- String styleValue = element.getAttribute("style");
- if (styleValue != null && !styleValue.isEmpty()) {
- String[] props = styleValue.split(";");
- for (int i = 0; i != props.length; i++) {
- String[] temp = props[i].split(":");
- if (temp.length == 2) {
- result.put(temp[0], temp[1]);
- } else if (temp.length > 2) {
- StringBuilder builder = new StringBuilder(temp[1]);
- for (int j = 2; j != temp.length; j++) {
- builder.append(":");
- builder.append(temp[j]);
- }
- result.put(temp[0], builder.toString());
- }
- }
- }
- return result;
- }
-
- /**
- * Recursively applies the given CSS rule and its parent on the map of properties
- *
- * @param rule
- * The CSS rule to apply
- * @param properties
- * The map of CSS properties to build
- */
- private void applyRuleTo(CSSStyleRule rule, Map<String, String> properties) {
- if (rule.getParentRule() != null) {
- applyRuleTo((CSSStyleRule) rule.getParentRule(), properties);
- }
- for (int i = 0; i != rule.getStyle().getLength(); i++) {
- String name = rule.getStyle().item(i);
- String value = rule.getStyle().getPropertyCSSValue(name).getCssText();
- properties.put(name, value);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Laurent Wouters <laurent.wouters@cea.fr> CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.WeakHashMap;
+
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.eclipse.e4.ui.css.core.impl.dom.CSSStyleRuleImpl;
+import org.eclipse.e4.ui.css.core.impl.sac.ExtendedSelector;
+import org.eclipse.e4.ui.css.xml.engine.CSSXMLEngineImpl;
+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.URIConverter;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.handler.IRefreshHandlerPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.handler.RefreshHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.SVGPostProcessor;
+import org.eclipse.ui.IEditorPart;
+import org.w3c.css.sac.SelectorList;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.css.CSSRule;
+import org.w3c.dom.css.CSSStyleRule;
+import org.w3c.dom.css.CSSStyleSheet;
+import org.w3c.dom.css.DocumentCSS;
+import org.w3c.dom.stylesheets.StyleSheet;
+import org.w3c.dom.svg.SVGDocument;
+
+/**
+ * Represents a SVG post-processor that applies the current CSS style provided by the view
+ *
+ * @author Laurent Wouters
+ */
+// TODO: This post processor doesn't depend on the GMF/CSS integration. It could be possible to apply styles to SVG images
+// without having the GMF/CSS integration. This class might be moved to gmfdiag.common
+@SuppressWarnings("restriction")
+public class CssSvgPostProcessor implements SVGPostProcessor, IRefreshHandlerPart {
+
+ /**
+ * The name of the CSS property that points to the CSS file for the SVG figure
+ */
+ private static final String CSS_PROPERTY_SVG_STYLESHEET = "svgCSSFile";
+
+ /**
+ * The name of the CSS property that defines the name of the CSS class to look for in the SVG figure
+ */
+ private static final String CSS_PROPERTY_SVG_CLASS = "svgCSSClass";
+
+ /**
+ * The CSS engine for this post-processor
+ */
+ private CSSEngine engine;
+
+ /**
+ * Maps of URIs for CSS stylesheets refered to with relative paths
+ */
+ private WeakHashMap<Resource, Map<String, URI>> relativePaths;
+
+ /**
+ * List of the loaded stylesheets
+ */
+ private Collection<URI> loadedSheets;
+
+ /**
+ * List of stylesheets that could not be loaded
+ */
+ private Collection<URI> failedSheets;
+
+ /**
+ * Hive of styled SVG element per document that stores the original style of the SVG elements
+ */
+ private Map<SVGDocument, Map<Element, Map<String, String>>> styledDocuments;
+
+ /**
+ * Initializes this processor
+ */
+ public CssSvgPostProcessor() {
+ engine = new CSSXMLEngineImpl();
+ relativePaths = new WeakHashMap<Resource, Map<String, URI>>();
+ loadedSheets = new ArrayList<URI>();
+ failedSheets = new ArrayList<URI>();
+ styledDocuments = new HashMap<SVGDocument, Map<Element, Map<String, String>>>();
+ RefreshHandler.register(this);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.handler.IRefreshHandlerPart#refresh(org.eclipse.ui.IEditorPart)
+ */
+ @Override
+ public void refresh(IEditorPart editorPart) {
+ relativePaths.clear();
+ loadedSheets.clear();
+ failedSheets.clear();
+ styledDocuments.clear();
+ engine.reset();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.service.shape.SVGPostProcessor#postProcess(org.eclipse.emf.ecore.EObject, org.w3c.dom.svg.SVGDocument)
+ */
+ @Override
+ public void postProcess(EObject view, SVGDocument document) {
+ if (document == null) {
+ return;
+ }
+ if (view instanceof org.eclipse.gmf.runtime.notation.Node) {
+ View shape = (View) view;
+ // Retrieve the applied CSS stylesheet if necessary
+ StringValueStyle nsURI = (StringValueStyle) shape.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), CSS_PROPERTY_SVG_STYLESHEET);
+ if (nsURI != null) {
+ loadStylesheet(getCanonicalURI(shape.getElement(), nsURI.getStringValue()));
+ }
+ // Retrieve the applied CSS class
+ StringValueStyle nsClassName = (StringValueStyle) shape.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), CSS_PROPERTY_SVG_CLASS);
+ String className = "";
+ if (nsClassName != null) {
+ className = nsClassName.getStringValue();
+ }
+ // Apply the style
+ document.getDocumentElement().setAttribute("class", className);
+ applyStyles(document);
+ }
+ }
+
+ /**
+ * Loads the stylesheet at the given URI into the CSS engine
+ *
+ * @param uri
+ * The URI to load the stylesheet from
+ */
+ private void loadStylesheet(URI uri) {
+ if (uri == null || uri.isEmpty()) {
+ return;
+ }
+ if (loadedSheets.contains(uri)) {
+ return;
+ }
+ if (failedSheets.contains(uri)) {
+ return;
+ }
+ InputStream stream;
+ try {
+ stream = URIConverter.INSTANCE.createInputStream(uri);
+ } catch (IOException e) {
+ Activator.log.error("Failed to locate stylesheet from " + uri, e);
+ failedSheets.add(uri);
+ return;
+ }
+ StyleSheet sheet = null;
+ try {
+ sheet = engine.parseStyleSheet(stream);
+ } catch (IOException e) {
+ Activator.log.error("Failed to load stylesheet at " + uri, e);
+ failedSheets.add(uri);
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ }
+ }
+ if (sheet != null) {
+ loadedSheets.add(uri);
+ }
+ }
+
+ /**
+ * Translates the given uri as a string to a canonical Eclipse URI
+ * The URI may be relative to the currently edited EMF resource
+ *
+ * @param model
+ * The model element used to retrieve the EMF resource that is currently edited
+ * @param uri
+ * The potentially relative URI of a stylesheet
+ * @return The canonical URI of the resource
+ */
+ private URI getCanonicalURI(EObject model, String uri) {
+ if (uri.startsWith("platform:/")) {
+ return URI.createURI(uri);
+ }
+
+ Map<String, URI> resMap = relativePaths.get(model.eResource());
+ if (resMap == null) {
+ resMap = new HashMap<String, URI>();
+ relativePaths.put(model.eResource(), resMap);
+ }
+ URI canonical = resMap.get(uri);
+ if (canonical != null) {
+ return canonical;
+ }
+
+ URI resURI = model.eResource().getURI();
+ if (!resURI.isPlatform()) {
+ return null;
+ }
+ StringBuilder builder = new StringBuilder("platform:/");
+ String[] segments = resURI.segments();
+ for (int i = 0; i < segments.length - 1; i++) {
+ builder.append(segments[i]);
+ builder.append("/");
+ }
+ builder.append(uri);
+ canonical = URI.createURI(builder.toString());
+ resMap.put(uri, canonical);
+ return canonical;
+ }
+
+
+ /**
+ * Applies the CSS styles to the given SVG document
+ *
+ * @param document
+ * The SVG document
+ */
+ private void applyStyles(SVGDocument document) {
+ List<CSSStyleRule> rules = getAllRulesIn(engine.getDocumentCSS());
+ Map<Element, Map<String, String>> originals = styledDocuments.get(document);
+ if (originals == null) {
+ originals = new HashMap<Element, Map<String, String>>();
+ styledDocuments.put(document, originals);
+ }
+ applyStyles(document.getDocumentElement(), rules, originals);
+ }
+
+ /**
+ * Recursively applies the CSS rule on this SVG element
+ *
+ * @param element
+ * The SVG element
+ * @param rules
+ * The CSS rules in effect
+ * @param originals
+ * The original styling properties of the elements
+ */
+ private void applyStyles(Element element, List<CSSStyleRule> rules, Map<Element, Map<String, String>> originals) {
+ // recursively apply to DOM elements
+ for (int i = 0; i != element.getChildNodes().getLength(); i++) {
+ Node child = element.getChildNodes().item(i);
+ if (child instanceof Element) {
+ applyStyles((Element) child, rules, originals);
+ }
+ }
+
+ // make a copy of the original styling properties
+ Map<String, String> style = originals.get(element);
+ if (style == null) {
+ style = getBaseStyle(element);
+ originals.put(element, style);
+ }
+ style = new HashMap<String, String>(style);
+
+ // get the applicable CSS rules
+ List<CSSStyleRule> applicable = getApplicableRules(element, rules);
+ // apply the CSS rules to the styling properties
+ for (CSSStyleRule rule : applicable) {
+ applyRuleTo(rule, style);
+ }
+
+ // serialize the result and put it back into the DOM
+ StringBuilder builder = new StringBuilder();
+ int count = 0;
+ for (Entry<String, String> entry : style.entrySet()) {
+ if (count != 0) {
+ builder.append(";");
+ }
+ builder.append(entry.getKey());
+ builder.append(":");
+ builder.append(entry.getValue());
+ count++;
+ }
+ element.setAttribute("style", builder.toString());
+ }
+
+ /**
+ * Builds a list of the CSS style rules for the given CSS document
+ *
+ * @param css
+ * The CSS document
+ * @return The CSS style rules
+ */
+ private List<CSSStyleRule> getAllRulesIn(DocumentCSS css) {
+ List<CSSStyleRule> result = new ArrayList<CSSStyleRule>();
+ for (int i = 0; i != css.getStyleSheets().getLength(); i++) {
+ StyleSheet ss = css.getStyleSheets().item(i);
+ if (ss instanceof CSSStyleSheet) {
+ CSSStyleSheet cs = (CSSStyleSheet) ss;
+ for (int j = 0; j != cs.getCssRules().getLength(); j++) {
+ CSSRule rule = cs.getCssRules().item(j);
+ if (rule.getType() == CSSRule.STYLE_RULE) {
+ result.add((CSSStyleRule) rule);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Filters the CSS rules that applies for the given SVG element
+ *
+ * @param svgElement
+ * A SVG element
+ * @param rules
+ * The set of active rules
+ * @return The matching rules
+ */
+ private List<CSSStyleRule> getApplicableRules(Element svgElement, List<CSSStyleRule> rules) {
+ List<CSSStyleRule> matching = new ArrayList<CSSStyleRule>();
+
+ // Matches the rules using the selectors
+ for (CSSStyleRule rule : rules) {
+ SelectorList selectors = ((CSSStyleRuleImpl) rule).getSelectorList();
+ boolean match = true;
+ for (int i = 0; i != selectors.getLength(); i++) {
+ ExtendedSelector xs = (ExtendedSelector) selectors.item(i);
+ if (!xs.match(svgElement, null)) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ matching.add(rule);
+ }
+ }
+
+ // No match => stop
+ if (matching.isEmpty()) {
+ return matching;
+ }
+
+ // Remove the parent rules
+ boolean[] available = new boolean[matching.size()];
+ Arrays.fill(available, 0, available.length, true);
+ for (int i = 0; i != matching.size(); i++) {
+ CSSStyleRule rule = matching.get(i);
+ if (rule != null && rule.getParentRule() != null) {
+ for (int j = 0; j != matching.size(); j++) {
+ if (matching.get(i) == rule.getParentRule()) {
+ available[i] = false;
+ break;
+ }
+ }
+ }
+ }
+ List<CSSStyleRule> result = new ArrayList<CSSStyleRule>();
+ for (int i = 0; i != matching.size(); i++) {
+ if (available[i]) {
+ result.add(matching.get(i));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Loads the styling properties of a SVG element from the DOM
+ *
+ * @param element
+ * The SVG element
+ * @return The styling properties in the DOM
+ */
+ private Map<String, String> getBaseStyle(Element element) {
+ HashMap<String, String> result = new HashMap<String, String>();
+ String styleValue = element.getAttribute("style");
+ if (styleValue != null && !styleValue.isEmpty()) {
+ String[] props = styleValue.split(";");
+ for (int i = 0; i != props.length; i++) {
+ String[] temp = props[i].split(":");
+ if (temp.length == 2) {
+ result.put(temp[0], temp[1]);
+ } else if (temp.length > 2) {
+ StringBuilder builder = new StringBuilder(temp[1]);
+ for (int j = 2; j != temp.length; j++) {
+ builder.append(":");
+ builder.append(temp[j]);
+ }
+ result.put(temp[0], builder.toString());
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Recursively applies the given CSS rule and its parent on the map of properties
+ *
+ * @param rule
+ * The CSS rule to apply
+ * @param properties
+ * The map of CSS properties to build
+ */
+ private void applyRuleTo(CSSStyleRule rule, Map<String, String> properties) {
+ if (rule.getParentRule() != null) {
+ applyRuleTo((CSSStyleRule) rule.getParentRule(), properties);
+ }
+ for (int i = 0; i != rule.getStyle().getLength(); i++) {
+ String name = rule.getStyle().item(i);
+ String value = rule.getStyle().getPropertyCSSValue(name).getCssText();
+ properties.put(name, value);
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/BooleanConverter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/BooleanConverter.java
index cd3855e3543..8b95c1bd6b9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/BooleanConverter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/BooleanConverter.java
@@ -1,50 +1,50 @@
-/*****************************************************************************
- * 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.converters;
-
-import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
-import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
-import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- * A Converter for Boolean values
- * Converts a CSS String to a Java Boolean
- *
- * @author Camille Letavernier
- */
-@SuppressWarnings("restriction")
-public class BooleanConverter extends AbstractCSSValueConverter {
-
- /**
- * Constructor
- */
- public BooleanConverter() {
- super(Boolean.class);
- }
-
- @Override
- public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
- if (value instanceof CSSPrimitiveValue) {
- return Boolean.parseBoolean(((CSSPrimitiveValue) value).getStringValue());
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid Boolean");
- }
-
- @Override
- public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
- throw new UnsupportedOperationException();
- }
-
-}
+/*****************************************************************************
+ * 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.converters;
+
+import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
+import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.w3c.dom.css.CSSPrimitiveValue;
+import org.w3c.dom.css.CSSValue;
+
+
+/**
+ * A Converter for Boolean values
+ * Converts a CSS String to a Java Boolean
+ *
+ * @author Camille Letavernier
+ */
+@SuppressWarnings("restriction")
+public class BooleanConverter extends AbstractCSSValueConverter {
+
+ /**
+ * Constructor
+ */
+ public BooleanConverter() {
+ super(Boolean.class);
+ }
+
+ @Override
+ public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
+ if (value instanceof CSSPrimitiveValue) {
+ return Boolean.parseBoolean(((CSSPrimitiveValue) value).getStringValue());
+ }
+ throw new IllegalArgumentException("The value " + value + " is not a valid Boolean");
+ }
+
+ @Override
+ public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java
index a526994619b..d9642220620 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java
@@ -1,128 +1,128 @@
-/*****************************************************************************
- * 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 392301
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.converters;
-
-import org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper;
-import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
-import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
-import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.eclipse.e4.ui.css.core.impl.dom.Measure;
-import org.w3c.css.sac.LexicalUnit;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-import org.w3c.dom.css.RGBColor;
-
-/**
- * A Converter for GMF Colors
- * Converts a CSS Color to a GMF-compatible color (RGB Integer)
- *
- * @author Camille Letavernier
- */
-@SuppressWarnings("restriction")
-public class ColorToGMFConverter extends AbstractCSSValueConverter {
-
- /**
- * The GMF Color type
- */
- public static final String GMFColor = "GMFColor"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public ColorToGMFConverter() {
- super(GMFColor);
- }
-
- @Override
- public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
- RGBColor color;
- if (value instanceof RGBColor) {
- color = (RGBColor) value;
- } else if (value instanceof CSSPrimitiveValue) {
- CSSPrimitiveValue cssValue = (CSSPrimitiveValue) value;
-
- try {
- int intValue = (int)cssValue.getFloatValue(LexicalUnit.SAC_INTEGER);
- return intValue;
- } catch (Exception ex){
- //Ignore: treat as a String
- }
-
- color = CSS2ColorHelper.getRGBColor(cssValue.getStringValue());
- } else {
- throw new IllegalArgumentException("Cannot convert " + value + " to GMF Color");
- }
-
- return getIntColor(color);
- }
-
- @Override
- public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns a GMF-compatible integer color from a CSS RGBColor object
- *
- * @param color
- * The CSS RGBColor to convert
- * @return
- * A GMF-compatible integer color
- */
- public static int getIntColor(RGBColor color) {
- int red = getInt(color.getRed()) & 0xFF;
- int green = getInt(color.getGreen()) & 0xFF;
- int blue = getInt(color.getBlue()) & 0xFF;
-
- return (blue << 16) | (green << 8) | red;
- }
-
- /**
- * Returns an integer from a CSSPrimitiveValue
- *
- * @param value
- * The CSSPrimitiveValue to convert
- * @return
- * A Java integer equivalent to the CSSPrimitiveValue
- */
- public static int getInt(CSSPrimitiveValue value) {
- if (value instanceof Measure) {
- Measure measure = (Measure) value;
- return measure.getIntegerValue(CSSValue.CSS_PRIMITIVE_VALUE);
- }
- return (int) value.getFloatValue(CSSValue.CSS_PRIMITIVE_VALUE);
- }
-
- // Unused
- public static int getIntColor(String value, CSSValue cssValue) {
- RGBColor color;
- if (cssValue instanceof RGBColor) {
- // color:rgb(125, 255, 0);
- color = (RGBColor) cssValue;
- } else {
- // color:red; || color:#FFFFFF;
- color = CSS2ColorHelper.getRGBColor(value);
- }
-
- if (color == null) {
- try {
- return Integer.parseInt(value);
- } catch (NumberFormatException ex) {
- return -1;
- }
- }
-
- return getIntColor(color);
- }
-}
+/*****************************************************************************
+ * 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 392301
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.converters;
+
+import org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper;
+import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
+import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.eclipse.e4.ui.css.core.impl.dom.Measure;
+import org.w3c.css.sac.LexicalUnit;
+import org.w3c.dom.css.CSSPrimitiveValue;
+import org.w3c.dom.css.CSSValue;
+import org.w3c.dom.css.RGBColor;
+
+/**
+ * A Converter for GMF Colors
+ * Converts a CSS Color to a GMF-compatible color (RGB Integer)
+ *
+ * @author Camille Letavernier
+ */
+@SuppressWarnings("restriction")
+public class ColorToGMFConverter extends AbstractCSSValueConverter {
+
+ /**
+ * The GMF Color type
+ */
+ public static final String GMFColor = "GMFColor"; //$NON-NLS-1$
+
+ /**
+ * Constructor
+ */
+ public ColorToGMFConverter() {
+ super(GMFColor);
+ }
+
+ @Override
+ public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
+ RGBColor color;
+ if (value instanceof RGBColor) {
+ color = (RGBColor) value;
+ } else if (value instanceof CSSPrimitiveValue) {
+ CSSPrimitiveValue cssValue = (CSSPrimitiveValue) value;
+
+ try {
+ int intValue = (int)cssValue.getFloatValue(LexicalUnit.SAC_INTEGER);
+ return intValue;
+ } catch (Exception ex){
+ //Ignore: treat as a String
+ }
+
+ color = CSS2ColorHelper.getRGBColor(cssValue.getStringValue());
+ } else {
+ throw new IllegalArgumentException("Cannot convert " + value + " to GMF Color");
+ }
+
+ return getIntColor(color);
+ }
+
+ @Override
+ public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a GMF-compatible integer color from a CSS RGBColor object
+ *
+ * @param color
+ * The CSS RGBColor to convert
+ * @return
+ * A GMF-compatible integer color
+ */
+ public static int getIntColor(RGBColor color) {
+ int red = getInt(color.getRed()) & 0xFF;
+ int green = getInt(color.getGreen()) & 0xFF;
+ int blue = getInt(color.getBlue()) & 0xFF;
+
+ return (blue << 16) | (green << 8) | red;
+ }
+
+ /**
+ * Returns an integer from a CSSPrimitiveValue
+ *
+ * @param value
+ * The CSSPrimitiveValue to convert
+ * @return
+ * A Java integer equivalent to the CSSPrimitiveValue
+ */
+ public static int getInt(CSSPrimitiveValue value) {
+ if (value instanceof Measure) {
+ Measure measure = (Measure) value;
+ return measure.getIntegerValue(CSSValue.CSS_PRIMITIVE_VALUE);
+ }
+ return (int) value.getFloatValue(CSSValue.CSS_PRIMITIVE_VALUE);
+ }
+
+ // Unused
+ public static int getIntColor(String value, CSSValue cssValue) {
+ RGBColor color;
+ if (cssValue instanceof RGBColor) {
+ // color:rgb(125, 255, 0);
+ color = (RGBColor) cssValue;
+ } else {
+ // color:red; || color:#FFFFFF;
+ color = CSS2ColorHelper.getRGBColor(value);
+ }
+
+ if (color == null) {
+ try {
+ return Integer.parseInt(value);
+ } catch (NumberFormatException ex) {
+ return -1;
+ }
+ }
+
+ return getIntColor(color);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/IntegerConverter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/IntegerConverter.java
index e22f112d1f8..e32ab60090a 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/IntegerConverter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/IntegerConverter.java
@@ -1,52 +1,52 @@
-/*****************************************************************************
- * 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.converters;
-
-import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
-import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
-import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.eclipse.e4.ui.css.core.impl.dom.Measure;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-/**
- * A Converter for Integer values
- * Converts a CSS String to a Java Integer
- *
- * @author Camille Letavernier
- */
-@SuppressWarnings("restriction")
-public class IntegerConverter extends AbstractCSSValueConverter {
-
- /**
- * Constructor
- */
- public IntegerConverter() {
- super(Integer.class);
- }
-
- @Override
- public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
- if (value instanceof CSSPrimitiveValue) {
- return (int) ((CSSPrimitiveValue) value).getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
- }
- if (value instanceof Measure) {
- return (int) ((Measure) value).getIntegerValue(CSSPrimitiveValue.CSS_NUMBER);
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid Integer");
- }
-
- @Override
- public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
- throw new UnsupportedOperationException();
- }
-}
+/*****************************************************************************
+ * 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.converters;
+
+import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
+import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.eclipse.e4.ui.css.core.impl.dom.Measure;
+import org.w3c.dom.css.CSSPrimitiveValue;
+import org.w3c.dom.css.CSSValue;
+
+/**
+ * A Converter for Integer values
+ * Converts a CSS String to a Java Integer
+ *
+ * @author Camille Letavernier
+ */
+@SuppressWarnings("restriction")
+public class IntegerConverter extends AbstractCSSValueConverter {
+
+ /**
+ * Constructor
+ */
+ public IntegerConverter() {
+ super(Integer.class);
+ }
+
+ @Override
+ public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
+ if (value instanceof CSSPrimitiveValue) {
+ return (int) ((CSSPrimitiveValue) value).getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
+ }
+ if (value instanceof Measure) {
+ return (int) ((Measure) value).getIntegerValue(CSSPrimitiveValue.CSS_NUMBER);
+ }
+ throw new IllegalArgumentException("The value " + value + " is not a valid Integer");
+ }
+
+ @Override
+ public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/StringConverter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/StringConverter.java
index f90b5c2d75d..b6b1d38b722 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/StringConverter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/StringConverter.java
@@ -1,48 +1,48 @@
-/*****************************************************************************
- * 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.converters;
-
-import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
-import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
-import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-/**
- * A Converter for String values
- * Converts a CSS String to a Java String
- *
- * @author Camille Letavernier
- */
-@SuppressWarnings("restriction")
-public class StringConverter extends AbstractCSSValueConverter {
-
- /**
- * Constructor
- */
- public StringConverter() {
- super(String.class);
- }
-
- @Override
- public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
- if (value instanceof CSSPrimitiveValue) {
- return ((CSSPrimitiveValue) value).getStringValue();
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid String");
- }
-
- @Override
- public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
- throw new UnsupportedOperationException();
- }
-}
+/*****************************************************************************
+ * 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.converters;
+
+import org.eclipse.e4.ui.css.core.dom.properties.converters.AbstractCSSValueConverter;
+import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.w3c.dom.css.CSSPrimitiveValue;
+import org.w3c.dom.css.CSSValue;
+
+/**
+ * A Converter for String values
+ * Converts a CSS String to a Java String
+ *
+ * @author Camille Letavernier
+ */
+@SuppressWarnings("restriction")
+public class StringConverter extends AbstractCSSValueConverter {
+
+ /**
+ * Constructor
+ */
+ public StringConverter() {
+ super(String.class);
+ }
+
+ @Override
+ public Object convert(CSSValue value, CSSEngine engine, Object context) throws Exception {
+ if (value instanceof CSSPrimitiveValue) {
+ return ((CSSPrimitiveValue) value).getStringValue();
+ }
+ throw new IllegalArgumentException("The value " + value + " is not a valid String");
+ }
+
+ @Override
+ public String convert(Object value, CSSEngine engine, Object context, ICSSValueConverterConfig config) throws Exception {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
index 11782bce56c..b9ea8e97639 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
@@ -1,750 +1,750 @@
-/*****************************************************************************
- * 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 - bugs 461629, 436665
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 462381
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 431940
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.dom;
-
-import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY;
-import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_GMF_CLASS_KEY;
-import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_GMF_ID_KEY;
-import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_GMF_STYLE_KEY;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.e4.ui.css.core.dom.ElementAdapter;
-import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.notation.BasicCompartment;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-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.StringListValueStyle;
-import org.eclipse.gmf.runtime.notation.StringValueStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.SemanticElementHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
-import org.eclipse.papyrus.infra.gmfdiag.common.types.NotationTypesMap;
-import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
-import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSDOMSemanticElementHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView;
-import org.eclipse.papyrus.infra.tools.util.ListHelper;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * An Adapter for providing a CSS support to GMF Objects
- *
- * @author Camille Letavernier
- */
-@SuppressWarnings("restriction")
-public class GMFElementAdapter extends ElementAdapter implements NodeList, IChangeListener, StatefulView, IAdaptable {
-
- /**
- * Non-null, non-empty string, to match "any non-null value" in attribute selectors (e.g. [type])
- */
- public static final String EMPTY_VALUE = " "; // Non-null, non-empty string
-
- /**
- *
- */
- protected static final String KIND = "kind"; //$NON-NLS-1$
-
- public static final String CSS_VALUES_SEPARATOR = " "; //$NON-NLS-1$
-
- public CSSDOMSemanticElementHelper helper;
-
- /**
- * The Semantic Model Element associated to the current styled element
- * Might also be a GMF Diagram
- */
- protected EObject semanticElement;
-
- /**
- * The current GMF Element
- */
- protected View notationElement;
-
- /**
- * The namespace URI of the semanticElement
- */
- protected String namespaceURI;
-
- /**
- * The unqualified name of the semantic Element
- */
- protected String localName;
-
- /**
- * The list of child nodes for this element
- */
- protected Node[] children;
-
- /**
- * The parent node of this element
- */
- protected Node parentNode;
-
- /**
- * A Listener for standard Style properties
- */
- protected Adapter styleListener;
-
- /**
- * A Listener for custom Style properties
- */
- protected CustomStyleListener cssStyleListener;
-
- /**
- * Returns the CSS ID of the selected element.
- *
- * @param sourceElement
- * The source element must be a GMF notation object (View, Style, ...)
- * @return
- * The CSS ID associated to the source element, or null if it cannot be found
- */
- public static String getCSSID(EObject sourceElement) {
- return getCSSValue(sourceElement, CSS_GMF_ID_KEY);
- }
-
- /**
- * Returns the CSS Class of the selected element. If more than one CSS
- * class is associated to the source elements, returns a String containing
- * all classes, separated with spaces.
- *
- * @param sourceElement
- * The source element must be a GMF notation object (View, Style, ...)
- * @return
- * The CSS Class associated to the source element, or null if it cannot be found
- */
- public static String getCSSClass(EObject sourceElement) {
- List<String> allClasses = getCSSValues(sourceElement, CSS_GMF_CLASS_KEY);
- return ListHelper.deepToString(allClasses, " "); //$NON-NLS-1$
- }
-
- /**
- * Returns the source element's local CSS style.
- *
- * @param sourceElement
- * The source element must be a GMF notation object (View, Style, ...)
- * @return
- * the source element's local CSS style.
- */
- public static String getCSSStyle(EObject sourceElement) {
- return getCSSValue(sourceElement, CSS_GMF_STYLE_KEY);
- }
-
- private static String getCSSValue(EObject sourceElement, String key) {
- StringValueStyle style = (StringValueStyle) findStyle(sourceElement, key, NotationPackage.eINSTANCE.getStringValueStyle());
- if (style == null) {
- return null;
- }
-
- return style.getStringValue();
- }
-
- @SuppressWarnings("unchecked")
- private static List<String> getCSSValues(EObject sourceElement, String key) {
- StringListValueStyle style = (StringListValueStyle) findStyle(sourceElement, key, NotationPackage.eINSTANCE.getStringListValueStyle());
- if (style == null) {
- return Collections.emptyList();
- }
-
-
- return style.getStringListValue();
- }
-
- private static NamedStyle findStyle(EObject sourceElement, String key, EClass type) {
- View view = findView(sourceElement);
- if (view == null) {
- return null;
- }
-
- return view.getNamedStyle(type, key);
- }
-
- private static View findView(EObject sourceElement) {
- if (sourceElement == null) {
- return null;
- }
-
- if (sourceElement instanceof View) {
- return (View) sourceElement;
- }
-
- return findView(sourceElement.eContainer());
- }
-
- /**
- * Creates a new GMF Element Adapter for the requested view.
- *
- * @param view
- * The view to be adapted
- * @param engine
- * The associated CSS Engine
- */
- public GMFElementAdapter(View view, ExtendedCSSEngine engine) {
- super(view, engine);
-
- // Bug 431694: Don't instantiate an ElementAdapter for an Orphaned view
- if (view == null || view.getDiagram() == null) {
- throw new IllegalArgumentException("Cannot handle orphaned view : " + view);
- }
-
- notationElement = view;
- helper = CSSDOMSemanticElementHelper.getInstance();
- listenNotationElement();
-
- }
-
- /**
- * I provide adapters for
- *
- * <ul>
- * <li>{@link Diagram} - the diagram containing my {@linkplain #getNotationElement() notation element}</li>
- * </ul>
- */
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (adapter == Diagram.class) {
- return getNotationElement().getDiagram();
- }
- return null;
- }
-
- /**
- * Returns the semantic element associated to this adapter. In case of a diagram,
- * the diagram is itself the semantic element.
- *
- * @return
- * The semantic element associated to this adapter
- */
- public EObject getSemanticElement() {
- if (semanticElement == null) {
- semanticElement = helper.findSemanticElement(notationElement);
- computePseudoInstances();
- listenSemanticElement();
- }
- return semanticElement;
- }
-
- private void computePseudoInstances() {
- if (helper.isFloatingLabel(notationElement)) {
- String humanType = NotationTypesMap.instance.getHumanReadableType(notationElement);
- if (humanType == null) {
- humanType = notationElement.getType();
- }
-
- pseudoInstances.add(normalizeString(humanType));
- }
- }
-
- private Adapter getStyleListener() {
- if (styleListener == null) {
- styleListener = new StyleListener(this);
- }
- return styleListener;
- }
-
- private void listenNotationElement() {
- notationElement.eAdapters().add(getStyleListener());
-
- Collection<String> cssStyles = Arrays.asList(new String[] { CSS_GMF_CLASS_KEY, CSS_GMF_ID_KEY, CSS_GMF_STYLE_KEY, CSS_DIAGRAM_STYLESHEETS_KEY });
-
- notationElement.eAdapters().add(cssStyleListener = new CustomStyleListener(notationElement, this, cssStyles));
- }
-
- ExtendedCSSEngine getEngine() {
- return (ExtendedCSSEngine) engine;
- }
-
- private void listenSemanticElement() {
- // FIXME: The semantic hierarchy is never refresh (children & parentNode)
- if (semanticElement != null) {
- semanticElement.eAdapters().add(getStyleListener());
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * Returns the first parent Notation Element representing a different semantic object
- * than self.
- */
- @Override
- public Node getParentNode() {
- if (parentNode == null) {
- View gmfElement = notationElement;
- while (gmfElement != null) {
- EObject semanticElement = helper.findSemanticElement(gmfElement);
-
- if (semanticElement != this.getSemanticElement()) {
- break;
- }
-
- EObject container = gmfElement.eContainer();
-
- if (gmfElement == container || !(container instanceof View)) {
- gmfElement = null;
- break;
- }
-
- gmfElement = (View) container;
- }
-
- parentNode = engine.getElement(gmfElement);
- if (parentNode == this) {
- return parentNode = null;
- }
- }
-
- return parentNode;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public NodeList getChildNodes() {
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getNamespaceURI() {
- if (namespaceURI == null) {
- namespaceURI = EMFHelper.getQualifiedName(getSemanticElement().eClass().getEPackage(), ".");//$NON-NLS-1$
- }
- return namespaceURI;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getCSSId() {
- return getCSSID(notationElement);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getCSSClass() {
- return getCSSClass(notationElement);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getCSSStyle() {
- return getCSSStyle(notationElement);
- }
-
- /**
- * {@inheritDoc}
- *
- * The local name is either the diagram type (For a Diagram) or the name of the semantic
- * element's metaclass
- */
- @Override
- public String getLocalName() {
- if (localName == null) {
- if (getSemanticElement() instanceof Diagram) {
- Diagram diagram = (Diagram) getSemanticElement();
- String type = diagram.getType();
-
- String humanType = NotationTypesMap.instance.getHumanReadableType(diagram);
- if (humanType != null) {
- localName = humanType;
- } else {
- localName = type;
- }
- } else if (getNotationElement() instanceof BasicCompartment) {
- localName = "Compartment";//$NON-NLS-1$
- } else if (helper.isFloatingLabel(getNotationElement())) {
- localName = "Label";//$NON-NLS-1$
- } else {
- localName = getSemanticElement().eClass().getName();
- }
- }
-
- return localName;
- }
-
- /**
- * {@inheritDoc}
- *
- * The attributes are the semantic's element features
- */
- @Override
- public final String getAttribute(String attr) {
- String value = doGetAttribute(attr);
- if (value != null) {
- return value;
- }
-
- return "";
- }
-
- /**
- * {@inheritDoc}
- *
- * The attributes are the semantic's element features
- *
- * Returns null if the attribute is not known
- */
- protected String doGetAttribute(String attr) {
-
- if (notationElement instanceof DecorationNode) {
- // DecorationNode can be filtered by type (notation::View::type), or by title (From GmfGen model)
- // We add the "kind" attribute which is specific to the CSS (More user-friendly)
- if (KIND.equals(attr)) {
-
- DecorationNode node = (DecorationNode) notationElement;
- String humanType = NotationTypesMap.instance.getHumanReadableType(node);
- if (humanType == null) {
- return node.getType();
- }
- return humanType; // 7017, 7018, 7019 for Attribute/Operation/Classifier compartments
- // TODO: Create a mapping list between GMF ID (Type) and user-readable labels
- }
- }
-
- EStructuralFeature feature = getSemanticElement().eClass().getEStructuralFeature(attr);
-
- if (feature != null) {
- if (feature.isMany()) {
- List<?> values = (List<?>) semanticElement.eGet(feature);
- List<String> cssValues = new LinkedList<String>();
- for (Object value : values) {
- if (value != null) {
- cssValues.add(getCSSValue(feature, value));
- }
- }
- return ListHelper.deepToString(cssValues, CSS_VALUES_SEPARATOR);
- } else {
- Object value = semanticElement.eGet(feature);
- if (value != null) {
- return getCSSValue(feature, value);
- }
- }
- }
-
- return null;
- }
-
- /**
- * Returns the value of the given feature as a formatted String (Valid w.r.t CSS Syntax)
- * Used by {@link #doGetAttribute(String)}
- *
- * Return null if the feature is not supported or the value cannot be converted to a String
- *
- * @param feature
- * @param value
- * @return
- */
- protected String getCSSValue(EStructuralFeature feature, Object value) {
- if (value == null) {
- return null;
- }
-
- if (feature instanceof EReference && value instanceof ENamedElement) {
- String name = ((ENamedElement) value).getName();
- return name == null || name.isEmpty() ? EMPTY_VALUE : name; // Bug 467716: Never return null if the value is not null
- }
-
- // Standard case. For EObject values, it might be better to return null than a random label...
- return value.toString();
- }
-
- /**
- * {@inheritDoc}
- *
- * Returns the GMF EObject handled by this adapter
- */
- @Override
- public EObject getNativeWidget() {
- return notationElement;
- }
-
-
-
- // ///////////
- // Node List//
- // ///////////
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Node item(int index) {
- return getChildren()[index];
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getLength() {
- return getChildren().length;
- }
-
- protected Node[] getChildren() {
- if (children == null) {
- children = computeChildren(notationElement, engine);
- }
-
- return children;
- }
-
- /**
- * Returns the list of notation child elements attached to semantic
- * elements different than self's semantic element.
- *
- * If a notation child element represents the same semantic element
- * than self, returns its own children (Recursively).
- */
- protected Node[] computeChildren(View notationElement, CSSEngine engine) {
- EObject semanticElement = helper.findSemanticElement(notationElement);
- List<Node> childList = new LinkedList<Node>();
- for (EObject child : notationElement.eContents()) {
- if (child instanceof View) {
- View notationChild = (View) child;
- if (SemanticElementHelper.findSemanticElement(notationChild) != semanticElement) {
- childList.add(engine.getElement(notationChild));
- } else {
- // This is the same semantic element (e.g. label). Compute indirect children, if any
- childList.addAll(Arrays.asList(computeChildren(notationChild, engine)));
- }
- }
- }
-
- /*
- * <--------------------
- *
- * //Allows both notations Class > Property and Class > Compartment > Property
- *
- * //FIXME: The Tree is computed through "getParentNode". "getChildren" is barely used. Moreover,
- * //there is a mapping between Notation element and DOM element, which makes it impossible to associate the same
- * //notation element to different DOM elements.
- *
- * // for(EObject child : notationElement.eContents()) {
- * // if(child instanceof BasicCompartment) {
- * // //Add the Compartment's children to this' children
- * // childList.addAll(Arrays.asList(computeChildren((View)child, engine)));
- * // }
- * // }
- *
- * -------------------->
- */
-
- return childList.toArray(new Node[childList.size()]);
- }
-
- // ////////////////////
- // Handle events //
- // ////////////////////
-
-
- /**
- * The GMF View element associated to this adapter
- *
- * @return
- * The GMF View element associated to this adapter
- */
- public View getNotationElement() {
- return notationElement;
- }
-
- /**
- * Handles a notification for semantic element change.
- * Source: styleListener
- */
- public void semanticElementChanged() {
- if (semanticElement != null && semanticElement != notationElement) {
- semanticElement.eAdapters().remove(styleListener);
- semanticElement = null;
- }
-
- localName = null;
- parentNode = null;
- namespaceURI = null;
- children = null;
- getEngine().notifyChange(this);
- }
-
- /**
- * Handles a notification for change in notation view containment.
- * <p>
- * Source: styleListener
- * </p>
- */
- public void childrenChanged() {
- if (children != null) {
- children = null;
- getEngine().notifyChange(this);
- }
- }
-
- /**
- * Handles a notification for change in notation view containment.
- * <p>
- * Source: styleListener
- * </p>
- */
- public void parentChanged() {
- if (parentNode != null) {
- parentNode = null;
- getEngine().notifyChange(this);
- }
- }
-
- /**
- * Handles a notification for Custom style change.
- * Source: cssStyleListener
- */
- // Change incoming from one of the cssCustomStyles (class, id, local style or diagram stylesheets)
- @Override
- public void handleChange(ChangeEvent event) {
- if (notationElement instanceof CSSDiagram) {
- // TODO: Use a finer grained event (We should reset only when the
- // change occurs on a DiagramStyleSheet)
- getEngine().reset();
- }
-
- // Notify the CSS Engine
- getEngine().notifyChange(this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- super.dispose();
- notationElement.eAdapters().remove(cssStyleListener);
- cssStyleListener.dispose();
-
- notationElement.eAdapters().remove(styleListener);
-
- if (semanticElement != null) {
- semanticElement.eAdapters().remove(styleListener);
- }
- }
-
- /**
- * Handles a notification for notation property change
- * Source : styleListener
- */
- public void notationPropertyChanged() {
- // Notify the CSSEngine
- getEngine().notifyChange(this);
- }
-
- /**
- * Handles a notification for semantic property change
- * Source : styleListener
- */
- public void semanticPropertyChanged() {
- // Notify the CSSEngine
- getEngine().notifyChange(this);
- }
-
- /**
- * Handles a notification for notation element disposed
- * Source : styleListener
- */
- public void notationElementDisposed() {
- dispose();
- // Notify the CSSEngine
- getEngine().handleDispose(notationElement);
- }
-
- private final Set<String> pseudoInstances = new HashSet<String>();
-
- private String normalizeString(String string) {
- return string.toUpperCase().toLowerCase();
- }
-
- @Override
- public boolean isPseudoInstanceOf(String pseudo) {
- return pseudoInstances.contains(normalizeString(pseudo));
- }
-
-
- // The following methods (Static pseudo instances) are not supported.
-
- @Override
- public void addStaticPseudoInstance(String pseudo) {
- // Disable the super implementation. Static pseudo instances are not supported.
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String[] getStaticPseudoInstances() {
- return new String[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView#addStates(java.util.Set)
- */
- @Override
- public void addStates(Set<String> states) {
- for (String state : states) {
- this.pseudoInstances.add(normalizeString(state));
- }
- getEngine().notifyChange(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView#removeStates(java.util.Set)
- */
- @Override
- public void removeStates(Set<String> states) {
- for (String state : states) {
- this.pseudoInstances.remove(normalizeString(state));
- }
- getEngine().notifyChange(this);
- }
-
- @Override
- public Set<String> getStates() {
- return pseudoInstances;
- }
-}
+/*****************************************************************************
+ * 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 - bugs 461629, 436665
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 462381
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 431940
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.dom;
+
+import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY;
+import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_GMF_CLASS_KEY;
+import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_GMF_ID_KEY;
+import static org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_GMF_STYLE_KEY;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.e4.ui.css.core.dom.ElementAdapter;
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+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.StringListValueStyle;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.SemanticElementHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
+import org.eclipse.papyrus.infra.gmfdiag.common.types.NotationTypesMap;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSDOMSemanticElementHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView;
+import org.eclipse.papyrus.infra.tools.util.ListHelper;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * An Adapter for providing a CSS support to GMF Objects
+ *
+ * @author Camille Letavernier
+ */
+@SuppressWarnings("restriction")
+public class GMFElementAdapter extends ElementAdapter implements NodeList, IChangeListener, StatefulView, IAdaptable {
+
+ /**
+ * Non-null, non-empty string, to match "any non-null value" in attribute selectors (e.g. [type])
+ */
+ public static final String EMPTY_VALUE = " "; // Non-null, non-empty string
+
+ /**
+ *
+ */
+ protected static final String KIND = "kind"; //$NON-NLS-1$
+
+ public static final String CSS_VALUES_SEPARATOR = " "; //$NON-NLS-1$
+
+ public CSSDOMSemanticElementHelper helper;
+
+ /**
+ * The Semantic Model Element associated to the current styled element
+ * Might also be a GMF Diagram
+ */
+ protected EObject semanticElement;
+
+ /**
+ * The current GMF Element
+ */
+ protected View notationElement;
+
+ /**
+ * The namespace URI of the semanticElement
+ */
+ protected String namespaceURI;
+
+ /**
+ * The unqualified name of the semantic Element
+ */
+ protected String localName;
+
+ /**
+ * The list of child nodes for this element
+ */
+ protected Node[] children;
+
+ /**
+ * The parent node of this element
+ */
+ protected Node parentNode;
+
+ /**
+ * A Listener for standard Style properties
+ */
+ protected Adapter styleListener;
+
+ /**
+ * A Listener for custom Style properties
+ */
+ protected CustomStyleListener cssStyleListener;
+
+ /**
+ * Returns the CSS ID of the selected element.
+ *
+ * @param sourceElement
+ * The source element must be a GMF notation object (View, Style, ...)
+ * @return
+ * The CSS ID associated to the source element, or null if it cannot be found
+ */
+ public static String getCSSID(EObject sourceElement) {
+ return getCSSValue(sourceElement, CSS_GMF_ID_KEY);
+ }
+
+ /**
+ * Returns the CSS Class of the selected element. If more than one CSS
+ * class is associated to the source elements, returns a String containing
+ * all classes, separated with spaces.
+ *
+ * @param sourceElement
+ * The source element must be a GMF notation object (View, Style, ...)
+ * @return
+ * The CSS Class associated to the source element, or null if it cannot be found
+ */
+ public static String getCSSClass(EObject sourceElement) {
+ List<String> allClasses = getCSSValues(sourceElement, CSS_GMF_CLASS_KEY);
+ return ListHelper.deepToString(allClasses, " "); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the source element's local CSS style.
+ *
+ * @param sourceElement
+ * The source element must be a GMF notation object (View, Style, ...)
+ * @return
+ * the source element's local CSS style.
+ */
+ public static String getCSSStyle(EObject sourceElement) {
+ return getCSSValue(sourceElement, CSS_GMF_STYLE_KEY);
+ }
+
+ private static String getCSSValue(EObject sourceElement, String key) {
+ StringValueStyle style = (StringValueStyle) findStyle(sourceElement, key, NotationPackage.eINSTANCE.getStringValueStyle());
+ if (style == null) {
+ return null;
+ }
+
+ return style.getStringValue();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static List<String> getCSSValues(EObject sourceElement, String key) {
+ StringListValueStyle style = (StringListValueStyle) findStyle(sourceElement, key, NotationPackage.eINSTANCE.getStringListValueStyle());
+ if (style == null) {
+ return Collections.emptyList();
+ }
+
+
+ return style.getStringListValue();
+ }
+
+ private static NamedStyle findStyle(EObject sourceElement, String key, EClass type) {
+ View view = findView(sourceElement);
+ if (view == null) {
+ return null;
+ }
+
+ return view.getNamedStyle(type, key);
+ }
+
+ private static View findView(EObject sourceElement) {
+ if (sourceElement == null) {
+ return null;
+ }
+
+ if (sourceElement instanceof View) {
+ return (View) sourceElement;
+ }
+
+ return findView(sourceElement.eContainer());
+ }
+
+ /**
+ * Creates a new GMF Element Adapter for the requested view.
+ *
+ * @param view
+ * The view to be adapted
+ * @param engine
+ * The associated CSS Engine
+ */
+ public GMFElementAdapter(View view, ExtendedCSSEngine engine) {
+ super(view, engine);
+
+ // Bug 431694: Don't instantiate an ElementAdapter for an Orphaned view
+ if (view == null || view.getDiagram() == null) {
+ throw new IllegalArgumentException("Cannot handle orphaned view : " + view);
+ }
+
+ notationElement = view;
+ helper = CSSDOMSemanticElementHelper.getInstance();
+ listenNotationElement();
+
+ }
+
+ /**
+ * I provide adapters for
+ *
+ * <ul>
+ * <li>{@link Diagram} - the diagram containing my {@linkplain #getNotationElement() notation element}</li>
+ * </ul>
+ */
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if (adapter == Diagram.class) {
+ return getNotationElement().getDiagram();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the semantic element associated to this adapter. In case of a diagram,
+ * the diagram is itself the semantic element.
+ *
+ * @return
+ * The semantic element associated to this adapter
+ */
+ public EObject getSemanticElement() {
+ if (semanticElement == null) {
+ semanticElement = helper.findSemanticElement(notationElement);
+ computePseudoInstances();
+ listenSemanticElement();
+ }
+ return semanticElement;
+ }
+
+ private void computePseudoInstances() {
+ if (helper.isFloatingLabel(notationElement)) {
+ String humanType = NotationTypesMap.instance.getHumanReadableType(notationElement);
+ if (humanType == null) {
+ humanType = notationElement.getType();
+ }
+
+ pseudoInstances.add(normalizeString(humanType));
+ }
+ }
+
+ private Adapter getStyleListener() {
+ if (styleListener == null) {
+ styleListener = new StyleListener(this);
+ }
+ return styleListener;
+ }
+
+ private void listenNotationElement() {
+ notationElement.eAdapters().add(getStyleListener());
+
+ Collection<String> cssStyles = Arrays.asList(new String[] { CSS_GMF_CLASS_KEY, CSS_GMF_ID_KEY, CSS_GMF_STYLE_KEY, CSS_DIAGRAM_STYLESHEETS_KEY });
+
+ notationElement.eAdapters().add(cssStyleListener = new CustomStyleListener(notationElement, this, cssStyles));
+ }
+
+ ExtendedCSSEngine getEngine() {
+ return (ExtendedCSSEngine) engine;
+ }
+
+ private void listenSemanticElement() {
+ // FIXME: The semantic hierarchy is never refresh (children & parentNode)
+ if (semanticElement != null) {
+ semanticElement.eAdapters().add(getStyleListener());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns the first parent Notation Element representing a different semantic object
+ * than self.
+ */
+ @Override
+ public Node getParentNode() {
+ if (parentNode == null) {
+ View gmfElement = notationElement;
+ while (gmfElement != null) {
+ EObject semanticElement = helper.findSemanticElement(gmfElement);
+
+ if (semanticElement != this.getSemanticElement()) {
+ break;
+ }
+
+ EObject container = gmfElement.eContainer();
+
+ if (gmfElement == container || !(container instanceof View)) {
+ gmfElement = null;
+ break;
+ }
+
+ gmfElement = (View) container;
+ }
+
+ parentNode = engine.getElement(gmfElement);
+ if (parentNode == this) {
+ return parentNode = null;
+ }
+ }
+
+ return parentNode;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NodeList getChildNodes() {
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNamespaceURI() {
+ if (namespaceURI == null) {
+ namespaceURI = EMFHelper.getQualifiedName(getSemanticElement().eClass().getEPackage(), ".");//$NON-NLS-1$
+ }
+ return namespaceURI;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getCSSId() {
+ return getCSSID(notationElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getCSSClass() {
+ return getCSSClass(notationElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getCSSStyle() {
+ return getCSSStyle(notationElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The local name is either the diagram type (For a Diagram) or the name of the semantic
+ * element's metaclass
+ */
+ @Override
+ public String getLocalName() {
+ if (localName == null) {
+ if (getSemanticElement() instanceof Diagram) {
+ Diagram diagram = (Diagram) getSemanticElement();
+ String type = diagram.getType();
+
+ String humanType = NotationTypesMap.instance.getHumanReadableType(diagram);
+ if (humanType != null) {
+ localName = humanType;
+ } else {
+ localName = type;
+ }
+ } else if (getNotationElement() instanceof BasicCompartment) {
+ localName = "Compartment";//$NON-NLS-1$
+ } else if (helper.isFloatingLabel(getNotationElement())) {
+ localName = "Label";//$NON-NLS-1$
+ } else {
+ localName = getSemanticElement().eClass().getName();
+ }
+ }
+
+ return localName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The attributes are the semantic's element features
+ */
+ @Override
+ public final String getAttribute(String attr) {
+ String value = doGetAttribute(attr);
+ if (value != null) {
+ return value;
+ }
+
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The attributes are the semantic's element features
+ *
+ * Returns null if the attribute is not known
+ */
+ protected String doGetAttribute(String attr) {
+
+ if (notationElement instanceof DecorationNode) {
+ // DecorationNode can be filtered by type (notation::View::type), or by title (From GmfGen model)
+ // We add the "kind" attribute which is specific to the CSS (More user-friendly)
+ if (KIND.equals(attr)) {
+
+ DecorationNode node = (DecorationNode) notationElement;
+ String humanType = NotationTypesMap.instance.getHumanReadableType(node);
+ if (humanType == null) {
+ return node.getType();
+ }
+ return humanType; // 7017, 7018, 7019 for Attribute/Operation/Classifier compartments
+ // TODO: Create a mapping list between GMF ID (Type) and user-readable labels
+ }
+ }
+
+ EStructuralFeature feature = getSemanticElement().eClass().getEStructuralFeature(attr);
+
+ if (feature != null) {
+ if (feature.isMany()) {
+ List<?> values = (List<?>) semanticElement.eGet(feature);
+ List<String> cssValues = new LinkedList<String>();
+ for (Object value : values) {
+ if (value != null) {
+ cssValues.add(getCSSValue(feature, value));
+ }
+ }
+ return ListHelper.deepToString(cssValues, CSS_VALUES_SEPARATOR);
+ } else {
+ Object value = semanticElement.eGet(feature);
+ if (value != null) {
+ return getCSSValue(feature, value);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the value of the given feature as a formatted String (Valid w.r.t CSS Syntax)
+ * Used by {@link #doGetAttribute(String)}
+ *
+ * Return null if the feature is not supported or the value cannot be converted to a String
+ *
+ * @param feature
+ * @param value
+ * @return
+ */
+ protected String getCSSValue(EStructuralFeature feature, Object value) {
+ if (value == null) {
+ return null;
+ }
+
+ if (feature instanceof EReference && value instanceof ENamedElement) {
+ String name = ((ENamedElement) value).getName();
+ return name == null || name.isEmpty() ? EMPTY_VALUE : name; // Bug 467716: Never return null if the value is not null
+ }
+
+ // Standard case. For EObject values, it might be better to return null than a random label...
+ return value.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns the GMF EObject handled by this adapter
+ */
+ @Override
+ public EObject getNativeWidget() {
+ return notationElement;
+ }
+
+
+
+ // ///////////
+ // Node List//
+ // ///////////
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Node item(int index) {
+ return getChildren()[index];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getLength() {
+ return getChildren().length;
+ }
+
+ protected Node[] getChildren() {
+ if (children == null) {
+ children = computeChildren(notationElement, engine);
+ }
+
+ return children;
+ }
+
+ /**
+ * Returns the list of notation child elements attached to semantic
+ * elements different than self's semantic element.
+ *
+ * If a notation child element represents the same semantic element
+ * than self, returns its own children (Recursively).
+ */
+ protected Node[] computeChildren(View notationElement, CSSEngine engine) {
+ EObject semanticElement = helper.findSemanticElement(notationElement);
+ List<Node> childList = new LinkedList<Node>();
+ for (EObject child : notationElement.eContents()) {
+ if (child instanceof View) {
+ View notationChild = (View) child;
+ if (SemanticElementHelper.findSemanticElement(notationChild) != semanticElement) {
+ childList.add(engine.getElement(notationChild));
+ } else {
+ // This is the same semantic element (e.g. label). Compute indirect children, if any
+ childList.addAll(Arrays.asList(computeChildren(notationChild, engine)));
+ }
+ }
+ }
+
+ /*
+ * <--------------------
+ *
+ * //Allows both notations Class > Property and Class > Compartment > Property
+ *
+ * //FIXME: The Tree is computed through "getParentNode". "getChildren" is barely used. Moreover,
+ * //there is a mapping between Notation element and DOM element, which makes it impossible to associate the same
+ * //notation element to different DOM elements.
+ *
+ * // for(EObject child : notationElement.eContents()) {
+ * // if(child instanceof BasicCompartment) {
+ * // //Add the Compartment's children to this' children
+ * // childList.addAll(Arrays.asList(computeChildren((View)child, engine)));
+ * // }
+ * // }
+ *
+ * -------------------->
+ */
+
+ return childList.toArray(new Node[childList.size()]);
+ }
+
+ // ////////////////////
+ // Handle events //
+ // ////////////////////
+
+
+ /**
+ * The GMF View element associated to this adapter
+ *
+ * @return
+ * The GMF View element associated to this adapter
+ */
+ public View getNotationElement() {
+ return notationElement;
+ }
+
+ /**
+ * Handles a notification for semantic element change.
+ * Source: styleListener
+ */
+ public void semanticElementChanged() {
+ if (semanticElement != null && semanticElement != notationElement) {
+ semanticElement.eAdapters().remove(styleListener);
+ semanticElement = null;
+ }
+
+ localName = null;
+ parentNode = null;
+ namespaceURI = null;
+ children = null;
+ getEngine().notifyChange(this);
+ }
+
+ /**
+ * Handles a notification for change in notation view containment.
+ * <p>
+ * Source: styleListener
+ * </p>
+ */
+ public void childrenChanged() {
+ if (children != null) {
+ children = null;
+ getEngine().notifyChange(this);
+ }
+ }
+
+ /**
+ * Handles a notification for change in notation view containment.
+ * <p>
+ * Source: styleListener
+ * </p>
+ */
+ public void parentChanged() {
+ if (parentNode != null) {
+ parentNode = null;
+ getEngine().notifyChange(this);
+ }
+ }
+
+ /**
+ * Handles a notification for Custom style change.
+ * Source: cssStyleListener
+ */
+ // Change incoming from one of the cssCustomStyles (class, id, local style or diagram stylesheets)
+ @Override
+ public void handleChange(ChangeEvent event) {
+ if (notationElement instanceof CSSDiagram) {
+ // TODO: Use a finer grained event (We should reset only when the
+ // change occurs on a DiagramStyleSheet)
+ getEngine().reset();
+ }
+
+ // Notify the CSS Engine
+ getEngine().notifyChange(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ notationElement.eAdapters().remove(cssStyleListener);
+ cssStyleListener.dispose();
+
+ notationElement.eAdapters().remove(styleListener);
+
+ if (semanticElement != null) {
+ semanticElement.eAdapters().remove(styleListener);
+ }
+ }
+
+ /**
+ * Handles a notification for notation property change
+ * Source : styleListener
+ */
+ public void notationPropertyChanged() {
+ // Notify the CSSEngine
+ getEngine().notifyChange(this);
+ }
+
+ /**
+ * Handles a notification for semantic property change
+ * Source : styleListener
+ */
+ public void semanticPropertyChanged() {
+ // Notify the CSSEngine
+ getEngine().notifyChange(this);
+ }
+
+ /**
+ * Handles a notification for notation element disposed
+ * Source : styleListener
+ */
+ public void notationElementDisposed() {
+ dispose();
+ // Notify the CSSEngine
+ getEngine().handleDispose(notationElement);
+ }
+
+ private final Set<String> pseudoInstances = new HashSet<String>();
+
+ private String normalizeString(String string) {
+ return string.toUpperCase().toLowerCase();
+ }
+
+ @Override
+ public boolean isPseudoInstanceOf(String pseudo) {
+ return pseudoInstances.contains(normalizeString(pseudo));
+ }
+
+
+ // The following methods (Static pseudo instances) are not supported.
+
+ @Override
+ public void addStaticPseudoInstance(String pseudo) {
+ // Disable the super implementation. Static pseudo instances are not supported.
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String[] getStaticPseudoInstances() {
+ return new String[0];
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView#addStates(java.util.Set)
+ */
+ @Override
+ public void addStates(Set<String> states) {
+ for (String state : states) {
+ this.pseudoInstances.add(normalizeString(state));
+ }
+ getEngine().notifyChange(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView#removeStates(java.util.Set)
+ */
+ @Override
+ public void removeStates(Set<String> states) {
+ for (String state : states) {
+ this.pseudoInstances.remove(normalizeString(state));
+ }
+ getEngine().notifyChange(this);
+ }
+
+ @Override
+ public Set<String> getStates() {
+ return pseudoInstances;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java
index 007fed032a4..ea9f7089131 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java
@@ -1,176 +1,176 @@
-/*****************************************************************************
- * 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 - bugs 461629, 436665
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.dom;
-
-import java.util.Collection;
-import java.util.stream.Stream;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations;
-
-/**
- * A Listener for notation and semantic properties changes
- *
- * @author Camille Letavernier
- */
-public class StyleListener extends AdapterImpl {
-
- private final GMFElementAdapter elementAdapter;
-
- /**
- * Constructor
- *
- * @param elementAdapter
- * The GMFElementAdapter to listen to
- */
- public StyleListener(GMFElementAdapter elementAdapter) {
- this.elementAdapter = elementAdapter;
- }
-
- @Override
- public void notifyChanged(Notification notification) {
- if (notification.isTouch()) {
- return;
- }
-
- if (notification.getFeature() == NotationPackage.eINSTANCE.getView_Element()) {
- if (notification.getNewValue() == null) {
- elementAdapter.notationElementDisposed();
- } else {
- elementAdapter.semanticElementChanged();
- }
- return;
- }
-
- if (notification.getNotifier() == elementAdapter.getNotationElement()) {
- if (shouldPropagateNotationEvent(notification)) {
- elementAdapter.notationPropertyChanged();
- }
-
- // Handle view containment changes
- if (notification.getFeature() instanceof EReference) {
- EReference reference = (EReference) notification.getFeature();
- if (reference.getEContainingClass() == NotationPackage.Literals.VIEW) {
- switch (notification.getFeatureID(View.class)) {
- case NotationPackage.VIEW__PERSISTED_CHILDREN:
- case NotationPackage.VIEW__TRANSIENT_CHILDREN:
- elementAdapter.childrenChanged();
-
- Stream<?> changedViews;
- switch (notification.getEventType()) {
- case Notification.ADD:
- changedViews = Stream.of(notification.getNewValue());
- break;
- case Notification.ADD_MANY:
- changedViews = ((Collection<?>) notification.getNewValue()).stream();
- break;
- case Notification.REMOVE:
- changedViews = Stream.of(notification.getOldValue());
- break;
- case Notification.REMOVE_MANY:
- changedViews = ((Collection<?>) notification.getOldValue()).stream();
- break;
- case Notification.SET:
- changedViews = Stream.of(notification.getNewValue(), notification.getOldValue());
- break;
- default:
- // Shouldn't be here
- changedViews = Stream.empty();
- break;
- }
- changedViews
- .map(View.class::cast)
- .map(elementAdapter.getEngine()::getElement)
- .filter(GMFElementAdapter.class::isInstance)
- .map(GMFElementAdapter.class::cast)
- .forEach(GMFElementAdapter::parentChanged);
-
- break;
- }
- }
- }
-
- return;
- }
-
- if (notification.getNotifier() == elementAdapter.getSemanticElement()) {
- elementAdapter.semanticPropertyChanged();
- return;
- }
- }
-
- /**
- * Queries whether a {@code notification} from the notation model should be propagated to my element adapter.
- * The default implementation propagates all but
- * <ul>
- * <li>changes to the {@link NotationPackage.Literals#VIEW__MUTABLE View::mutable} attribute</li>
- * <li>addition of or changes to the {@linkplain CSSAnnotations#CSS_FORCE_VALUE force-value} annotation</li>
- * </ul>
- *
- * @param notification
- * a notification from the notation model
- * @return whether it should be propagated
- */
- protected boolean shouldPropagateNotationEvent(Notification notification) {
- boolean result = notification.getFeature() != NotationPackage.Literals.VIEW__MUTABLE;
-
- if (result) {
- if (notification.getFeature() == EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS) {
- // We never add/remove multiple annotations nor do we use SET to replace them.
- // However, if we did, all that would happen is an unnecessary refresh
- switch (notification.getEventType()) {
- case Notification.ADD:
- result = !CSSAnnotations.CSS_FORCE_VALUE.equals(((EAnnotation) notification.getNewValue()).getSource());
- break;
- case Notification.REMOVE:
- result = !CSSAnnotations.CSS_FORCE_VALUE.equals(((EAnnotation) notification.getOldValue()).getSource());
- break;
- }
- }
- }
-
- return result;
- }
-
- private String getEventType(Notification notification) {
- switch (notification.getEventType())
- {
- case Notification.SET:
- return ("SET");
- case Notification.UNSET:
- return ("UNSET");
- case Notification.ADD:
- return ("ADD");
- case Notification.ADD_MANY:
- return ("ADD_MANY");
- case Notification.REMOVE:
- return ("REMOVE");
- case Notification.REMOVE_MANY:
- return ("REMOVE_MANY");
- case Notification.MOVE:
- return ("MOVE");
- case Notification.REMOVING_ADAPTER:
- return ("REMOVING_ADAPTER");
- case Notification.RESOLVE:
- return ("RESOLVE");
- default:
- return Integer.toString(notification.getEventType());
- }
- }
-}
+/*****************************************************************************
+ * 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 - bugs 461629, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.dom;
+
+import java.util.Collection;
+import java.util.stream.Stream;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations;
+
+/**
+ * A Listener for notation and semantic properties changes
+ *
+ * @author Camille Letavernier
+ */
+public class StyleListener extends AdapterImpl {
+
+ private final GMFElementAdapter elementAdapter;
+
+ /**
+ * Constructor
+ *
+ * @param elementAdapter
+ * The GMFElementAdapter to listen to
+ */
+ public StyleListener(GMFElementAdapter elementAdapter) {
+ this.elementAdapter = elementAdapter;
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.isTouch()) {
+ return;
+ }
+
+ if (notification.getFeature() == NotationPackage.eINSTANCE.getView_Element()) {
+ if (notification.getNewValue() == null) {
+ elementAdapter.notationElementDisposed();
+ } else {
+ elementAdapter.semanticElementChanged();
+ }
+ return;
+ }
+
+ if (notification.getNotifier() == elementAdapter.getNotationElement()) {
+ if (shouldPropagateNotationEvent(notification)) {
+ elementAdapter.notationPropertyChanged();
+ }
+
+ // Handle view containment changes
+ if (notification.getFeature() instanceof EReference) {
+ EReference reference = (EReference) notification.getFeature();
+ if (reference.getEContainingClass() == NotationPackage.Literals.VIEW) {
+ switch (notification.getFeatureID(View.class)) {
+ case NotationPackage.VIEW__PERSISTED_CHILDREN:
+ case NotationPackage.VIEW__TRANSIENT_CHILDREN:
+ elementAdapter.childrenChanged();
+
+ Stream<?> changedViews;
+ switch (notification.getEventType()) {
+ case Notification.ADD:
+ changedViews = Stream.of(notification.getNewValue());
+ break;
+ case Notification.ADD_MANY:
+ changedViews = ((Collection<?>) notification.getNewValue()).stream();
+ break;
+ case Notification.REMOVE:
+ changedViews = Stream.of(notification.getOldValue());
+ break;
+ case Notification.REMOVE_MANY:
+ changedViews = ((Collection<?>) notification.getOldValue()).stream();
+ break;
+ case Notification.SET:
+ changedViews = Stream.of(notification.getNewValue(), notification.getOldValue());
+ break;
+ default:
+ // Shouldn't be here
+ changedViews = Stream.empty();
+ break;
+ }
+ changedViews
+ .map(View.class::cast)
+ .map(elementAdapter.getEngine()::getElement)
+ .filter(GMFElementAdapter.class::isInstance)
+ .map(GMFElementAdapter.class::cast)
+ .forEach(GMFElementAdapter::parentChanged);
+
+ break;
+ }
+ }
+ }
+
+ return;
+ }
+
+ if (notification.getNotifier() == elementAdapter.getSemanticElement()) {
+ elementAdapter.semanticPropertyChanged();
+ return;
+ }
+ }
+
+ /**
+ * Queries whether a {@code notification} from the notation model should be propagated to my element adapter.
+ * The default implementation propagates all but
+ * <ul>
+ * <li>changes to the {@link NotationPackage.Literals#VIEW__MUTABLE View::mutable} attribute</li>
+ * <li>addition of or changes to the {@linkplain CSSAnnotations#CSS_FORCE_VALUE force-value} annotation</li>
+ * </ul>
+ *
+ * @param notification
+ * a notification from the notation model
+ * @return whether it should be propagated
+ */
+ protected boolean shouldPropagateNotationEvent(Notification notification) {
+ boolean result = notification.getFeature() != NotationPackage.Literals.VIEW__MUTABLE;
+
+ if (result) {
+ if (notification.getFeature() == EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS) {
+ // We never add/remove multiple annotations nor do we use SET to replace them.
+ // However, if we did, all that would happen is an unnecessary refresh
+ switch (notification.getEventType()) {
+ case Notification.ADD:
+ result = !CSSAnnotations.CSS_FORCE_VALUE.equals(((EAnnotation) notification.getNewValue()).getSource());
+ break;
+ case Notification.REMOVE:
+ result = !CSSAnnotations.CSS_FORCE_VALUE.equals(((EAnnotation) notification.getOldValue()).getSource());
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private String getEventType(Notification notification) {
+ switch (notification.getEventType())
+ {
+ case Notification.SET:
+ return ("SET");
+ case Notification.UNSET:
+ return ("UNSET");
+ case Notification.ADD:
+ return ("ADD");
+ case Notification.ADD_MANY:
+ return ("ADD_MANY");
+ case Notification.REMOVE:
+ return ("REMOVE");
+ case Notification.REMOVE_MANY:
+ return ("REMOVE_MANY");
+ case Notification.MOVE:
+ return ("MOVE");
+ case Notification.REMOVING_ADAPTER:
+ return ("REMOVING_ADAPTER");
+ case Notification.RESOLVE:
+ return ("RESOLVE");
+ default:
+ return Integer.toString(notification.getEventType());
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicy.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicy.java
index dc50d7ca152..881da8ac5dc 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicy.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicy.java
@@ -1,256 +1,256 @@
-/*****************************************************************************
- * 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.editpolicies;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.draw2d.FocusEvent;
-import org.eclipse.draw2d.FocusListener;
-import org.eclipse.draw2d.MouseEvent;
-import org.eclipse.draw2d.MouseMotionListener;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartListener;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.editpolicies.AbstractEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView;
-import org.w3c.dom.Element;
-
-/**
- * An EditPolicy to handle events on EditParts
- *
- * @author Camille Letavernier
- * @see StatefulView