diff options
author | spingel | 2009-06-11 03:17:47 +0000 |
---|---|---|
committer | spingel | 2009-06-11 03:17:47 +0000 |
commit | 8752d00df85d6c7ec3239d819d41cec4fc72f4f4 (patch) | |
tree | d44e6fc0b4ca4580ba389276cf2dcc5dc7dd46f6 /org.eclipse.mylyn.tasks.tests | |
parent | 80b5af140111edcd9a6ae975d1f9fc7bbddc7ca0 (diff) | |
download | org.eclipse.mylyn.tasks-8752d00df85d6c7ec3239d819d41cec4fc72f4f4.tar.gz org.eclipse.mylyn.tasks-8752d00df85d6c7ec3239d819d41cec4fc72f4f4.tar.xz org.eclipse.mylyn.tasks-8752d00df85d6c7ec3239d819d41cec4fc72f4f4.zip |
NEW - bug 279833: enablement state is lost after editor refresh
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279833
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests')
-rw-r--r-- | org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/EditorUtilTest.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/EditorUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/EditorUtilTest.java index ad240432d..7201fb488 100644 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/EditorUtilTest.java +++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/EditorUtilTest.java @@ -96,10 +96,21 @@ public class EditorUtilTest extends TestCase { CommonUiUtil.setEnabled(composite, false); CommonUiUtil.setEnabled(composite, true); - // the second time all state information should have been removed and all controls enabled + // the second call should have not changed anything CommonUiUtil.setEnabled(composite, true); assertTrue(composite.getEnabled()); - assertTrue(label.getEnabled()); + assertFalse(label.getEnabled()); + } + + public void testSetEnabledWithoutDisabling() { + Shell shell = new Shell(); + Composite composite = new Composite(shell, SWT.NONE); + composite.setEnabled(false); + + CommonUiUtil.setEnabled(composite, true); + assertFalse(composite.getEnabled()); + CommonUiUtil.setEnabled(composite, true); + assertFalse(composite.getEnabled()); } } |