diff options
author | Mickael ADAM | 2016-03-16 14:49:43 +0000 |
---|---|---|
committer | Mickael ADAM | 2016-09-01 09:55:09 +0000 |
commit | 75ecec82c71fc8aa66cca8eb69e9af6826d1fdfb (patch) | |
tree | 590f763976234be004160837806de13410011579 /plugins/uml/org.eclipse.papyrus.uml.types.core | |
parent | 54b12e645d111ca4f66fef2c512ac53ecfbfc0eb (diff) | |
download | org.eclipse.papyrus-75ecec82c71fc8aa66cca8eb69e9af6826d1fdfb.tar.gz org.eclipse.papyrus-75ecec82c71fc8aa66cca8eb69e9af6826d1fdfb.tar.xz org.eclipse.papyrus-75ecec82c71fc8aa66cca8eb69e9af6826d1fdfb.zip |
Bug 482669 - [Palette] New Palette configuration models shall be
editable with an advance UI
https://bugs.eclipse.org/bugs/show_bug.cgi?id=482669
Patch set 27:
- rebase & maj dependency version
Patch set 25:
- Fix dependency version
Patch set 24:
- update version to 3.0.0 or 2.1
- take into account of new elemntType version (no more Ids)
- refactor ProdileWSModelIndexer to use URI
Patch set 23:
- rebase
- remove CustomElmtTypeFactory
Patch set 20:
- Fix missing id in manual created advices
Patch set 17:
- Fix bugs from NiF review
patch set 16:
- Fix a bug of drag a stereotype then a metaclass => NPE
patch set 16:
- fix ProfileWorkspaceModelIndex
- add shouldIndex(IFile file) to IndexHandler
patch set 15:
- fix a build.properties
Patch set 14:
- some minors fixes
Patch set 13:
- Finalize properties view for actions
- implements validators.
- Adds plugins to oep.customization.feature
Patch set 12:
- implement properties view for SetValue Advice, SetStereotype and
Runtime advice.
- new Explorer dialog(Stereotype, Profile, GenericElement)
-...
Patch set 11:
- final implementation of apply stereotype action properties view
- fix feedback from NIF previous review.
- fix enable button of generic multipleValueEditor
- Styled text for stereotype explorer
- add profile explorer
- add stereotype attribute explorer
- many fixes
Patch set 10:
- Move created plugin in customization feature
Patch set 9:
-Fix pom dependencies
Patch set 8:
- implementation of property view for StereotypesToAplly of Action.
- create a Icon Value editor instead of IconDescriptor
- Create stereotype selection dialog which display all available
stereotype
- Create Profile workspace indexer
Patch set X:
- create StringWithClear Editor
- rename property plugin
- remove assistant and newChild implementation for palette
- use of icon 12*12 from oep.infr.widget
Patch set 5:
- Fix pom file
Patch set 4:
- inlude all changes from palette customization branch
Patch set 3:
- Adds clear filter button for icon explorer.
- Adds some newChild management requirement.
Patch set 2:
- Gets all declared advice kind in add actions.
- Adds icon+description to AdviceKindExtensionPoint.
- Adds createAdviceBindingConfiguration to
AbstractAdviceBindingFactory.
- Gets default actions EMF properties view when no View defined in ctx
- Manage action buttons enable.
Patch set 1:
- Adds actions management
- Adds properties View for adviceConfiguration
- Adds ctrl+clic to create old local palette
Conflicts:
plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
Change-Id: I1f5caeb9eb411df2886f29ae02d807bb69b79be2
Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/uml/org.eclipse.papyrus.uml.types.core')
7 files changed, 316 insertions, 253 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/Stereotype.gif b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/Stereotype.gif Binary files differindex b7ae8706f73..145e5d589d8 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/Stereotype.gif +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/Stereotype.gif diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/ConstantValue.gif b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/ConstantValue.gif Binary files differindex e4bc22dd17e..051f515d5a9 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/ConstantValue.gif +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/ConstantValue.gif diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/FeatureToSet.gif b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/FeatureToSet.gif Binary files differindex 5a9bc7514fa..99b7fa68d96 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/FeatureToSet.gif +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/FeatureToSet.gif diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/StereotypeToApply.gif b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/StereotypeToApply.gif Binary files differindex caf2804510d..145e5d589d8 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/StereotypeToApply.gif +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/icons/full/obj16/StereotypeToApply.gif diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.types.core/plugin.xml index b820825bf5b..daaecc52824 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/plugin.xml +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/plugin.xml @@ -1,185 +1,187 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated SetTypeAdvice -->
- <package
- uri="http://www.eclipse.org/papyrus/uml/types/settypeadvice/1.1"
- class="org.eclipse.papyrus.uml.types.core.advices.settype.SetTypeAdviceConfigurationPackage"
- genModel="model/SetTypeAdvice.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <!-- @generated SetTypeAdvice -->
- <factory
- uri="http://www.eclipse.org/papyrus/uml/types/settypeadvice/1.1"
- class="org.eclipse.papyrus.uml.types.core.advices.settype.provider.SetTypeAdviceConfigurationItemProviderAdapterFactory"
- supportedTypes=
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.childCreationExtenders">
- <!-- @generated SetTypeAdvice -->
- <extender
- uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1"
- class="org.eclipse.papyrus.uml.types.core.advices.settype.provider.SetTypeAdviceConfigurationItemProviderAdapterFactory$ElementTypesConfigurationsChildCreationExtender"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated InvariantStereotypeRule -->
- <package
- uri="http://www.eclipse.org/papyrus/uml/types/invariantstereotyperule/1.1"
- class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.InvariantStereotypeRuleConfigurationPackage"
- genModel="model/InvariantStereotypeRule.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <!-- @generated InvariantStereotypeRule -->
- <parser
- type="invariantstereotyperuleconfiguration"
- class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.util.InvariantStereotypeRuleConfigurationResourceFactoryImpl"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <!-- @generated InvariantStereotypeRule -->
- <factory
- uri="http://www.eclipse.org/papyrus/uml/types/invariantstereotyperule/1.1"
- class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.provider.InvariantStereotypeRuleConfigurationItemProviderAdapterFactory"
- supportedTypes=
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.childCreationExtenders">
- <!-- @generated InvariantStereotypeRule -->
- <extender
- uri="http://www.eclipse.org/papyrus/infra/types/rulebased/1.1"
- class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.provider.InvariantStereotypeRuleConfigurationItemProviderAdapterFactory$RuleBasedChildCreationExtender"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated ApplyStereotypeAdvice -->
- <package
- uri="http://www.eclipse.org/papyrus/uml/types/applystereotypeadvice/1.1"
- class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.ApplyStereotypeAdvicePackage"
- genModel="model/ApplyStereotypeAdvice.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <!-- @generated ApplyStereotypeAdvice -->
- <parser
- type="applystereotypeadvice"
- class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.util.ApplyStereotypeAdviceResourceFactoryImpl"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <!-- @generated ApplyStereotypeAdvice -->
- <factory
- uri="http://www.eclipse.org/papyrus/uml/types/applystereotypeadvice/1.1"
- class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.provider.ApplyStereotypeAdviceItemProviderAdapterFactory"
- supportedTypes=
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.childCreationExtenders">
- <!-- @generated ApplyStereotypeAdvice -->
- <extender
- uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1"
- class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.provider.ApplyStereotypeAdviceItemProviderAdapterFactory$ElementTypesConfigurationsChildCreationExtender"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated StereotypeMatcher -->
- <package
- uri="http://www.eclipse.org/papyrus/uml/types/stereotypematcher/1.1"
- class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.StereotypeApplicationMatcherPackage"
- genModel="model/StereotypeMatcher.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <!-- @generated StereotypeMatcher -->
- <parser
- type="stereotypeapplicationmatcher"
- class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.util.StereotypeApplicationMatcherResourceFactoryImpl"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <!-- @generated StereotypeMatcher -->
- <factory
- uri="http://www.eclipse.org/papyrus/uml/types/stereotypematcher/1.1"
- class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.provider.StereotypeApplicationMatcherItemProviderAdapterFactory"
- supportedTypes=
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource"/>
- </extension>
-
- <extension point="org.eclipse.emf.edit.childCreationExtenders">
- <!-- @generated StereotypeMatcher -->
- <extender
- uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1"
- class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.provider.StereotypeApplicationMatcherItemProviderAdapterFactory$ElementTypesConfigurationsChildCreationExtender"/>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.types.core.adviceConfigurationKind">
- <adviceConfigurationKind
- configurationClass="org.eclipse.papyrus.uml.types.core.advices.applystereotype.ApplyStereotypeAdviceConfiguration"
- factoryClass="org.eclipse.papyrus.uml.types.core.advices.applystereotype.ApplyStereotypeAdviceConfigurationFactory">
- </adviceConfigurationKind>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.types.core.adviceConfigurationKind">
- <adviceConfigurationKind
- configurationClass="org.eclipse.papyrus.uml.types.core.advices.settype.SetTypeAdviceConfiguration"
- factoryClass="org.eclipse.papyrus.uml.types.core.advices.settype.SetTypeAdviceFactory">
- </adviceConfigurationKind>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.types.rulebased.ruleKind">
- <ruleKind
- configurationClass="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.InvariantStereotypeRuleConfiguration"
- ruleClass="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.InvariantStereotypeRule">
- </ruleKind>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.types.core.matcherConfigurationKind">
- <matcherConfigurationKind
- configurationClass="org.eclipse.papyrus.uml.types.core.matchers.stereotype.StereotypeApplicationMatcherConfiguration"
- factoryClass="org.eclipse.papyrus.uml.types.core.matchers.stereotype.StereotypeApplicationMatcherConfigurationFactory">
- </matcherConfigurationKind>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<plugin> + + + + + + + + + + + + + + + + + + + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated SetTypeAdvice --> + <package + uri="http://www.eclipse.org/papyrus/uml/types/settypeadvice/1.1" + class="org.eclipse.papyrus.uml.types.core.advices.settype.SetTypeAdviceConfigurationPackage" + genModel="model/SetTypeAdvice.genmodel"/> + </extension> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated SetTypeAdvice --> + <factory + uri="http://www.eclipse.org/papyrus/uml/types/settypeadvice/1.1" + class="org.eclipse.papyrus.uml.types.core.advices.settype.provider.SetTypeAdviceConfigurationItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + + <extension point="org.eclipse.emf.edit.childCreationExtenders"> + <!-- @generated SetTypeAdvice --> + <extender + uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1" + class="org.eclipse.papyrus.uml.types.core.advices.settype.provider.SetTypeAdviceConfigurationItemProviderAdapterFactory$ElementTypesConfigurationsChildCreationExtender"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated InvariantStereotypeRule --> + <package + uri="http://www.eclipse.org/papyrus/uml/types/invariantstereotyperule/1.1" + class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.InvariantStereotypeRuleConfigurationPackage" + genModel="model/InvariantStereotypeRule.genmodel"/> + </extension> + + <extension point="org.eclipse.emf.ecore.extension_parser"> + <!-- @generated InvariantStereotypeRule --> + <parser + type="invariantstereotyperuleconfiguration" + class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.util.InvariantStereotypeRuleConfigurationResourceFactoryImpl"/> + </extension> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated InvariantStereotypeRule --> + <factory + uri="http://www.eclipse.org/papyrus/uml/types/invariantstereotyperule/1.1" + class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.provider.InvariantStereotypeRuleConfigurationItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + + <extension point="org.eclipse.emf.edit.childCreationExtenders"> + <!-- @generated InvariantStereotypeRule --> + <extender + uri="http://www.eclipse.org/papyrus/infra/types/rulebased/1.1" + class="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.provider.InvariantStereotypeRuleConfigurationItemProviderAdapterFactory$RuleBasedChildCreationExtender"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated ApplyStereotypeAdvice --> + <package + uri="http://www.eclipse.org/papyrus/uml/types/applystereotypeadvice/1.1" + class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.ApplyStereotypeAdvicePackage" + genModel="model/ApplyStereotypeAdvice.genmodel"/> + </extension> + + <extension point="org.eclipse.emf.ecore.extension_parser"> + <!-- @generated ApplyStereotypeAdvice --> + <parser + type="applystereotypeadvice" + class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.util.ApplyStereotypeAdviceResourceFactoryImpl"/> + </extension> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated ApplyStereotypeAdvice --> + <factory + uri="http://www.eclipse.org/papyrus/uml/types/applystereotypeadvice/1.1" + class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.provider.ApplyStereotypeAdviceItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + + <extension point="org.eclipse.emf.edit.childCreationExtenders"> + <!-- @generated ApplyStereotypeAdvice --> + <extender + uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1" + class="org.eclipse.papyrus.uml.types.core.advices.applystereotype.provider.ApplyStereotypeAdviceItemProviderAdapterFactory$ElementTypesConfigurationsChildCreationExtender"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated StereotypeMatcher --> + <package + uri="http://www.eclipse.org/papyrus/uml/types/stereotypematcher/1.1" + class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.StereotypeApplicationMatcherPackage" + genModel="model/StereotypeMatcher.genmodel"/> + </extension> + + <extension point="org.eclipse.emf.ecore.extension_parser"> + <!-- @generated StereotypeMatcher --> + <parser + type="stereotypeapplicationmatcher" + class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.util.StereotypeApplicationMatcherResourceFactoryImpl"/> + </extension> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated StereotypeMatcher --> + <factory + uri="http://www.eclipse.org/papyrus/uml/types/stereotypematcher/1.1" + class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.provider.StereotypeApplicationMatcherItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + + <extension point="org.eclipse.emf.edit.childCreationExtenders"> + <!-- @generated StereotypeMatcher --> + <extender + uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1" + class="org.eclipse.papyrus.uml.types.core.matchers.stereotype.provider.StereotypeApplicationMatcherItemProviderAdapterFactory$ElementTypesConfigurationsChildCreationExtender"/> + </extension> + <extension + point="org.eclipse.papyrus.infra.types.core.adviceConfigurationKind"> + <adviceConfigurationKind + configurationClass="org.eclipse.papyrus.uml.types.core.advices.applystereotype.ApplyStereotypeAdviceConfiguration" + description="Set stereotypes to apply" + factoryClass="org.eclipse.papyrus.uml.types.core.advices.applystereotype.ApplyStereotypeAdviceConfigurationFactory" + icon="icons/Stereotype.gif"> + </adviceConfigurationKind> + </extension> + <extension + point="org.eclipse.papyrus.infra.types.core.adviceConfigurationKind"> + <adviceConfigurationKind + configurationClass="org.eclipse.papyrus.uml.types.core.advices.settype.SetTypeAdviceConfiguration" + factoryClass="org.eclipse.papyrus.uml.types.core.advices.settype.SetTypeAdviceFactory"> + </adviceConfigurationKind> + </extension> + <extension + point="org.eclipse.papyrus.infra.types.rulebased.ruleKind"> + <ruleKind + configurationClass="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.InvariantStereotypeRuleConfiguration" + ruleClass="org.eclipse.papyrus.uml.types.core.rules.invariantstereotype.InvariantStereotypeRule"> + </ruleKind> + </extension> + <extension + point="org.eclipse.papyrus.infra.types.core.matcherConfigurationKind"> + <matcherConfigurationKind + configurationClass="org.eclipse.papyrus.uml.types.core.matchers.stereotype.StereotypeApplicationMatcherConfiguration" + factoryClass="org.eclipse.papyrus.uml.types.core.matchers.stereotype.StereotypeApplicationMatcherConfigurationFactory"> + </matcherConfigurationKind> + </extension> + +</plugin> diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/applystereotype/ApplyStereotypeAdviceConfigurationFactory.java b/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/applystereotype/ApplyStereotypeAdviceConfigurationFactory.java index b2d4d921e2e..36f62dbb9a3 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/applystereotype/ApplyStereotypeAdviceConfigurationFactory.java +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/applystereotype/ApplyStereotypeAdviceConfigurationFactory.java @@ -1,34 +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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.types.core.advices.applystereotype;
-
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.papyrus.infra.types.AbstractAdviceBindingConfiguration;
-import org.eclipse.papyrus.infra.types.core.factories.impl.AbstractAdviceBindingFactory;
-import org.eclipse.papyrus.infra.types.core.impl.NullEditHelperAdvice;
-
-
-public class ApplyStereotypeAdviceConfigurationFactory extends AbstractAdviceBindingFactory<AbstractAdviceBindingConfiguration> {
-
-
- @Override
- protected IEditHelperAdvice getEditHelperAdvice(AbstractAdviceBindingConfiguration adviceConfiguration) {
- if (adviceConfiguration instanceof ApplyStereotypeAdviceConfiguration) {
- IEditHelperAdvice editHelperAdvice = new ApplyStereotypeAdviceEditHelperAdvice((ApplyStereotypeAdviceConfiguration) adviceConfiguration);
- return editHelperAdvice;
- }
- return NullEditHelperAdvice.getInstance();
- }
-
-
-}
+/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Add createAdviceBindingConfiguration method. + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.types.core.advices.applystereotype; + +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.papyrus.infra.types.AbstractAdviceBindingConfiguration; +import org.eclipse.papyrus.infra.types.SpecializationTypeConfiguration; +import org.eclipse.papyrus.infra.types.core.factories.impl.AbstractAdviceBindingFactory; +import org.eclipse.papyrus.infra.types.core.impl.NullEditHelperAdvice; + + +public class ApplyStereotypeAdviceConfigurationFactory extends AbstractAdviceBindingFactory<AbstractAdviceBindingConfiguration> { + + /** + * {@inheritDoc} + */ + @Override + protected IEditHelperAdvice getEditHelperAdvice(AbstractAdviceBindingConfiguration adviceConfiguration) { + if (adviceConfiguration instanceof ApplyStereotypeAdviceConfiguration) { + IEditHelperAdvice editHelperAdvice = new ApplyStereotypeAdviceEditHelperAdvice((ApplyStereotypeAdviceConfiguration) adviceConfiguration); + return editHelperAdvice; + } + return NullEditHelperAdvice.getInstance(); + } + + /** + * {@inheritDoc} + */ + @Override + public AbstractAdviceBindingConfiguration createAdviceBindingConfiguration() { + return ApplyStereotypeAdviceFactory.eINSTANCE.createApplyStereotypeAdviceConfiguration(); + } + + /** + * Create a {@link ApplyStereotypeAdviceConfiguration}. + * + * @param stereotypesToApply + * The list of stereotypes to apply. + * @param identifier + * Its identifier. + * @param target + * Its target. + * @return the {@link ApplyStereotypeAdviceConfiguration}. + */ + public static ApplyStereotypeAdviceConfiguration createApplyStereotypeAdvice(final List<String> stereotypesToApply, final String identifier, final SpecializationTypeConfiguration target) { + + ApplyStereotypeAdviceConfiguration applyStereotypeAdvice = ApplyStereotypeAdviceFactory.eINSTANCE.createApplyStereotypeAdviceConfiguration(); + + // Configure Stereotype Advice + applyStereotypeAdvice.setIdentifier(identifier); + applyStereotypeAdvice.setTarget(target); + + // Create Stereotype to apply// + for (String stereotype : stereotypesToApply) { + StereotypeToApply stereotypeToApply = ApplyStereotypeAdviceFactory.eINSTANCE.createStereotypeToApply(); + + // Configure stereotype to apply + String requiredProfile = stereotype.substring(0, stereotype.indexOf("::"));//$NON-NLS-1$ + stereotypeToApply.getRequiredProfiles().add(requiredProfile); + stereotypeToApply.setStereotypeQualifiedName(stereotype); + stereotypeToApply.setUpdateName(true); + + // Add stereotyped to apply to + applyStereotypeAdvice.getStereotypesToApply().add(stereotypeToApply); + } + + return applyStereotypeAdvice; + } + + +} diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/settype/SetTypeAdviceFactory.java b/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/settype/SetTypeAdviceFactory.java index 8e28cd842e8..569b5103c35 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/settype/SetTypeAdviceFactory.java +++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/src/org/eclipse/papyrus/uml/types/core/advices/settype/SetTypeAdviceFactory.java @@ -1,34 +1,45 @@ -/*****************************************************************************
- * 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.types.core.advices.settype;
-
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.papyrus.infra.types.AbstractAdviceBindingConfiguration;
-import org.eclipse.papyrus.infra.types.core.factories.impl.AbstractAdviceBindingFactory;
-import org.eclipse.papyrus.infra.types.core.impl.NullEditHelperAdvice;
-
-
-public class SetTypeAdviceFactory extends AbstractAdviceBindingFactory<AbstractAdviceBindingConfiguration> {
-
-
- @Override
- protected IEditHelperAdvice getEditHelperAdvice(AbstractAdviceBindingConfiguration adviceConfiguration) {
- if (adviceConfiguration instanceof SetTypeAdviceConfiguration) {
- IEditHelperAdvice editHelperAdvice = new SetTypeAdviceEditHelperAdvice((SetTypeAdviceConfiguration) adviceConfiguration);
- return editHelperAdvice;
- }
- return NullEditHelperAdvice.getInstance();
- }
-
-
-}
+/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Add createAdviceBindingConfiguration method. + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.types.core.advices.settype; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.papyrus.infra.types.AbstractAdviceBindingConfiguration; +import org.eclipse.papyrus.infra.types.core.factories.impl.AbstractAdviceBindingFactory; +import org.eclipse.papyrus.infra.types.core.impl.NullEditHelperAdvice; + + +public class SetTypeAdviceFactory extends AbstractAdviceBindingFactory<AbstractAdviceBindingConfiguration> { + + /** + * {@inheritDoc} + */ + @Override + protected IEditHelperAdvice getEditHelperAdvice(AbstractAdviceBindingConfiguration adviceConfiguration) { + if (adviceConfiguration instanceof SetTypeAdviceConfiguration) { + IEditHelperAdvice editHelperAdvice = new SetTypeAdviceEditHelperAdvice((SetTypeAdviceConfiguration) adviceConfiguration); + return editHelperAdvice; + } + return NullEditHelperAdvice.getInstance(); + } + + /** + * {@inheritDoc} + */ + @Override + public AbstractAdviceBindingConfiguration createAdviceBindingConfiguration() { + return SetTypeAdviceConfigurationFactory.eINSTANCE.createSetTypeAdviceConfiguration(); + } + + +} |