JBoss Tools SVN: r4804 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 21:02:21 -0500 (Thu, 08 Nov 2007)
New Revision: 4804
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
Project with test pages now imported only once before all tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2007-11-08 23:49:50 UTC (rev 4803)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2007-11-09 02:02:21 UTC (rev 4804)
@@ -53,14 +53,19 @@
*/
protected void setUp() throws Exception {
super.setUp();
+
+ // TODO: Use TestSetup to create and remove project once for all tests
+ // not for every one
+ if(ResourcesPlugin.getWorkspace().getRoot().findMember("RichFacesTest")==null) {
- ImportRichFacesComponents.importRichFacesPages(RichFacesTestPlugin
- .getPluginResourcePath() + TEST_PROJECT_JAR_PATH);
-
- waitForJobs();
+ ImportRichFacesComponents.importRichFacesPages(RichFacesTestPlugin
+ .getPluginResourcePath() + TEST_PROJECT_JAR_PATH);
+
+ waitForJobs();
+ waitForJobs();
+ delay(5000);
+ }
Platform.addLogListener(this);
- waitForJobs();
- delay(5000);
}
/**
@@ -72,8 +77,8 @@
*/
protected void tearDown() throws Exception {
super.tearDown();
- ImportRichFacesComponents.removeProject();
- waitForJobs();
+// ImportRichFacesComponents.removeProject();
+// waitForJobs();
Platform.removeLogListener(this);
}
17 years, 2 months
JBoss Tools SVN: r4803 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 18:49:50 -0500 (Thu, 08 Nov 2007)
New Revision: 4803
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/build.properties
Log:
fix test errors for richfaces
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2007-11-08 23:49:26 UTC (rev 4802)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2007-11-08 23:49:50 UTC (rev 4803)
@@ -12,3 +12,4 @@
org.eclipse.ui.ide,
org.jboss.tools.common
Eclipse-LazyStart: true
+Bundle-ClassPath: vpe-rf-test.jar
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/build.properties 2007-11-08 23:49:26 UTC (rev 4802)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/build.properties 2007-11-08 23:49:50 UTC (rev 4803)
@@ -1,4 +1,11 @@
-source.. = src/
-output.. = bin/
bin.includes = META-INF/,\
- .
+ resources/,\
+ vpe-rf-test.jar
+jars.compile.order = vpe-rf-test.jar
+source.vpe-rf-test.jar = src/
+output.vpe-rf-test.jar = bin/
+src.includes = src/,\
+ resources/,\
+ META-INF/,\
+ build.properties
+source.vpe-rf-test.jar = src/
17 years, 2 months
JBoss Tools SVN: r4802 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 18:49:26 -0500 (Thu, 08 Nov 2007)
New Revision: 4802
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
fix test errors for richfaces
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2007-11-08 21:12:04 UTC (rev 4801)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2007-11-08 23:49:26 UTC (rev 4802)
@@ -306,7 +306,6 @@
id="org.jboss.tools.jsf.vpe.richfaces.test"
download-size="0"
install-size="0"
- version="0.0.0"
- unpack="false"/>
+ version="0.0.0"/>
</feature>
17 years, 2 months
JBoss Tools SVN: r4801 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 16:12:04 -0500 (Thu, 08 Nov 2007)
New Revision: 4801
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
include richfaces tests in the build
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-11-08 21:11:59 UTC (rev 4800)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-11-08 21:12:04 UTC (rev 4801)
@@ -81,6 +81,8 @@
for (IResource r : this.resourcesToCleanup) {
try {
System.out.println("Deleting " + r);
+ // TODO - need to figure out how to wait until all build/validation
+ // are finished
//r.delete(true, null);
} catch(Exception e) {
System.out.println("Error deleting " + r);
17 years, 2 months
JBoss Tools SVN: r4800 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 16:11:59 -0500 (Thu, 08 Nov 2007)
New Revision: 4800
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
include richfaces tests in the build
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2007-11-08 21:02:59 UTC (rev 4799)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2007-11-08 21:11:59 UTC (rev 4800)
@@ -302,4 +302,11 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.jsf.vpe.richfaces.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
17 years, 2 months
JBoss Tools SVN: r4799 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 16:02:59 -0500 (Thu, 08 Nov 2007)
New Revision: 4799
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
to fix exception 1 below test switched to using once created project. setUp just check if it is created and use it or create a new one.
delete project is commented out in abstract class, because it always shrows exceptions cannot delete project.
Exception 1
--------------
Resource '/warprj' already exists.
org.eclipse.core.internal.resources.ResourceException: Resource '/warprj' already exists.
at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:289)
at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:276)
at org.eclipse.core.internal.resources.Project.create(Project.java:225)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectFrameworkImpl.create(FacetedProjectFrameworkImpl.java:717)
at org.eclipse.wst.common.project.facet.core.ProjectFacetsManager.create(ProjectFacetsManager.java:399)
at org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest.createSeamProject(AbstractSeamFacetTest.java:142)
at org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest.createSeamWarProject(AbstractSeamFacetTest.java:157)
at org.jboss.tools.seam.core.test.project.facet.Seam2FacetInstallDelegateTest.setUp(Seam2FacetInstallDelegateTest.java:62)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:572)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:171)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-11-08 20:51:11 UTC (rev 4798)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-11-08 21:02:59 UTC (rev 4799)
@@ -81,7 +81,7 @@
for (IResource r : this.resourcesToCleanup) {
try {
System.out.println("Deleting " + r);
- r.delete(true, null);
+ //r.delete(true, null);
} catch(Exception e) {
System.out.println("Error deleting " + r);
e.printStackTrace();
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-11-08 20:51:11 UTC (rev 4798)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-11-08 21:02:59 UTC (rev 4799)
@@ -21,6 +21,8 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceProxy;
import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -50,22 +52,29 @@
@Override
protected void setUp() throws Exception {
-
- seam2Facet = ProjectFacetsManager.getProjectFacet("jst.seam");
- seam2FacetVersion = seam2Facet.getVersion("2.0");
+ IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IProject war = (IProject)wsRoot.findMember("warprj");
+ IProject ear = (IProject)wsRoot.findMember("earprj");
- File folder = new File(System.getProperty("jbosstools.test.seam.2.0.0.home", "/home/max/work/products/jboss-seam-2.0.0.CR2"));
+ if(war==null && ear==null) {
- SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0, folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
- SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_2_0_0);
-
- warProject = createSeamWarProject("warprj");
- earProject = createSeamEarProject("earprj");
+ seam2Facet = ProjectFacetsManager.getProjectFacet("jst.seam");
+ seam2FacetVersion = seam2Facet.getVersion("2.0");
+
+ File folder = new File(System.getProperty("jbosstools.test.seam.2.0.0.home", "c:/java/jboss-seam-2.0.0.CR3"));
+
+ SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0, folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
+ SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_2_0_0);
- warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+ warProject = createSeamWarProject("warprj");
+ earProject = createSeamEarProject("earprj");
+
+ warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+ } else {
+ warProject = ProjectFacetsManager.create(war);
+ earProject = ProjectFacetsManager.create(ear);
+ }
-
-
super.setUp();
}
@@ -87,6 +96,9 @@
warlibs.add("antlr-runtime.jar");
warlibs.add("commons-beanutils.jar");
warlibs.add("commons-digester.jar");
+ warlibs.add("commons-collections.jar");
+ warlibs.add("janino.jar");
+ warlibs.add("antlr.jar");
warlibs.add("drools-compiler.jar");
warlibs.add("drools-core.jar");
warlibs.add("core.jar");
17 years, 2 months
JBoss Tools SVN: r4798 - trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 15:51:11 -0500 (Thu, 08 Nov 2007)
New Revision: 4798
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
Log:
fix for JUnit test error
testVpePluginsResolved Failure org.jboss.tools.vpe.mozilla failed to load.
junit.framework.AssertionFailedError: org.jboss.tools.vpe.mozilla failed to load.
at org.jboss.tools.tests.PlugInLoadTest.isPluginResolved(PlugInLoadTest.java:30)
at org.jboss.tools.tests.PlugInLoadTest.assertPluginsResolved(PlugInLoadTest.java:45)
at org.jboss.tools.tests.PlugInLoadTest.testVpePluginsResolved(PlugInLoadTest.java:100)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:572)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:171)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2007-11-08 20:46:39 UTC (rev 4797)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2007-11-08 20:51:11 UTC (rev 4798)
@@ -98,9 +98,9 @@
public void testVpePluginsResolved ()
{
assertPluginsResolved(new String[] {
- rhdsNS+"vpe.mozilla",
rhdsNS+"vpe",
- rhdsNS+"vpe.ui.palette"
+ rhdsNS+"vpe.ui.palette",
+ rhdsNS+"vpe.xulrunner"
});
}
17 years, 2 months
JBoss Tools SVN: r4797 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 15:46:39 -0500 (Thu, 08 Nov 2007)
New Revision: 4797
Removed:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest1.java
Log:
include xullrunner tests in the build ajnd remove copy of seam ui tests
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest1.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest1.java 2007-11-08 20:46:36 UTC (rev 4796)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest1.java 2007-11-08 20:46:39 UTC (rev 4797)
@@ -1,643 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
-
-******************************************************************************/
-package org.jboss.tools.seam.ui.test.view;
-
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.internal.decorators.DecoratorManager;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.IExtensionStateModel;
-import org.eclipse.ui.progress.UIJob;
-import org.jboss.tools.common.model.XJob;
-import org.jboss.tools.common.util.ResourcesUtils;
-import org.jboss.tools.common.util.WorkbenchUtils;
-import org.jboss.tools.jst.web.ui.WebDevelopmentPerspectiveFactory;
-import org.jboss.tools.seam.core.ISeamComponent;
-import org.jboss.tools.seam.core.ISeamPackage;
-import org.jboss.tools.seam.core.ISeamProject;
-import org.jboss.tools.seam.ui.ISeamUiConstants;
-import org.jboss.tools.seam.ui.views.ViewConstants;
-import org.jboss.tools.test.util.JUnitUtils;
-
-/**
- *
- * @author eskimo
- *
- */
-public class SeamComponentsViewTest1 extends TestCase {
- IProject project;
- IFile componentsFile;
- IFile classFile;
- Tree tree;
- CommonNavigator navigator;
- CommonViewer viewer;
- IExtensionStateModel m2;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- Job.getJobManager().addJobChangeListener(new IJobChangeListener() {
-
- public void aboutToRun(IJobChangeEvent event) {
- System.out.println(event.getJob().getName());
-
- }
-
- public void awake(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void done(IJobChangeEvent event) {
-
-
- }
-
- public void running(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void scheduled(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void sleeping(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- });
-
- ResourcesPlugin.getWorkspace().addResourceChangeListener(new IResourceChangeListener() {
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- System.out.println(event.getResource().getLocation().toString());
- }
- });
- WorkbenchUtils.getWorkbench().showPerspective(
- WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID,
- WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow());
-
- project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("TestComponentView");
-
- if(project==null) {
- project = ResourcesUtils.importProject(Platform.getBundle("org.jboss.tools.seam.ui.test"), "/projects/TestComponentView", new NullProgressMonitor());
- }
- navigator = getSeamComponentsView();
- viewer = navigator.getCommonViewer();
- tree = viewer.getTree();
-
- m2 = navigator.getNavigatorContentService().findStateModel("org.jboss.tools.seam.ui.views.rootContent");
-
- componentsFile = project.getFile("WebContent/WEB-INF/components.xml");
- assertTrue("Cannot find components.xml in test project", componentsFile != null && componentsFile.exists());
-
- }
-
- public void testFlatSeamPackages() throws InterruptedException{
- m2.setBooleanProperty(ViewConstants.PACKAGE_STRUCTURE, true);
- updateView();
- JobUtils.waitUsersJobsAreFinished();
- viewer.expandAll();
- for (Object viewObject : viewer.getExpandedElements()) {
- if(viewObject instanceof ISeamPackage) {
- System.out.println(((ISeamPackage)viewObject).getQualifiedName());
- }
- }
- ISeamPackage seamPackage = findSeamPackage(tree, "package1");
- assertTrue("Expected package 'package1' was not" +
- " found",seamPackage!=null);
-
- seamPackage = findSeamPackage(tree, "package1.package2");
- assertTrue("Expected package 'package1.package2' was not" +
- " found",seamPackage!=null);
-
- seamPackage = findSeamPackage(tree, "package1.package2.package3");
- assertTrue("Expected package 'package1.package2.package3' was not" +
- " found",seamPackage!=null);
-
- seamPackage = findSeamPackage(tree, "package1.package2.package3.package4");
- assertTrue("Expected package 'package1.package2.package3.package4' was not" +
- " found",seamPackage!=null);
- }
-
-// public void testHierarchicalSeamPackages() throws InterruptedException{
-// m2.setBooleanProperty(ViewConstants.PACKAGE_STRUCTURE, false);
-// m2.setBooleanProperty(ViewConstants.SCOPE_PRESENTATION, false);
-// updateView();
-// JobUtils.waitUsersJobsAreFinished();
-// ISeamPackage seamPackage = findSeamPackage(tree, "package4");
-// assertTrue("Expected package 'package4' was not" +
-// " found",seamPackage!=null);
-//
-// seamPackage = (ISeamPackage)seamPackage.getParent();
-// assertTrue("For 'package5' expected parent is 'package3' not '" +
-// seamPackage.getName() +"'", "package3".equals(seamPackage.getName()));
-//
-// seamPackage = findSeamPackage(tree, "package3");
-// assertTrue("Expected package 'package3' was not" +
-// " found",seamPackage!=null);
-//
-// seamPackage = (ISeamPackage)seamPackage.getParent();
-// assertTrue("For 'package3' expected parent is 'package2' not '" +
-// seamPackage.getName() +"'", "package2".equals(seamPackage.getName()));
-//
-// seamPackage = findSeamPackage(tree, "package2");
-// assertTrue("Expected package 'package2' was not" +
-// " found",seamPackage!=null);
-//
-// seamPackage = (ISeamPackage)seamPackage.getParent();
-// assertTrue("For 'package2' expected parent is 'package1' not '" +
-// seamPackage.getName() +"'", "package1".equals(seamPackage.getName()));
-// }
-//
-// public void testAddComponentInXmlFile() throws InterruptedException{
-//
-// IFile file1 = project.getFile("WebContent/WEB-INF/components.1");
-// if(file1 == null || !file1.exists()) {
-// fail("Cannot find test data file 'WebContent/WEB-INF/components.1'");
-// }
-//
-// try {
-// System.out.println("--------------------Before set content");
-// componentsFile.setContents(file1.getContents(),
-// true, false, new NullProgressMonitor());
-// System.out.println("--------------------After set content");
-// componentsFile.touch(new NullProgressMonitor());
-// System.out.println("--------------------After touch");
-// } catch (CoreException e) {
-// JUnitUtils.fail("Error in changing 'components.xml' content to " +
-// "'WebContent/WEB-INF/components.1'", e);
-// }
-// JobUtils.waitUsersJobsAreFinished();
-// updateView();
-//
-// ISeamPackage seamPackage = findSeamPackage(tree, "myPackage");
-// assertTrue("Seam model is not updated, expected package 'myPackage'" +
-// " is not found in tree",seamPackage!=null);
-//
-// ISeamComponent component = findSeamComponent(seamPackage,
-// "myPackage.myComponent");
-//
-// assertTrue("Expected component 'myPackage.myStringComponent' was not" +
-// " found",component!=null);
-// }
-//
-// public void testRenameComponentInXmlFile(){
-// m2.setBooleanProperty(ViewConstants.PACKAGE_STRUCTURE, true);
-//
-// IFile file1 = project.getFile("WebContent/WEB-INF/components.2");
-// if(file1 == null || !file1.exists()) {
-// fail("Cannot find test data file 'WebContent/WEB-INF/components.2'");
-// }
-//
-// try{
-// System.out.println("--------------------Before set content");
-// componentsFile.setContents(file1.getContents(), true, false, new NullProgressMonitor());
-// System.out.println("--------------------After set content");
-// componentsFile.touch(new NullProgressMonitor());
-// System.out.println("--------------------After set content");
-// }catch(Exception ex){
-// JUnitUtils.fail("Error in changing 'components.xml' content to " +
-// "'WebContent/WEB-INF/components.2'", ex);
-// }
-//
-// ISeamPackage seamPackage = findSeamPackage(tree, "myRenamedPackage");
-// assertTrue("Expected package 'myRenamedPackage' was not found it tree",
-// seamPackage!=null);
-//
-// ISeamComponent component = findSeamComponent(seamPackage, "myRenamedPackage.myRenamedComponent");
-// assertTrue("Expected component 'myRenamedPackage.myRenamedComponent' not found " +
-// "after renaming",component!=null);
-//
-// seamPackage = findSeamPackage(tree, "package4");
-// assertTrue("Expected package 'myPackage4' was not found it tree",
-// seamPackage!=null);
-//
-// component = findSeamComponent(seamPackage, "package4.component4");
-// assertTrue("Expected component 'package4.component4' not found " +
-// "after renaming",component!=null);
-//
-// seamPackage = findSeamPackage(tree, "package4.package3");
-// assertTrue("Expected package 'package4.package3' was not found it tree",
-// seamPackage!=null);
-//
-// component = findSeamComponent(seamPackage, "package4.package3.component3");
-// assertTrue("Expected component 'package4.package3.component3' not found " +
-// "after renaming",component!=null);
-//
-// seamPackage = findSeamPackage(tree, "package4.package3.package2");
-// assertTrue("Expected package 'package4.package3.package2' was not found it tree",
-// seamPackage!=null);
-//
-// component = findSeamComponent(seamPackage, "package4.package3.package2.component2");
-// assertTrue("Expected component 'package4.package3.package2.component2' not found " +
-// "after renaming",component!=null);
-//
-// seamPackage = findSeamPackage(tree, "package4.package3.package2.package1");
-// assertTrue("Expected package 'package4.package3.package2.package1' was not found it tree",
-// seamPackage!=null);
-//
-// component = findSeamComponent(seamPackage, "package4.package3.package2.package1.component1");
-// assertTrue("Expected component 'package4.package3.package2.package1.component1' not found " +
-// "after renaming",component!=null);
-//
-// }
-
-// public void testDeleteComponentInXmlFile(){
-//
-// IFile file1 = project.getFile("WebContent/WEB-INF/components.3");
-// assertTrue("Cannot find components.2 in test project", file1 != null && file1.exists());
-//
-// try{
-// System.out.println("--------------------Before set content");
-// componentsFile.setContents(file1.getContents(), true, false, new NullProgressMonitor());
-// System.out.println("--------------------After set content");
-// componentsFile.touch(new NullProgressMonitor());
-// System.out.println("--------------------After touch");
-// }catch(Exception ex){
-// JUnitUtils.fail("Cannot read file WebContent/WEB-INF/components.3", ex);
-// }
-//
-// refreshProject(project);
-//
-// ISeamPackage seamPackage = findSeamPackage(tree, "package4");
-// assertTrue("Expected package 'myPackage4' is expected to be deleted",
-// seamPackage==null);
-//
-// seamPackage = findSeamPackage(tree, "package4.package3");
-// assertTrue("Expected package 'package4.package3' is expected to be deleted",
-// seamPackage==null);
-//
-// seamPackage = findSeamPackage(tree, "package4.package3.package2");
-// assertTrue("Expected package 'package4.package3.package2' is expected to be deleted",
-// seamPackage==null);
-//
-// seamPackage = findSeamPackage(tree, "package4.package3.package2.package1");
-// assertTrue("Expected package 'package4.package3.package2.package1' is expected to be deleted",
-// seamPackage==null);
-//
-// }
-
-// public void testAddComponentInClass(){
-//
-// classFile = project.getFile("JavaSource/demo/Person.java");
-// assertTrue("Cannot find Person.java in test project", componentsFile != null);
-//
-// CommonNavigator navigator = getSeamComponentsView();
-// navigator.getCommonViewer().expandAll();
-//
-// Tree tree = navigator.getCommonViewer().getTree();
-//
-// ISeamPackage seamPackage = findSeamPackage(tree, "demo");
-// assertTrue("Package \"demo\" found!",seamPackage==null);
-//
-// IFile file1 = project.getFile("JavaSource/demo/Person.1");
-// assertTrue("Cannot find Person.1 in test project", file1 != null && file1.exists());
-//
-// try{
-// classFile.create(file1.getContents(), false, new NullProgressMonitor());
-// classFile.touch(new NullProgressMonitor());
-// }catch(Exception ex){
-// JUnitUtils.fail("Cannot read file JavaSource/demo/Person.1", ex);
-// }
-//
-// refreshProject(project);
-//
-// seamPackage = findSeamPackage(tree, "demo");
-// assertTrue("Package \"demo\" not found!",seamPackage!=null);
-//
-// ISeamComponent component = findSeamComponent(seamPackage, "demo.John");
-// assertTrue("Component \"demo.John\" not found!",component!=null);
-// }
-
-// public void testRenameComponentInClass(){
-//
-// classFile = project.getFile("JavaSource/demo/Person.java");
-//
-// CommonNavigator navigator = getSeamComponentsView();
-// navigator.getCommonViewer().expandAll();
-//
-// Tree tree = navigator.getCommonViewer().getTree();
-//
-// ISeamPackage seamPackage = findSeamPackage(tree, "demo");
-// assertTrue("Package \"demo\" not found!",seamPackage!=null);
-//
-// ISeamComponent component = findSeamComponent(seamPackage, "demo.John");
-// assertTrue("Component \"demo.John\" not found!",component!=null);
-//
-// IFile file1 = project.getFile("JavaSource/demo/Person.2");
-// assertTrue("Cannot find Person.2 in test project", file1 != null && file1.exists());
-//
-// try{
-// classFile.setContents(file1.getContents(), true, false, new NullProgressMonitor());
-// classFile.touch(new NullProgressMonitor());
-// }catch(Exception ex){
-// JUnitUtils.fail("Cannot read file JavaSource/demo/Person.2", ex);
-// }
-//
-// refreshProject(project);
-//
-// seamPackage = findSeamPackage(tree, "demo");
-// assertTrue("Package \"demo\" not found!",seamPackage!=null);
-//
-// component = findSeamComponent(seamPackage, "demo.John");
-// assertTrue("Component \"demo.John\" found!",component==null);
-//
-// component = findSeamComponent(seamPackage, "demo.Pall");
-// assertTrue("Component \"demo.Pall\" not found!",component!=null);
-//
-// IFile file2 = project.getFile("JavaSource/demo/Person.3");
-// assertTrue("Cannot find Person.3 in test project", file2 != null && file2.exists());
-//
-// try{
-// classFile.setContents(file2.getContents(), true, false, new NullProgressMonitor());
-//
-// classFile.touch(new NullProgressMonitor());
-// }catch(Exception ex){
-// JUnitUtils.fail("Cannot read file JavaSource/demo/Person.3", ex);
-// }
-//
-// refreshProject(project);
-//
-// seamPackage = findSeamPackage(tree, "demo");
-// assertTrue("Package \"demo\" found!",seamPackage==null);
-//
-// seamPackage = findSeamPackage(tree, "beatles");
-// assertTrue("Package \"beatles\" not found!",seamPackage!=null);
-//
-// component = findSeamComponent(seamPackage, "beatles.Pall");
-// assertTrue("Component \"beatles.Pall\" not found!",component!=null);
-// }
-
-// public void testDeleteComponentInClass(){
-// classFile = project.getFile("JavaSource/demo/Person.java");
-//
-// CommonNavigator navigator = getSeamComponentsView();
-// navigator.getCommonViewer().expandAll();
-//
-// Tree tree = navigator.getCommonViewer().getTree();
-//
-// ISeamPackage seamPackage = findSeamPackage(tree, "beatles");
-// assertTrue("Package \"beatles\" not found!",seamPackage!=null);
-//
-// if(seamPackage != null){
-// ISeamComponent component = findSeamComponent(seamPackage, "beatles.Pall");
-// assertTrue("Component \"beatles.Pall\" not found!",component!=null);
-// }
-//
-// try{
-// classFile.delete(true, new NullProgressMonitor());
-// }catch(Exception ex){
-// JUnitUtils.fail("Cannot delete file JavaSource/demo/Person.java", ex);
-// }
-//
-// refreshProject(project);
-//
-// seamPackage = findSeamPackage(tree, "beatles");
-// assertTrue("Package \"beatles\" found!",seamPackage==null);
-// }
-
-// /**
-// *
-// */
- public void testSeamComponentsViewIsShowedOnPerspective() {
- IWorkbenchPage page = WorkbenchUtils.getWorkbenchActivePage();
- IViewPart part = page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
- assertNotNull("Cannot show the Seam Components View", part);
- }
-
-// public void testCreatedProjectIsShownOnTree() {
-// TestProjectProvider provider=null;
-// try {
-// provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null, "TestComponentView", true);
-// } catch (Exception e1) {
-// JUnitUtils.fail("Cannot create Project Provider", e1);
-// }
-// IProject project = provider.getProject();
-// try {
-// project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
-// } catch (Exception e) {
-// JUnitUtils.fail("Cannot refresh created test Project", e);
-// }
-// IStructuredContentProvider content
-// = (IStructuredContentProvider)getSeamComponentsView().getCommonViewer().getContentProvider();
-// assertTrue("Created Seam enabled project haven't been shown in tree",1==content.getElements(ResourcesPlugin.getWorkspace().getRoot()).length);
-//
-// }
-//
-// public void testThatDeletedProjectIsDisappearedFromTree() {
-// try {
-// ResourcesPlugin.getWorkspace().getRoot().findMember("TestComponentView").delete(true, new NullProgressMonitor());
-// } catch (CoreException e) {
-// JUnitUtils.fail(e.getMessage(),e);
-// }
-// IStructuredContentProvider content
-// = (IStructuredContentProvider)getSeamComponentsView().getCommonViewer().getContentProvider();
-// assertTrue("Created Seam enabled project haven't been deleted from tree",0==content.getElements(ResourcesPlugin.getWorkspace().getRoot()).length);
-// }
-
- private CommonNavigator getSeamComponentsView() {
- IWorkbenchPage page = WorkbenchUtils.getWorkbenchActivePage();
- CommonNavigator part = (CommonNavigator)page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
- return part;
- }
-
- private ISeamComponent findSeamComponent(ISeamPackage seamPackage, String name){
- ISeamComponent component=null;
-
- Iterator<ISeamComponent> iter = seamPackage.getComponents().iterator();
- while(iter.hasNext()){
- component = iter.next();
- if(component.getName().equals(name)) return component;
- }
-
- return null;
- }
-
- private ISeamPackage findSeamPackage(TreeItem item, String name){
- ISeamPackage seamPackage=null;
-
- for(int i=0;i<item.getItemCount();i++){
- TreeItem cur = item.getItem(i);
- if(cur.getData() instanceof ISeamPackage) {
- ISeamPackage pkg =(ISeamPackage)cur.getData();
- if(m2.getBooleanProperty(ViewConstants.PACKAGE_STRUCTURE)
- && name.equals(pkg.getQualifiedName()) || name.equals(pkg.getName())) {
- seamPackage = pkg;
- break;
- }
- }
- seamPackage = findSeamPackage(cur, name);
- if(seamPackage != null) break;
- }
-
- return seamPackage;
- }
-
- private ISeamPackage findSeamPackage(Tree tree, String name){
- ISeamPackage seamPackage=null;
- TreeItem item;
-
- for(int i=0;i<tree.getItemCount();i++){
- item = tree.getItem(i);
- seamPackage = findSeamPackage(item, name);
- if(seamPackage != null) return seamPackage;
- }
-
- return null;
- }
-
- public void waitForJobs() {
- while (!Job.getJobManager().isIdle())
- delay(5000);
- System.out.println("---------------------------------continue----------------------------");
- }
-
- /** * Process UI input but do not return for the
- * specified time interval. *
- * @param waitTimeMillis the number of milliseconds */
- protected void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
- // If this is the UI thread,
- // then process input.
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while (System.currentTimeMillis() < endTimeMillis){
- if (!display.readAndDispatch()) display.sleep();
- } display.update();
- }
- // Otherwise, perform a simple sleep.
- else {
- try {
- Thread.sleep(waitTimeMillis);
- } catch (InterruptedException e) {
- // Ignored.
- }
- }
- }
-
- private void refreshProject(IProject project){
- try {
- System.out.println("------------------------------brfore refresh");
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- System.out.println("------------------------------abter refresh");
- } catch (CoreException e) {
- JUnitUtils.fail(e.getMessage(),e);
- }
- System.out.println("------------------------------before waitForJobs");
- waitForJobs();
- System.out.println("------------------------------abter waitForJobs");
- }
-
- public static void waitForJob() {
- Object[] o = {
- XJob.FAMILY_XJOB, ResourcesPlugin.FAMILY_AUTO_REFRESH, ResourcesPlugin.FAMILY_AUTO_BUILD
- };
- while(true) {
- boolean stop = true;
- for (int i = 0; i < o.length; i++) {
- Job[] js = Job.getJobManager().find(o[i]);
- if(js != null && js.length > 0) {
- System.out.print(js[0].getName());
- try {
- Job.getJobManager().join(o[i], new NullProgressMonitor());
- } catch (OperationCanceledException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- stop = false;
- }
- }
- if(stop) {
- Job running = getJobRunning(10);
- if(running != null) {
- try {
- running.join();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- stop = false;
- }
- }
- if(stop) break;
- }
- }
-
- public static Job getJobRunning(int iterationLimit) {
- Job[] js = Job.getJobManager().find(null);
- Job dm = null;
- if(js != null) for (int i = 0; i < js.length; i++) {
- if(js[i].getState() == Job.RUNNING && js[i].getThread() != Thread.currentThread()) {
- if(js[i] instanceof UIJob) continue;
- if(js[i].belongsTo(DecoratorManager.FAMILY_DECORATE) || js[i].getName().equals("Task List Saver")) {
- dm = js[i];
- continue;
- }
- //TODO keep watching
- System.out.println(js[i].getName());
- return js[i];
- }
- }
- if(dm != null) {
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- //ignore
- }
- if(iterationLimit > 0)
- return getJobRunning(iterationLimit - 1);
- }
- return null;
- }
-
- /**
- *
- */
- private void updateView() {
- viewer.refresh();
- viewer.expandAll();
- Object[] array = viewer.getExpandedElements();
- for (Object object : array) {
- System.out.println(object.toString());
- }
- }
-}
17 years, 2 months
JBoss Tools SVN: r4796 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-08 15:46:36 -0500 (Thu, 08 Nov 2007)
New Revision: 4796
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
include xullrunner tests in the build ajnd remove copy of seam ui tests
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2007-11-08 19:12:59 UTC (rev 4795)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2007-11-08 20:46:36 UTC (rev 4796)
@@ -296,4 +296,10 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.vpe.xulrunner.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
17 years, 2 months
JBoss Tools SVN: r4795 - tags.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-08 14:12:59 -0500 (Thu, 08 Nov 2007)
New Revision: 4795
Added:
tags/jbosstools-2.0.0.CR1/
Log:
tag for tools cr1
17 years, 2 months