Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaged Elaasar2017-04-10 08:05:35 -0400
committerGerrit Code Review @ Eclipse.org2017-04-12 04:24:04 -0400
commitf5e001674caf1e7b70b1d03c9c39d4390c04514c (patch)
tree285dab0e37809f7a82827c64cfeb816fcc1f4044 /plugins/sysml
parent41e1c785d4ef6a5f5f9e827d492e86a54af00ed9 (diff)
downloadorg.eclipse.papyrus-f5e001674caf1e7b70b1d03c9c39d4390c04514c.tar.gz
org.eclipse.papyrus-f5e001674caf1e7b70b1d03c9c39d4390c04514c.tar.xz
org.eclipse.papyrus-f5e001674caf1e7b70b1d03c9c39d4390c04514c.zip
Bug 510451 - Two changes: 1) Make architecture viewpoints exchangeable
between private .sash model and the public .di model, 2) Remove PapyrusSyncTable and refactor its usage for PapyrusTable instead Change-Id: Id5e3cfe313572e7a984dc320e868ca6ced2301c4 Signed-off-by: Maged Elaasar <melaasar@gmail.com>
Diffstat (limited to 'plugins/sysml')
-rw-r--r--plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture20
-rw-r--r--plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java12
2 files changed, 17 insertions, 15 deletions
diff --git a/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture b/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture
index c902f411558..c5ce22a6948 100644
--- a/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture
+++ b/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture
@@ -12,7 +12,7 @@
<contexts xsi:type="architecture:ArchitectureDescriptionLanguage" xmi:id="_yMTQdMSdEeaKZJ_pGfaSiA" name="SysML" description="The Systems Modeling Language" id="org.eclipse.papyrus.sysml.architecture.SysML" icon="platform:/plugin/org.eclipse.papyrus.sysml.architecture/icons/sysml.gif" creationCommandClass="org.eclipse.papyrus.sysml.diagram.common.commands.CreateSysMLModelCommand">
<viewpoints xmi:id="_M5u1AMShEeaKZJ_pGfaSiA" name="Systems Analysis" description="A viewpoint allowing systems analysis with SysML" id="org.eclipse.papyrus.sysml.analysis">
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_iBC4gHDvEeWh-MssWmCB_A"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="#_lTE0gHDwEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="#_lTE0gHDwEeWh-MssWmCB_A"/>
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_yeY0sHDvEeWh-MssWmCB_A"/>
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_m2D8IHDuEeWh-MssWmCB_A"/>
</viewpoints>
@@ -27,12 +27,12 @@
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4cXDtEeWh-MssWmCB_A"/>
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_TR15IHDvEeWh-MssWmCB_A"/>
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_PwD0cHDvEeWh-MssWmCB_A"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="#_r5y7wHDuEeWh-MssWmCB_A"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_Uz8agHDuEeWh-MssWmCB_A"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_wXztQHDwEeWh-MssWmCB_A"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_P3J1cEr7EeSVGbM3cmVSqQ"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_P3J1cEr7EeSVGbM3cmVSqQ"/>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_WC1q0P4UEeSRsNBVzfUrzA"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="#_r5y7wHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_Uz8agHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_wXztQHDwEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_P3J1cEr7EeSVGbM3cmVSqQ"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_P3J1cEr7EeSVGbM3cmVSqQ"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_WC1q0P4UEeSRsNBVzfUrzA"/>
</viewpoints>
<elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.emf/model/infra-emf.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
<elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/model/gmfdiag-common.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
@@ -151,7 +151,7 @@
</owningRules>
<childRules xmi:id="_iBC4g3DvEeWh-MssWmCB_A"/>
</representationKinds>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" xmi:id="_r5y7wHDuEeWh-MssWmCB_A" name="Allocation Table" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" implementationID="PapyrusSysMLAllocationTable">
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" xmi:id="_r5y7wHDuEeWh-MssWmCB_A" name="Allocation Table" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" implementationID="PapyrusSysMLAllocationTable">
<concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf48SYEeaKZJ_pGfaSiA"/>
<modelRules xmi:id="_r5y7wXDuEeWh-MssWmCB_A">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
@@ -159,8 +159,9 @@
<owningRules xmi:id="_r5y7wnDuEeWh-MssWmCB_A">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</owningRules>
+ <configuration href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#/"/>
</representationKinds>
- <representationKinds xsi:type="nattablerepresentation:PapyrusSyncTable" xmi:id="_lTE0gHDwEeWh-MssWmCB_A" name="Requirement Table" concerns="_yMTQcsSdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" implementationID="PapyrusSysMLRequirementTable">
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" xmi:id="_lTE0gHDwEeWh-MssWmCB_A" name="Requirement Table" description="" concerns="_yMTQcsSdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" implementationID="PapyrusSysMLRequirementTable">
<modelRules xmi:id="_lTE0gXDwEeWh-MssWmCB_A">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</modelRules>
@@ -171,6 +172,7 @@
<owningRules xmi:id="_lTE0g3DwEeWh-MssWmCB_A">
<element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</owningRules>
+ <configuration href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
</representationKinds>
<metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
<profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
diff --git a/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java b/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java
index ced51d3eaf8..a2d41951db9 100644
--- a/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java
+++ b/plugins/sysml/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java
@@ -18,12 +18,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager;
import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureDescriptionLanguage;
-import org.eclipse.papyrus.infra.nattable.representation.PapyrusSyncTable;
-import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager;
import org.eclipse.papyrus.infra.nattable.common.reconciler.TableReconciler;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.representation.PapyrusTable;
import org.eclipse.papyrus.sysml.architecture.SysMLArchitectureContextIds;
/**
@@ -44,9 +44,9 @@ public class SysMLTableReconciler_1_3_0 extends TableReconciler {
RepresentationKind newTableKind = null;
if (oldTableKind != null) {
if (ALLOCATION_TABLE.equals(oldTableKind.getName())) {
- newTableKind = getSyncTableKind(oldTableKind.getName(), table);
+ newTableKind = getTableKind(oldTableKind.getName(), table);
} else if (REQUIREMENT_TABLE.equals(oldTableKind.getName())) {
- newTableKind = getSyncTableKind(oldTableKind.getName(), table);
+ newTableKind = getTableKind(oldTableKind.getName(), table);
}
};
@@ -56,12 +56,12 @@ public class SysMLTableReconciler_1_3_0 extends TableReconciler {
return null;
}
- protected PapyrusSyncTable getSyncTableKind(String name, Table table) {
+ protected PapyrusTable getTableKind(String name, Table table) {
ArchitectureDomainManager manager = ArchitectureDomainManager.getInstance();
MergedArchitectureDescriptionLanguage context = (MergedArchitectureDescriptionLanguage) manager.getArchitectureContextById(SysMLArchitectureContextIds.SysML);
for(RepresentationKind pKind : context.getRepresentationKinds()) {
if (pKind.getName().equals(name)) {
- PapyrusSyncTable tKind = (PapyrusSyncTable) pKind;
+ PapyrusTable tKind = (PapyrusTable) pKind;
if (tKind.getModelRules().get(0).getElement().isInstance(table.getContext())) {
return tKind;
}

Back to the top