Author: mareshkau
Date: 2010-02-16 05:57:43 -0500 (Tue, 16 Feb 2010)
New Revision: 20293
Modified:
branches/jbosstools-3.1.0.RC2/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTestSetup.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5820
https://jira.jboss.org/jira/browse/JBIDE-5821 content outline view has been hided, because
it can cause concurent modification exception too
Modified:
branches/jbosstools-3.1.0.RC2/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTestSetup.java
===================================================================
---
branches/jbosstools-3.1.0.RC2/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTestSetup.java 2010-02-16
06:11:49 UTC (rev 20292)
+++
branches/jbosstools-3.1.0.RC2/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTestSetup.java 2010-02-16
10:57:43 UTC (rev 20293)
@@ -17,6 +17,8 @@
import junit.framework.TestSuite;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.tests.ImportBean;
@@ -33,6 +35,8 @@
* in setUp method and removed in tear down method
*/
private List<ImportBean> testProjectNames;
+
+ private static final String CONTENT_OUTLINE_VIEW_ID =
"org.eclipse.ui.views.ContentOutline"; //$NON-NLS-1$
public VpeTestSetup(TestSuite test, List<ImportBean> testProjectNames) {
super(test);
@@ -51,6 +55,14 @@
+
File.separator+importBean.getImportProjectName()),importBean.getImportProjectName());
}
}
+ //added by Maksim Areshkau, Fix for
https://jira.jboss.org/jira/browse/JBIDE-5820
https://jira.jboss.org/jira/browse/JBIDE-5821
+ //remove this code when we will move on wtp 3.2
+ IViewReference[] iviewReferences=
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
+ for (IViewReference iViewReference : iviewReferences) {
+
if(VpeTestSetup.CONTENT_OUTLINE_VIEW_ID.equalsIgnoreCase(iViewReference.getId())){
+
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(iViewReference);
+ }
+ }
}
/* (non-Javadoc)