Skip to content
Snippets Groups Projects
Commit 6c8f98bf authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

resolving the generation of random test suites

refs 1565
parent 6eeb5f2d
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
* @author ratiu
* @author $Author: ratiu $
* @version $Rev: 5274 $
* @ConQAT.Rating GREEN Hash: 0EE122A2E4B8DBEADC08D23AD6F12B1D
* @ConQAT.Rating YELLOW Hash: C71F14128D0F2A54569DC95C1B39395C
*/
public class LibraryService extends EObjectAwareServiceBase<ILibraryElementHandler<EObject>>
implements ILibraryService {
......@@ -200,16 +200,21 @@ public class LibraryService extends EObjectAwareServiceBase<ILibraryElementHandl
return;
}
final ITopLevelElement topLevel = IPersistencyService.INSTANCE.getTopLevelElementFor(ref);
topLevel.runAsNonDirtyingCommand(new Runnable() {
Runnable cmd = new Runnable() {
@Override
public void run() {
ILibraryService.INSTANCE.setDirty(ref, false);
EObject copy = EcoreUtil.copy(lc.getWrappedElement());
ref.setLibraryElementShadow(copy);
}
});
};
final ITopLevelElement topLevel = IPersistencyService.INSTANCE.getTopLevelElementFor(ref);
if(topLevel != null) {
topLevel.runAsNonDirtyingCommand(cmd);
} else {
cmd.run();
}
if(!libraryElementsReferencesWithRegisteredAdapters.contains(ref)) {
registerChangeObserverOnLibraryElement(ref, lc);
......
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