summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibault Le Ouay2014-05-16 05:33:56 (EDT)
committerCamille Letavernier2014-05-16 12:23:13 (EDT)
commit1aa0b42737d8c240c286ea8874a5d717de4e6bde (patch)
tree6b6a8872bab04ec5c1aa256e66ce2661d2be2dae
parent9c54f2800f63b1b2e41eefda8a8fef1410b65dec (diff)
downloadorg.eclipse.papyrus-1aa0b42737d8c240c286ea8874a5d717de4e6bde.zip
org.eclipse.papyrus-1aa0b42737d8c240c286ea8874a5d717de4e6bde.tar.gz
org.eclipse.papyrus-1aa0b42737d8c240c286ea8874a5d717de4e6bde.tar.bz2
Remove depracated reference to di model file extensionrefs/changes/12/26712/3
Change-Id: Ie0c004be0839706176d441511230dcb3865898d7 Signed-off-by: Thibault Le Ouay <t.leouay@sherpa-eng.com>
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/DiModelUtils.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java28
2 files changed, 16 insertions, 16 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/DiModelUtils.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/DiModelUtils.java
index 3c41069..c3cc02a 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/DiModelUtils.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/DiModelUtils.java
@@ -32,11 +32,11 @@ public class DiModelUtils {
return null;
}
IFile diFile;
- if(SashModel.MODEL_FILE_EXTENSION.equalsIgnoreCase(file.getFileExtension())) {
+ if(DiModel.MODEL_FILE_EXTENSION.equalsIgnoreCase(file.getFileExtension())) {
diFile = file;
} else {
// Find the correct file
- IPath diPath = file.getFullPath().removeFileExtension().addFileExtension(SashModel.MODEL_FILE_EXTENSION);
+ IPath diPath = file.getFullPath().removeFileExtension().addFileExtension(DiModel.MODEL_FILE_EXTENSION);
diFile = file.getParent().getFile(diPath.makeRelativeTo(file.getParent().getFullPath()));
}
return diFile;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
index e929871..a940f92 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
@@ -10,7 +10,7 @@
* Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Rewrite the sash model - store in the plugin's PreferenceStore (Bug 429239)
* Christian W. Damus (CEA) - bug 429242
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource.sasheditor;
@@ -34,10 +34,10 @@ import com.google.common.base.Objects;
*
* It may be stored in the *.di file (Legacy mode) or in a *.sash file in the user
* preference space (~workspace/.metadata/.plugins/org.eclipse.papyrus.infra.core/)
- *
+ *
* @author Cedric Dumoulin
* @author Camille Letavernier
- *
+ *
*/
public class SashModel extends EMFLogicalModel implements IModel {
@@ -45,7 +45,7 @@ public class SashModel extends EMFLogicalModel implements IModel {
/**
* File extension.
- *
+ *
* @deprecated Use {@link DiModel#MODEL_FILE_EXTENSION} instead. The SashModel has been moved to a separate file
*/
@Deprecated
@@ -62,9 +62,9 @@ public class SashModel extends EMFLogicalModel implements IModel {
public static final String MODEL_ID = "org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel"; //$NON-NLS-1$
/**
- *
+ *
* Constructor.
- *
+ *
*/
public SashModel() {
@@ -72,15 +72,15 @@ public class SashModel extends EMFLogicalModel implements IModel {
/**
* Get the file extension used for this model.
- *
+ *
* @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
- *
+ *
* @return
*/
@Override
protected String getModelFileExtension() {
if(isLegacy((resourceURI == null) ? resourceURI : resourceURI.trimFileExtension())) {
- return MODEL_FILE_EXTENSION;
+ return DiModel.MODEL_FILE_EXTENSION;
} else {
return SASH_MODEL_FILE_EXTENSION;
}
@@ -109,14 +109,14 @@ public class SashModel extends EMFLogicalModel implements IModel {
return false;
}
String fileExtension = resource.getURI().fileExtension();
- return MODEL_FILE_EXTENSION.equals(fileExtension) || SASH_MODEL_FILE_EXTENSION.equals(fileExtension);
+ return DiModel.MODEL_FILE_EXTENSION.equals(fileExtension) || SASH_MODEL_FILE_EXTENSION.equals(fileExtension);
}
/**
* Get the identifier used to register this model.
- *
+ *
* @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getIdentifier()
- *
+ *
* @return
*/
@Override
@@ -178,7 +178,7 @@ public class SashModel extends EMFLogicalModel implements IModel {
*
* @param uriWithoutExtension
* @return
- *
+ *
*/
protected URI getSashModelURI(URI uriWithoutExtension) {
URIConverter converter = getModelManager().getURIConverter();
@@ -205,7 +205,7 @@ public class SashModel extends EMFLogicalModel implements IModel {
}
protected URI getLegacyURI(URI uriWithoutExtension) {
- return uriWithoutExtension.appendFileExtension(MODEL_FILE_EXTENSION);
+ return uriWithoutExtension.appendFileExtension(DiModel.MODEL_FILE_EXTENSION);
}
protected URI getSashModelStoreURI(URI uriWithoutExtension) {