Skip to content
Snippets Groups Projects
Commit d2c4cafc authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

Fix attempt

refs 2140
parent 1fee1cfb
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 06A2D54FFE51AEEC0038682D0BAAB1B6
* @ConQAT.Rating YELLOW Hash: EC2945EED4DFFA779750D8F89323C4CA
*/
public interface ITopLevelElement {
......@@ -116,4 +116,11 @@ public interface ITopLevelElement {
/** Returns the resource set. */
ResourceSet getResourceSet();
/**
* Perform saving of the model and states the last change as intended.
* Added to solve issue #2140.
*/
void doSaveAndResetLastChangeWasIntended(IProgressMonitor monitor) throws IOException,
CoreException;
}
......@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 0DC1D95FF6AD020640DADDB2EA58A3F9
* @ConQAT.Rating YELLOW Hash: 1085F8EFF356A0082ADCA16F6373B3E3
*/
final class DummyTopLevelElement implements ITopLevelElement {
......@@ -120,6 +120,13 @@ final class DummyTopLevelElement implements ITopLevelElement {
// ignore
}
/** {@inheritDoc} */
@Override
public void doSaveAndResetLastChangeWasIntended(IProgressMonitor monitor) {
// ignore
}
/** {@inheritDoc} */
@Override
public void prepareIDs(EObject modelElement) {
......
......@@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.service.base.ObjectAwareServiceBase;
* @author mou
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 4008B014AD23F8E56B1D90CEE9A5C319
* @ConQAT.Rating YELLOW Hash: 20D69C0AFD8A28767285B21F9096DF2D
*/
public class MigrationService extends ObjectAwareServiceBase<IMigrationProvider> implements
IMigrationService {
......@@ -78,7 +78,7 @@ public class MigrationService extends ObjectAwareServiceBase<IMigrationProvider>
});
try {
input.doSave(new NullProgressMonitor());
input.doSaveAndResetLastChangeWasIntended(new NullProgressMonitor());
} catch(Exception e) {
error(ToolingKernelActivator.getDefault(), "Error during migration of model!", e);
......
......@@ -61,7 +61,7 @@ import org.fortiss.tooling.kernel.utils.UniqueIDUtils;
* @author hummel
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: CE87676ABF5177C104A16D0F8A1C7150
* @ConQAT.Rating YELLOW Hash: 4DFE8CD44974ECADFC3FEFE865258E1C
*/
class ModelContext implements ITopLevelElement, CommandStackListener {
......@@ -233,6 +233,16 @@ class ModelContext implements ITopLevelElement, CommandStackListener {
}
monitor.done();
}
/**
* Perform saving of the model and states the last change as intended.
* Added to solve issue #2140.
*/
@Override
public void doSaveAndResetLastChangeWasIntended(IProgressMonitor monitor) throws IOException,
CoreException {
doSave(monitor);
getAndResetLastChangeWasCausedByModelContext();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment