[jbosstools-commits] JBoss Tools SVN: r43562 - trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Sep 10 13:37:54 EDT 2012
Author: dazarov
Date: 2012-09-10 13:37:54 -0400 (Mon, 10 Sep 2012)
New Revision: 43562
Modified:
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java 2012-09-10 17:14:08 UTC (rev 43561)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java 2012-09-10 17:37:54 UTC (rev 43562)
@@ -30,6 +30,7 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
@@ -115,7 +116,7 @@
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, getEditorId(file.getName()), true);
ISourceViewer viewer = getViewer(editor);
- MarkerResolutionTestUtil.copyFiles(project, new String[]{fileName});
+ //MarkerResolutionTestUtil.copyFiles(project, new String[]{fileName});
try{
// change file
@@ -166,11 +167,12 @@
Assert.fail("Quick fix: "+proposalClass+" not found");
}finally{
- if(editor.isDirty()){
- editor.doSave(new NullProgressMonitor());
- }
+ Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().closeEditor(editor, false);
+// if(editor.isDirty()){
+// editor.doSave(new NullProgressMonitor());
+// }
//editor.dispose();
- MarkerResolutionTestUtil.restoreFiles(project, new String[]{fileName});
+// MarkerResolutionTestUtil.restoreFiles(project, new String[]{fileName});
}
}
More information about the jbosstools-commits
mailing list