Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEsteban Dugueperoux2016-01-15 16:28:58 +0000
committerEsteban Dugueperoux2016-01-15 16:32:11 +0000
commit1c90b4a92fc288537c2df689afe243ad8ddbf2e8 (patch)
treeb2f86bfa5f9e43de7341504906d13584db84f80f
parentbd5cf41eb5cc17b33400678a2cacb3d0f8c6558d (diff)
downloadorg.eclipse.sirius-1c90b4a92fc288537c2df689afe243ad8ddbf2e8.tar.gz
org.eclipse.sirius-1c90b4a92fc288537c2df689afe243ad8ddbf2e8.tar.xz
org.eclipse.sirius-1c90b4a92fc288537c2df689afe243ad8ddbf2e8.zip
[483807] Have IsModifiedSavingPolicy manage InMemoryResource correctly
- Don't consider only file and platform resource as saveable but in general all no read-only resource, except odesign. Bug: 483807 Change-Id: I3254a196e708a4e5dbf7bef8d5019c099cddddf2 Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/IsModifiedSavingPolicy.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/IsModifiedSavingPolicy.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/IsModifiedSavingPolicy.java
index 884c8d3a6a..98326045de 100644
--- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/IsModifiedSavingPolicy.java
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/session/IsModifiedSavingPolicy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 THALES GLOBAL SERVICES.
+ * Copyright (c) 2010, 2016 THALES GLOBAL SERVICES.
* 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
@@ -8,7 +8,6 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-
package org.eclipse.sirius.business.internal.session;
import java.io.IOException;
@@ -145,7 +144,7 @@ public class IsModifiedSavingPolicy extends AbstractSavingPolicy {
@Override
public boolean apply(Resource resourcetoSave) {
- return resourcetoSave.getURI().isFile() || resourcetoSave.getURI().isPlatformResource() && !SiriusUtil.isModelerDescriptionFile(resourcetoSave);
+ return !ResourceSetSync.isReadOnly(resourcetoSave) && !SiriusUtil.isModelerDescriptionFile(resourcetoSave);
}
}));

Back to the top