Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2011-09-25 13:42:49 +0000
committerMartin Fluegge2011-09-25 13:42:49 +0000
commit9eec85bb8884ca82791f1f8bc4bb00f2f0d4af34 (patch)
tree0f7f60dd84b4f7b019cf3897afd3f2d98cb67869 /plugins/org.eclipse.emf.cdo.dawn.tests
parent4e7428cad8fb510b7b1dea2a6bf46105457f76cd (diff)
downloadcdo-9eec85bb8884ca82791f1f8bc4bb00f2f0d4af34.tar.gz
cdo-9eec85bb8884ca82791f1f8bc4bb00f2f0d4af34.tar.xz
cdo-9eec85bb8884ca82791f1f8bc4bb00f2f0d4af34.zip
[319486] [Dawn] Implement locking mechanism for extended editors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319486
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.tests')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/emf/EMFLockingTest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/util/DawnSWTBotEMFEditor.java2
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/emf/EMFLockingTest.java b/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/emf/EMFLockingTest.java
index b69facbc3f..41cc717f88 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/emf/EMFLockingTest.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/emf/EMFLockingTest.java
@@ -58,9 +58,14 @@ public class EMFLockingTest extends AbstractDawnEMFTest
AClass aClass2 = ((ACoreRoot)resource2.getContents().get(0)).getClasses().get(0);
aClass2.cdoWriteLock().lock();
}
+
sleep(500);
+
assertEquals(true, aClass.cdoWriteLock().isLockedByOthers());
+ // SWTBotTreeItem treeItem = selectFolder(tree.getAllItems(), "BClass", false);
+ // assertEquals(DawnColorConstants.COLOR_LOCKED_REMOTELY, treeItem.foregroundColor());
+
editor.close();
}
@@ -100,6 +105,9 @@ public class EMFLockingTest extends AbstractDawnEMFTest
assertEquals(false, aClass.cdoWriteLock().isLocked());
assertEquals(false, aClass2.cdoWriteLock().isLockedByOthers());
+ // SWTBotTreeItem treeItem = selectFolder(tree.getAllItems(), "AClass", false);
+ // assertEquals(DawnColorConstants.COLOR_LOCKED_LOCALLY, treeItem.foregroundColor());
+
editor.close();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/util/DawnSWTBotEMFEditor.java b/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/util/DawnSWTBotEMFEditor.java
index 86f0a08983..a07a0678f2 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/util/DawnSWTBotEMFEditor.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/ui/util/DawnSWTBotEMFEditor.java
@@ -102,7 +102,7 @@ public class DawnSWTBotEMFEditor extends SWTBotEditor
return runnable.getResult();
}
- protected Viewer getCurrentViewer()
+ public Viewer getCurrentViewer()
{
final MultiPageEditorPart editor = (MultiPageEditorPart)getReference().getEditor(false);

Back to the top