Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2011-05-03 07:48:51 +0000
committervlorenzo2011-05-03 07:48:51 +0000
commite21e5fba3b3a01b7be286ba8974a0c9c35b73b53 (patch)
tree1a12be14843f7170a2d586a91f0f685320db61c9 /incoming
parenta5e4802b61571024d66912cf69bcb6b0aefe22b2 (diff)
downloadorg.eclipse.papyrus-e21e5fba3b3a01b7be286ba8974a0c9c35b73b53.tar.gz
org.eclipse.papyrus-e21e5fba3b3a01b7be286ba8974a0c9c35b73b53.tar.xz
org.eclipse.papyrus-e21e5fba3b3a01b7be286ba8974a0c9c35b73b53.zip
NEW - bug 337809: [Enhancement][SysML] Papyrus shall support SysML Allocation Table
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337809 NEW - bug 337808: [Enhancement] [SysML][Requirement Table] Papyrus shall support Requirements Table https://bugs.eclipse.org/bugs/show_bug.cgi?id=337808
Diffstat (limited to 'incoming')
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/META-INF/MANIFEST.MF3
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/build.properties4
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/plugin.xml44
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/resources/allocate.querySet (renamed from incoming/org.eclipse.papyrus.sysml.table.allocation/resource/allocate.querySet)0
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/resources/allocate.tableconfiguration (renamed from incoming/org.eclipse.papyrus.sysml.table.allocation/resource/allocate.tableconfiguration)4
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/resources/table_SysML_Allocation_showOnlyClientAndSupplier.uiCustom90
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java32
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableFactory.java2
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.requirement/plugin.xml2
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.requirement/resources/requirements.tableconfiguration4
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.requirement/resources/table_UML_Class_hideAllClassFeatures.uiCustom (renamed from incoming/org.eclipse.papyrus.sysml.table.requirement/resources/hideAllClassFeatures.uiCustom)0
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java8
-rw-r--r--incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/queries/CreateRequirement.java14
-rw-r--r--incoming/org.eclipse.papyrus.table.common/plugin.xml2
-rw-r--r--incoming/org.eclipse.papyrus.table.common/resources/table_Ecore_hideEAnnotationFeature.uiCustom (renamed from incoming/org.eclipse.papyrus.table.common/resources/hideEAnnotationFeature.uiCustom)0
15 files changed, 139 insertions, 70 deletions
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/META-INF/MANIFEST.MF b/incoming/org.eclipse.papyrus.sysml.table.allocation/META-INF/MANIFEST.MF
index 347842e1fd5..eca96784d8f 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/META-INF/MANIFEST.MF
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@ Require-Bundle: org.eclipse.emf.facet.infra.common.core,
org.eclipse.papyrus.table.instance;bundle-version="0.8.0",
org.eclipse.emf.facet.widgets.nattable;bundle-version="0.1.0",
org.eclipse.emf.facet.widgets.nattable.tableconfiguration;bundle-version="0.1.0",
- org.eclipse.emf.facet.widgets.nattable.instance;bundle-version="0.1.0"
+ org.eclipse.emf.facet.widgets.nattable.instance;bundle-version="0.1.0",
+ org.eclipse.papyrus.sysml
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,bin
Bundle-Version: 0.8.0.qualifier
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/build.properties b/incoming/org.eclipse.papyrus.sysml.table.allocation/build.properties
index 274a925edb0..1ddc2f6b354 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/build.properties
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/build.properties
@@ -2,11 +2,11 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.properties,\
- resource/,\
+ resources/,\
plugin.xml,\
icons/,\
about.html
source.. = src/
src.includes = about.html,\
- resource/,\
+ resources/,\
icons/
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/plugin.xml b/incoming/org.eclipse.papyrus.sysml.table.allocation/plugin.xml
index 2112be99d19..8970b328ab4 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/plugin.xml
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/plugin.xml
@@ -8,12 +8,7 @@
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution allPopups="false" locationURI="toolbar:org.eclipse.papyrus.table.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command"
- icon="icons/allocation_table.png"
- id="org.eclipse.papyrus.table.ui.toolbar.allocation.table"
- style="push"
- tooltip="Create a new SysML Allocation table">
+ <command commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command" icon="icons/allocation_table.png" id="org.eclipse.papyrus.table.ui.toolbar.allocation.table" style="push" tooltip="Create a new SysML Allocation table">
<visibleWhen>
<with variable="activeEditorId">
<equals value="org.eclipse.papyrus.core.papyrusEditor">
@@ -23,12 +18,7 @@
</command>
</menuContribution>
<menuContribution allPopups="false" locationURI="popup:org.eclipse.papyrus.modelexplorer.popupmenu.createtable">
- <command
- commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command"
- icon="icons/allocation_table.png"
- id="org.eclipse.papyrus.modelexplorer.popupmenu.createtable.allocation.table"
- style="push"
- tooltip="Create a new SysML Allocation table">
+ <command commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command" icon="icons/allocation_table.png" id="org.eclipse.papyrus.modelexplorer.popupmenu.createtable.allocation.table" style="push" tooltip="Create a new SysML Allocation table">
<visibleWhen>
<with variable="activeEditorId">
<equals value="org.eclipse.papyrus.core.papyrusEditor">
@@ -38,12 +28,7 @@
</command>
</menuContribution>
<menuContribution allPopups="false" locationURI="menu:org.eclipse.papyrus.table.ui.menu.tables">
- <command
- commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command"
- icon="icons/allocation_table.png"
- id="org.eclipse.papyrus.table.ui.menu.tables.allocation.table"
- style="push"
- tooltip="Create a new SysML Allocation table">
+ <command commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command" icon="icons/allocation_table.png" id="org.eclipse.papyrus.table.ui.menu.tables.allocation.table" style="push" tooltip="Create a new SysML Allocation table">
<visibleWhen>
<with variable="activeEditorId">
<equals value="org.eclipse.papyrus.core.papyrusEditor">
@@ -61,12 +46,8 @@
<handler class="org.eclipse.papyrus.sysml.table.allocation.CreateAllocationTableCommand" commandId="org.eclipse.papyrus.sysml.table.allocation.create.table.command">
<activeWhen>
<and>
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.sysml.table.allocation.tester.isAppliedAllocations"
- value="true">
+ <with variable="selection">
+ <test forcePluginActivation="true" property="org.eclipse.papyrus.sysml.table.allocation.tester.isAppliedAllocations" value="true">
</test>
</with>
</and>
@@ -74,16 +55,13 @@
</handler>
</extension>
<extension point="org.eclipse.emf.facet.infra.query.registration">
- <modelqueryset file="resource/allocate.querySet"/>
+ <modelqueryset file="resources/allocate.querySet"/>
</extension>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.papyrus.sysml.table.allocation.tester.AllocationPropertyTester"
- id="org.eclipse.papyrus.sysml.table.allocation.tester"
- namespace="org.eclipse.papyrus.sysml.table.allocation.tester"
- properties="isAppliedAllocations"
- type="org.eclipse.jface.viewers.IStructuredSelection">
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester class="org.eclipse.papyrus.sysml.table.allocation.tester.AllocationPropertyTester" id="org.eclipse.papyrus.sysml.table.allocation.tester" namespace="org.eclipse.papyrus.sysml.table.allocation.tester" properties="isAppliedAllocations" type="org.eclipse.jface.viewers.IStructuredSelection">
</propertyTester>
</extension>
+ <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
+ <browserCustomization file="resources/table_SysML_Allocation_showOnlyClientAndSupplier.uiCustom"/>
+ </extension>
</plugin>
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/resource/allocate.querySet b/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/allocate.querySet
index bb53c6cba0a..bb53c6cba0a 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/resource/allocate.querySet
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/allocate.querySet
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/resource/allocate.tableconfiguration b/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/allocate.tableconfiguration
index 4a3f8741583..eec8474c97a 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/resource/allocate.tableconfiguration
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/allocate.tableconfiguration
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<tableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:tableconfiguration="http://www.eclipse.org/EMF_Facet/ModelCellEditor/0.1.0/tableconfiguration">
<canBePresentedInTheTable xsi:type="query:JavaModelQuery" href="emffacet:/query/allocate#IsAllocateQuery"/>
- <defaultCustomizations href="emffacet:/customization/allocate#/"/>
- <defaultCustomizations href="emffacet:/customization/packageInGreen#/"/>
+ <defaultCustomizations href="emffacet:/customization/table_SysML_Allocation_showOnlyClientAndSupplier#/"/>
+ <defaultCustomizations href="emffacet:/customization/table_Ecore_hideEAnnotationFeature#/"/>
<instantiationMethod name="CreateAbstractionQuery" description="Create a new Abstraction">
<instantiationQuery xsi:type="query:JavaModelQuery" href="emffacet:/query/allocate#CreateAbstractionQuery"/>
</instantiationMethod>
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/table_SysML_Allocation_showOnlyClientAndSupplier.uiCustom b/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/table_SysML_Allocation_showOnlyClientAndSupplier.uiCustom
new file mode 100644
index 00000000000..f760181f0e3
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/resources/table_SysML_Allocation_showOnlyClientAndSupplier.uiCustom
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ASCII"?>
+<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/uml2/3.0.0/UML" allQuerySetsAvailable="false">
+ <types metaclassName="uml.Element">
+ <references referenceName="ownedElement">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="owner">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="ownedComment">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="uml.NamedElement">
+ <attributes attributeName="name">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </attributes>
+ <attributes attributeName="visibility">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </attributes>
+ <attributes attributeName="qualifiedName">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </attributes>
+ <references referenceName="clientDependency">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="namespace">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="nameExpression">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="uml.ParameterableElement">
+ <references referenceName="owningTemplateParameter">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="templateParameter">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="uml.Relationship">
+ <references referenceName="relatedElement">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="uml.DirectedRelationship">
+ <references referenceName="source">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="target">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+ <types metaclassName="uml.Abstraction">
+ <references referenceName="mapping">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+</uicustom:MetamodelView> \ No newline at end of file
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java b/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java
index d1ca48fa85e..7aebcb536bc 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableCommand.java
@@ -18,14 +18,10 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import org.eclipse.emf.facet.widgets.nattable.tableconfiguration.TableConfiguration;
-import org.eclipse.papyrus.core.services.ServiceException;
-import org.eclipse.papyrus.core.services.ServicesRegistry;
-import org.eclipse.papyrus.resource.NotFoundException;
import org.eclipse.papyrus.sysml.table.allocation.editor.AllocationTableEditor;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
import org.eclipse.papyrus.table.common.handlers.AbstractCreateNattableEditorCommand;
-import org.eclipse.papyrus.table.instance.papyrustableinstance.PapyrusTableInstance;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
@@ -50,33 +46,25 @@ public class CreateAllocationTableCommand extends AbstractCreateNattableEditorCo
/**
*
- * @see org.eclipse.papyrus.table.defaultt.handlers.AbstractCreateNattableEditorCommand#createEditorModel(ServicesRegistry)
+ * @see org.eclipse.papyrus.table.common.handlers.AbstractCreateNattableEditorCommand#getTableConfiguration()
*
- * @param serviceRegistry
* @return
- * @throws ServiceException
- * @throws NotFoundException
*/
@Override
- protected Object createEditorModel(ServicesRegistry serviceRegistry) throws ServiceException, NotFoundException {
- PapyrusTableInstance papyrusTable = (PapyrusTableInstance)super.createEditorModel(serviceRegistry);
-
+ protected TableConfiguration getTableConfiguration() {
ResourceSet resourceSet = new ResourceSetImpl();
- String symbolicName = org.eclipse.papyrus.sysml.table.allocation.Activator.getDefault().getBundle().getSymbolicName();
- URI uri = URI.createPlatformPluginURI(symbolicName + "/resource/allocate.tableconfiguration", true); //$NON-NLS-1$
- resourceSet.getResourceFactoryRegistry().getContentTypeToFactoryMap().put("tableconfiguration", new XMIResourceFactoryImpl()); //$NON-NLS-1$
+
+ String symbolicName = Activator.getDefault().getBundle().getSymbolicName();
+ URI uri = URI.createPlatformPluginURI(symbolicName + "/resources/allocate.tableconfiguration", true); //$NON-NLS-1$
Resource resource = resourceSet.getResource(uri, true);
- //we load the configuration for the table
TableConfiguration tableConfiguration = null;
- if(resource.getContents().get(0) instanceof TableConfiguration) {
+ if(resource.getContents().get(0) instanceof org.eclipse.emf.facet.widgets.nattable.tableconfiguration.TableConfiguration) {
tableConfiguration = (TableConfiguration)resource.getContents().get(0);
+ return tableConfiguration;
}
-
- papyrusTable.getTable().setTableConfiguration(tableConfiguration);
- return papyrusTable;
+ return null;
}
-
/**
*
* @see org.eclipse.papyrus.table.common.handlers.AbstractCreateNattableEditorCommand#isEnabled()
@@ -90,7 +78,7 @@ public class CreateAllocationTableCommand extends AbstractCreateNattableEditorCo
Element el = (Element)object;
Package pack = el.getNearestPackage();
//we can create an Allocation Table only when the profile is applied
- return pack.getAppliedProfile("SysML::Allocations", true) != null; //$NON-NLS-1$
+ return pack.getAppliedProfile(SysmlResource.ALLOCATIONS_ID, true) != null;
}
return false;
}
diff --git a/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableFactory.java b/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableFactory.java
index a90dad78941..60db909131b 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableFactory.java
+++ b/incoming/org.eclipse.papyrus.sysml.table.allocation/src/org/eclipse/papyrus/sysml/table/allocation/CreateAllocationTableFactory.java
@@ -33,6 +33,4 @@ public class CreateAllocationTableFactory extends AbstractNattableEditorFactory
public CreateAllocationTableFactory() {
super(AllocationTableEditor.class, AllocationTableEditor.EDITOR_TYPE);
}
-
-
}
diff --git a/incoming/org.eclipse.papyrus.sysml.table.requirement/plugin.xml b/incoming/org.eclipse.papyrus.sysml.table.requirement/plugin.xml
index 3518663bc52..8d484f5efc8 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.requirement/plugin.xml
+++ b/incoming/org.eclipse.papyrus.sysml.table.requirement/plugin.xml
@@ -59,7 +59,7 @@
</propertyTester>
</extension>
<extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization file="resources/hideAllClassFeatures.uiCustom">
+ <browserCustomization file="resources/table_UML_Class_hideAllClassFeatures.uiCustom">
</browserCustomization>
</extension>
<extension point="org.eclipse.emf.facet.infra.query.registration">
diff --git a/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/requirements.tableconfiguration b/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/requirements.tableconfiguration
index be693dcf9d5..cccdc4cc986 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/requirements.tableconfiguration
+++ b/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/requirements.tableconfiguration
@@ -2,8 +2,8 @@
<tableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:tableconfiguration="http://www.eclipse.org/EMF_Facet/ModelCellEditor/0.1.0/tableconfiguration">
<canBePresentedInTheTable xsi:type="query:JavaModelQuery" href="emffacet:/query/requirementsTable#IsRequirement"/>
<defaultFacets href="emffacet:/facet/requirementsFacets#//Requirement"/>
- <defaultCustomizations href="emffacet:/customization/hideAllClassFeatures#/"/>
- <defaultCustomizations href="emffacet:/customization/hideEAnnotationFeature#/"/>
+ <defaultCustomizations href="emffacet:/customization/table_UML_Class_hideAllClassFeatures#/"/>
+ <defaultCustomizations href="emffacet:/customization/table_Ecore_hideEAnnotationFeature#/"/>
<instantiationMethod name="Create Requirement" description="This method creates a new Class stereotyped with requirement">
<instantiationQuery xsi:type="query:JavaModelQuery" href="emffacet:/query/requirementsTable#CreateRequirements"/>
</instantiationMethod>
diff --git a/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/hideAllClassFeatures.uiCustom b/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/table_UML_Class_hideAllClassFeatures.uiCustom
index e3b98a64c7f..e3b98a64c7f 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/hideAllClassFeatures.uiCustom
+++ b/incoming/org.eclipse.papyrus.sysml.table.requirement/resources/table_UML_Class_hideAllClassFeatures.uiCustom
diff --git a/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java b/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java
index 31b841d8210..de598740e02 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java
+++ b/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/CreateRequirementTableCommand.java
@@ -44,7 +44,12 @@ public class CreateRequirementTableCommand extends AbstractCreateNattableEditorC
super(RequirementTableEditor.EDITOR_TYPE, RequirementTableEditor.DEFAULT_NAME);
}
-
+ /**
+ *
+ * @see org.eclipse.papyrus.table.common.handlers.AbstractCreateNattableEditorCommand#getTableConfiguration()
+ *
+ * @return
+ */
@Override
protected TableConfiguration getTableConfiguration() {
ResourceSet resourceSet = new ResourceSetImpl();
@@ -78,5 +83,4 @@ public class CreateRequirementTableCommand extends AbstractCreateNattableEditorC
}
return false;
}
-
}
diff --git a/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/queries/CreateRequirement.java b/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/queries/CreateRequirement.java
index 8ac27c7024b..aec2e838723 100644
--- a/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/queries/CreateRequirement.java
+++ b/incoming/org.eclipse.papyrus.sysml.table.requirement/src/org/eclipse/papyrus/sysml/table/requirement/queries/CreateRequirement.java
@@ -18,6 +18,9 @@ import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionExcep
import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
import org.eclipse.emf.facet.infra.query.runtime.ModelQueryParameterValue;
+import org.eclipse.emf.facet.widgets.celleditors.ICommandFactoriesRegistry;
+import org.eclipse.emf.facet.widgets.celleditors.ICommandFactory;
+import org.eclipse.emf.facet.widgets.nattable.tableconfiguration.InstantiationMethodParameters;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.diagram.common.command.wrappers.GMFtoEMFCommandWrapper;
@@ -40,9 +43,16 @@ public class CreateRequirement implements IJavaModelQuery<Package, org.eclipse.u
* @throws ModelQueryExecutionException
*/
public org.eclipse.uml2.uml.Class evaluate(final Package context, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
- ModelQueryParameterValue modelquery = parameterValues.getParameterValueByName("editingDomain");
- EditingDomain editingDomain = (EditingDomain)modelquery.getValue();
+ EditingDomain editingDomain = null;
+ ModelQueryParameterValue model = parameterValues.getParameterValueByName(InstantiationMethodParameters.getEditingDomainParameter().getName());
+ if(model != null) {
+ if(model.getValue() instanceof EditingDomain) {
+ editingDomain = (EditingDomain)model.getValue();
+ }
+ }
if(editingDomain != null) {
+ ICommandFactory commandFactory = ICommandFactoriesRegistry.INSTANCE.getCommandFactoryFor(editingDomain);
+
if(context != null) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(context);
diff --git a/incoming/org.eclipse.papyrus.table.common/plugin.xml b/incoming/org.eclipse.papyrus.table.common/plugin.xml
index b20d771b0ed..a648174d5ea 100644
--- a/incoming/org.eclipse.papyrus.table.common/plugin.xml
+++ b/incoming/org.eclipse.papyrus.table.common/plugin.xml
@@ -25,6 +25,6 @@
</menuContribution>
</extension>
<extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization file="resources/hideEAnnotationFeature.uiCustom"/>
+ <browserCustomization file="resources/table_Ecore_hideEAnnotationFeature.uiCustom"/>
</extension>
</plugin>
diff --git a/incoming/org.eclipse.papyrus.table.common/resources/hideEAnnotationFeature.uiCustom b/incoming/org.eclipse.papyrus.table.common/resources/table_Ecore_hideEAnnotationFeature.uiCustom
index 79a0cc69a63..79a0cc69a63 100644
--- a/incoming/org.eclipse.papyrus.table.common/resources/hideEAnnotationFeature.uiCustom
+++ b/incoming/org.eclipse.papyrus.table.common/resources/table_Ecore_hideEAnnotationFeature.uiCustom

Back to the top