Author: mareshkau
Date: 2010-02-16 06:10:05 -0500 (Tue, 16 Feb 2010)
New Revision: 20294
Modified:
trunk/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
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTestSetup.java
===================================================================
---
trunk/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)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTestSetup.java 2010-02-16
11:10:05 UTC (rev 20294)
@@ -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;
@@ -34,6 +36,8 @@
*/
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);
setTestProjects(testProjectNames);
@@ -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)