Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2018-04-10 15:59:53 +0000
committervincent lorenzo2018-04-12 15:52:59 +0000
commit224dfa1c661ec52f4b837d272656f69b61b59799 (patch)
tree3b594e650bed5a1c5406d380c5aa64a34043417d /plugins/infra
parentfcad4d4c79d81f7a3c9ba7fcb4e7138687bde6d5 (diff)
downloadorg.eclipse.papyrus-224dfa1c661ec52f4b837d272656f69b61b59799.tar.gz
org.eclipse.papyrus-224dfa1c661ec52f4b837d272656f69b61b59799.tar.xz
org.eclipse.papyrus-224dfa1c661ec52f4b837d272656f69b61b59799.zip
Bug 533439: [Table] Papyrus nattableConfiguration file must use a dedicated resource extending AbtractEMFResource provided by oep.emf.
Change-Id: I232c7d0cd64dc8430b35428c77181b8e891f8c26 Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties2
-rwxr-xr-x[-rw-r--r--]plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties4
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF3
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/internal/infra/nattable/model/resources/NattableConfigurationResource.java63
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration28
5 files changed, 22 insertions, 78 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
index 49b97f81c27..5438c4ddd68 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
@@ -9,7 +9,7 @@
# Contributors:
# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
-pluginName = Nattable Edit Support
+pluginName = Papyrus Nattable Edit Support
providerName = Eclipse Modeling Project
_UI_CreateChild_text = {0}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties
index 2bf1664caa5..6a0a19af667 100644..100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties
@@ -10,7 +10,7 @@
# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
##################################################################################
-pluginName = Nattable Editor
+pluginName = Papyrus Nattable Editor
providerName = Eclipse Modeling Project
_UI_NattableEditor_menu = &Nattable Editor
@@ -58,7 +58,7 @@ _UI_NattableEditorFilenameDefaultBase = My
_UI_NattableEditorFilenameExtensions = nattable
_UI_NattableconfigurationModelWizard_label = Table Configuration Model
-_UI_NattableconfigurationModelWizard_description = Create a new Table Configuratio Model
+_UI_NattableconfigurationModelWizard_description = Create a new Table Configuration Model
_UI_NattableconfigurationEditor_label = Nattableconfiguration Model Editor
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF
index 5f783231462..475987d79cc 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF
@@ -2,7 +2,8 @@ Manifest-Version: 1.0
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.emf.expressions;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.papyrus.infra.emf.expressions;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.emf;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.infra.nattable.model,
org.eclipse.papyrus.infra.nattable.model.factory,
org.eclipse.papyrus.infra.nattable.model.nattable,
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/internal/infra/nattable/model/resources/NattableConfigurationResource.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/internal/infra/nattable/model/resources/NattableConfigurationResource.java
index 3c51da18da0..3ed76425953 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/internal/infra/nattable/model/resources/NattableConfigurationResource.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/internal/infra/nattable/model/resources/NattableConfigurationResource.java
@@ -13,25 +13,20 @@
package org.eclipse.papyrus.internal.infra.nattable.model.resources;
-import java.io.IOException;
-import java.util.Map;
-
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.papyrus.emf.resources.AbstractEMFResource;
/**
* @author Vincent LORENZO
* @since 4.1
*/
-public class NattableConfigurationResource extends XMIResourceImpl {
+public class NattableConfigurationResource extends AbstractEMFResource {
/**
* the extension of the table configuration file
*/
public static final String NATTABLE_CONFIGURATION_RESOURCE_FILE_EXTENSION = "nattableconfiguration"; //$NON-NLS-1$
-
+
/**
*
* Constructor.
@@ -42,56 +37,4 @@ public class NattableConfigurationResource extends XMIResourceImpl {
super(uri);
}
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#useUUIDs()
- *
- * @return
- */
-
- @Override
- protected boolean useUUIDs() {
- return false; // currently, will be done using new resource EMF
- }
-
- /**
- *
- * @see org.eclipse.emf.ecore.resource.impl.ResourceImpl#save(java.util.Map)
- *
- * @param options
- * @throws IOException
- */
- @Override
- public final void save(Map<?, ?> options) throws IOException {
- super.save(getDefaultSaveOptions());// we bypass the options argument to avoid changes between editors (ExpressionEditor, Ecore Sample Reflexive Editor and Ecore Editor
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#getDefaultSaveOptions()
- *
- * @return
- */
- @Override
- public Map<Object, Object> getDefaultSaveOptions() {
- if (null == this.defaultSaveOptions) {
- final Map<Object, Object> saveOptions = super.getDefaultSaveOptions();
- saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
- saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
- saveOptions.put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, true);
- }
- return this.defaultSaveOptions;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#getDefaultLoadOptions()
- *
- * @return
- */
-
- @Override
- public Map<Object, Object> getDefaultLoadOptions() {
- if (null == this.defaultLoadOptions) {
- super.getDefaultLoadOptions();
- }
- return this.defaultLoadOptions;
- }
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration
index 9c25b5d989e..c3f2f2ad31a 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="This table lists all pages (editors) which have the same context than the table of views (or children of the context)" name="TableOfViews" type="PapyrusViewsTable" iconPath="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/icons/nattablepageeditor.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
- <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.infra.nattable.views.config.creation.tester"/>
- <rowHeaderAxisConfiguration indexStyle="NUMERIC">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
- <axisManagers axisManagerId="org.eclipse.papyrus.infra.nattable.pagelist.contents.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" xmi:id="PapyrusViewsTable_XMI_ID" description="This table lists all pages (editors) which have the same context than the table of views (or children of the context)" name="TableOfViews" type="PapyrusViewsTable" iconPath="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/icons/nattablepageeditor.png" cellEditorDeclaration="COLUMN" defaultRowAxisProvider="_YwraxDzQEei_1txcmoHe_A" defaultColumnAxisProvider="_YwqztjzQEei_1txcmoHe_A">
+ <creationTester xmi:type="nattabletester:JavaTableTester" xmi:id="_YwqMoTzQEei_1txcmoHe_A" tester="org.eclipse.papyrus.infra.nattable.views.config.creation.tester"/>
+ <rowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" xmi:id="_YwqzsDzQEei_1txcmoHe_A" indexStyle="NUMERIC" displayLabel="true" displayFilter="false" displayIndex="true">
+ <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_YwqzsTzQEei_1txcmoHe_A" displayIcon="true" displayLabel="true"/>
+ <axisManagers xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" xmi:id="_YwqzsjzQEei_1txcmoHe_A" axisManagerId="org.eclipse.papyrus.infra.nattable.pagelist.contents.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="_YwqzsTzQEei_1txcmoHe_A"/>
</rowHeaderAxisConfiguration>
- <columnHeaderAxisConfiguration>
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
- <axisManagers axisManagerId="org.eclipse.papyrus.infra.nattable.page.view.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider"/>
+ <columnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" xmi:id="_YwqzszzQEei_1txcmoHe_A" displayLabel="true" displayFilter="false" displayIndex="true">
+ <ownedLabelConfigurations xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" xmi:id="_YwqztDzQEei_1txcmoHe_A" displayIcon="true" displayLabel="true" displayIsDerived="true" displayType="true" displayMultiplicity="true" displayName="true"/>
+ <axisManagers xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" xmi:id="_YwqztTzQEei_1txcmoHe_A" axisManagerId="org.eclipse.papyrus.infra.nattable.page.view.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider"/>
</columnHeaderAxisConfiguration>
- <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="Provides the features of the views" name="Papyrus Views feature provider">
- <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0" element="nattable_editor_pages:/name"/>
- <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0" element="nattable_editor_pages:/context"/>
- <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0" element="nattable_editor_pages:/isOpen"/>
- <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0" element="nattable_editor_pages:/type"/>
+ <columnAxisProviders xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_YwqztjzQEei_1txcmoHe_A" description="Provides the features of the views" name="Papyrus Views feature provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_YwrawDzQEei_1txcmoHe_A" manager="_YwqztTzQEei_1txcmoHe_A" element="nattable_editor_pages:/name"/>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_YwrawTzQEei_1txcmoHe_A" manager="_YwqztTzQEei_1txcmoHe_A" element="nattable_editor_pages:/context"/>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_YwrawjzQEei_1txcmoHe_A" manager="_YwqztTzQEei_1txcmoHe_A" element="nattable_editor_pages:/isOpen"/>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_YwrawzzQEei_1txcmoHe_A" manager="_YwqztTzQEei_1txcmoHe_A" element="nattable_editor_pages:/type"/>
</columnAxisProviders>
- <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider"/>
+ <rowAxisProviders xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_YwraxDzQEei_1txcmoHe_A"/>
</nattableconfiguration:TableConfiguration>

Back to the top