JBoss Tools SVN: r17433 - in trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test: .settings and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-02 20:24:10 -0400 (Wed, 02 Sep 2009)
New Revision: 17433
Added:
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.classpath
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.project
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.settings/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.settings/org.eclipse.jdt.core.prefs
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/META-INF/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/META-INF/MANIFEST.MF
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/build.properties
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/Activator.java
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/FreemarkerAllTests.java
Log:
Share project "org.jboss.ide.eclipse.freemarker.test" into "https://svn.jboss.org/repos/jbosstools"
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.classpath
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.classpath (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.classpath 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.project
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.project (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.project 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.ide.eclipse.freemarker.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.settings/org.eclipse.jdt.core.prefs 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,8 @@
+#Wed Sep 02 15:11:52 GMT-08:00 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/META-INF/MANIFEST.MF 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Freemarker Tests
+Bundle-SymbolicName: org.jboss.ide.eclipse.freemarker.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.ide.eclipse.freemarker.test.Activator
+Bundle-Vendor: JBoss by RedHat
+Require-Bundle: org.eclipse.core.runtime,
+ org.junit,
+ org.jboss.tools.tests;bundle-version="2.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/build.properties
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/build.properties (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/build.properties 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/Activator.java
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/Activator.java (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/Activator.java 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,50 @@
+package org.jboss.ide.eclipse.freemarker.test;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.ide.eclipse.freemarker.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/FreemarkerAllTests.java
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/FreemarkerAllTests.java (rev 0)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/FreemarkerAllTests.java 2009-09-03 00:24:10 UTC (rev 17433)
@@ -0,0 +1,27 @@
+package org.jboss.ide.eclipse.freemarker.test;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.jboss.tools.tests.AbstractPluginsLoadTest;
+
+public class FreemarkerAllTests extends TestCase {
+
+ public static Test suite ()
+ {
+ TestSuite suite = new TestSuite(FreemarkerAllTests.class.getName());
+ suite.addTestSuite(FreemarkerPluginsLoadTest.class);
+ return suite;
+ }
+
+
+ static public class FreemarkerPluginsLoadTest extends AbstractPluginsLoadTest {
+
+ public FreemarkerPluginsLoadTest() {}
+
+ public void testBirtPluginsAreResolvedAndActivated() {
+ testBundlesAreLoadedFor("org.jboss.ide.eclipse.freemarker.feature");
+ }
+ }
+}
Property changes on: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/src/org/jboss/ide/eclipse/freemarker/test/FreemarkerAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
JBoss Tools SVN: r17431 - trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-09-02 17:34:39 -0400 (Wed, 02 Sep 2009)
New Revision: 17431
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4841 SeamProjectConfigurator throws an NPE when application.xml doesn't exist in EAR project
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2009-09-02 21:29:09 UTC (rev 17430)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2009-09-02 21:34:39 UTC (rev 17431)
@@ -579,6 +579,9 @@
earArtifactEdit = EARArtifactEdit.getEARArtifactEditForWrite(project);
if(earArtifactEdit!=null) {
Application application = earArtifactEdit.getApplication();
+ if (application == null) {
+ return;
+ }
EList modules = application.getModules();
for (Iterator iterator = modules.iterator(); iterator.hasNext();) {
Object object = iterator.next();
15 years, 3 months
JBoss Tools SVN: r17430 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-09-02 17:29:09 -0400 (Wed, 02 Sep 2009)
New Revision: 17430
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/MarkerDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4840 Sometimes Quick Fix dialog appears even though there are no errors
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/MarkerDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/MarkerDialog.java 2009-09-02 21:22:33 UTC (rev 17429)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/MarkerDialog.java 2009-09-02 21:29:09 UTC (rev 17430)
@@ -250,7 +250,7 @@
if (eclipseProject != null
&& eclipseProject.isOpen()) {
eclipseProject.build(
- IncrementalProjectBuilder.CLEAN_BUILD,
+ IncrementalProjectBuilder.FULL_BUILD,
null);
}
}
15 years, 3 months
JBoss Tools SVN: r17429 - branches/jbosstools-3.1.0.M3/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-09-02 17:22:33 -0400 (Wed, 02 Sep 2009)
New Revision: 17429
Modified:
branches/jbosstools-3.1.0.M3/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4832 Fix SeamUiAllTests.testJBide3989
Modified: branches/jbosstools-3.1.0.M3/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
===================================================================
--- branches/jbosstools-3.1.0.M3/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2009-09-02 21:17:45 UTC (rev 17428)
+++ branches/jbosstools-3.1.0.M3/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2009-09-02 21:22:33 UTC (rev 17429)
@@ -55,7 +55,7 @@
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
seamProject.setRuntimeName("UNKNOWN");
ValidatorManager.addProjectBuildValidationSupport(project);
- project.build(IncrementalProjectBuilder.CLEAN_BUILD,
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor());
JobUtils.waitForIdle();
}
15 years, 3 months
JBoss Tools SVN: r17428 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-09-02 17:17:45 -0400 (Wed, 02 Sep 2009)
New Revision: 17428
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4832 Fix SeamUiAllTests.testJBide3989
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2009-09-02 20:51:41 UTC (rev 17427)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2009-09-02 21:17:45 UTC (rev 17428)
@@ -17,17 +17,12 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.validation.internal.operations.OneValidatorOperation;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
-import org.eclipse.wst.validation.internal.operations.ValidatorSubsetOperation;
import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -60,18 +55,10 @@
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
seamProject.setRuntimeName("UNKNOWN");
ValidatorManager.addProjectBuildValidationSupport(project);
- project.build(IncrementalProjectBuilder.CLEAN_BUILD,
- new NullProgressMonitor());
// JBIDE-4832 - call SeamProjectPropertyValidator manually
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
-
- public void run(IProgressMonitor monitor) throws CoreException {
- String validatorId = "org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator";
- ValidatorSubsetOperation op = new OneValidatorOperation(project, validatorId, true, false);
- op.run(null);
- }
- };
- ResourcesPlugin.getWorkspace().run(runnable, null);
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
+ new NullProgressMonitor());
+
JobUtils.waitForIdle();
}
15 years, 3 months
JBoss Tools SVN: r17427 - trunk/birt/tests/org.jboss.tools.birt.core.test/src/org/jboss/tools/birt/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-02 16:51:41 -0400 (Wed, 02 Sep 2009)
New Revision: 17427
Modified:
trunk/birt/tests/org.jboss.tools.birt.core.test/src/org/jboss/tools/birt/core/test/BirtCoreTestSuite.java
Log:
fix compilation errors in build
Modified: trunk/birt/tests/org.jboss.tools.birt.core.test/src/org/jboss/tools/birt/core/test/BirtCoreTestSuite.java
===================================================================
--- trunk/birt/tests/org.jboss.tools.birt.core.test/src/org/jboss/tools/birt/core/test/BirtCoreTestSuite.java 2009-09-02 18:32:26 UTC (rev 17426)
+++ trunk/birt/tests/org.jboss.tools.birt.core.test/src/org/jboss/tools/birt/core/test/BirtCoreTestSuite.java 2009-09-02 20:51:41 UTC (rev 17427)
@@ -5,13 +5,12 @@
import junit.framework.TestSuite;
import org.jboss.tools.tests.AbstractPluginsLoadTest;
-import org.jboss.tools.tests.ToolsAllTests;
public class BirtCoreTestSuite extends TestCase {
public static Test suite ()
{
- TestSuite suite = new TestSuite(ToolsAllTests.class.getName());
+ TestSuite suite = new TestSuite(BirtCoreTestSuite.class.getName());
suite.addTestSuite(BirtPluginsLoadTest.class);
return suite;
}
15 years, 3 months
JBoss Tools SVN: r17426 - in trunk/tests/tests/org.jboss.tools.test: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-02 14:32:26 -0400 (Wed, 02 Sep 2009)
New Revision: 17426
Added:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java
Removed:
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/ToolsAllTests.java
Modified:
trunk/tests/tests/org.jboss.tools.test/.project
trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
Log:
base test added to verify that all plug-ins from particular feature are loaded
Modified: trunk/tests/tests/org.jboss.tools.test/.project
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/.project 2009-09-02 18:29:22 UTC (rev 17425)
+++ trunk/tests/tests/org.jboss.tools.test/.project 2009-09-02 18:32:26 UTC (rev 17426)
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Modified: trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2009-09-02 18:29:22 UTC (rev 17425)
+++ trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2009-09-02 18:32:26 UTC (rev 17426)
@@ -8,7 +8,8 @@
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.junit,
- org.eclipse.ui.ide
+ org.eclipse.ui.ide,
+ org.apache.xerces;bundle-version="2.9.0"
Provide-Package: org.jboss.ide.tests.util
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.test.util,
Copied: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java (from rev 17384, 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/AbstractPluginsLoadTest.java (rev 0)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java 2009-09-02 18:32:26 UTC (rev 17426)
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * 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.tests;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.text.MessageFormat;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IBundleGroup;
+import org.eclipse.core.runtime.IBundleGroupProvider;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * Abstract test is intended to test that all plug-ins of particular feature are loaded at run-time
+ * @author eskimo
+ *
+ */
+public class AbstractPluginsLoadTest extends TestCase {
+
+ public static final String BUNDLE_GROUP_PROVIDER_NAME = "Update Manager Configurator";
+ private static final String PLUGIN_TAG_NAME = "plugin";
+ private static final String ID_ATTRIBUTE_NAME = "id";
+
+ public void testBundlesAreLoadedFor(final String featureId) {
+ Bundle firstBundle = getFirstBundleFor(featureId);
+ File bundleLocation = null;
+ try {
+ bundleLocation = FileLocator.getBundleFile(firstBundle);
+ } catch (IOException e1) {
+ fail(MessageFormat.format("Cannot find location for feature {0}",featureId));
+ }
+ File featuresFolder = new File(bundleLocation.getParentFile().getParentFile(),"features");
+ String[] features = featuresFolder.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ File featureDescriptor = new File(new File(dir,name),"feature.xml");
+ return name.startsWith(featureId) && featureDescriptor.canRead();
+ }
+ });
+ assertEquals(1, features.length);
+ DocumentBuilder builder;
+ File featureDescriptor = new File(new File(featuresFolder,features[0]),"feature.xml");
+ try {
+ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document feature = builder.parse(featureDescriptor);
+ NodeList plugins = feature.getElementsByTagName(PLUGIN_TAG_NAME);
+ for (int i = 0; i < plugins.getLength(); i++) {
+ String pluginId = plugins.item(i).getAttributes().getNamedItem(ID_ATTRIBUTE_NAME).getNodeValue();
+ isPluginResolved(pluginId);
+ System.out.println(MessageFormat.format("Plugn {0} was resolved and activated", pluginId));
+ }
+ } catch (ParserConfigurationException e) {
+ fail(MessageFormat.format("Cannot configure parser to parse feature descriptor ''{0}''",featureDescriptor.getAbsolutePath()));
+ } catch (SAXException e) {
+ fail(MessageFormat.format("Cannot parse feature descriptor ''{0}''",featureDescriptor.getAbsolutePath()));
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ /**
+ * @param featureId
+ */
+ private Bundle getFirstBundleFor(String featureId) {
+ IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
+ System.out.println(providers.length);
+ for (IBundleGroupProvider iBundleGroupProvider : providers) {
+ System.out.println(iBundleGroupProvider.getName());
+ IBundleGroup[] bundleGroups = iBundleGroupProvider.getBundleGroups();
+ if(BUNDLE_GROUP_PROVIDER_NAME.equals(iBundleGroupProvider.getName())) {
+ for (IBundleGroup iBundleGroup : bundleGroups) {
+ if(iBundleGroup.getIdentifier().equals(featureId)) {
+ Bundle[] bundles = iBundleGroup.getBundles();
+ for (Bundle bundle : bundles) {
+ return bundle;
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ private boolean isPluginResolved(String pluginId) {
+ Bundle bundle = Platform.getBundle(pluginId);
+ assertNotNull(pluginId + " failed to load.", bundle); //$NON-NLS-1$
+ try {
+ // this line is needed to to force plug-in loading and to change it state to ACTIVE
+ bundle.loadClass("fake class"); //$NON-NLS-1$
+ } catch (ClassNotFoundException e) {
+ // It happens always because loaded class doesn't not exist
+ }
+ return ((bundle.getState() & Bundle.RESOLVED) > 0)
+ || ((bundle.getState() & Bundle.ACTIVE) > 0);
+ }
+
+ private void assertPluginsResolved(Bundle[] bundles) {
+ for (Bundle bundle : bundles) {
+ assertTrue("Plugin '" + bundle.getSymbolicName() + "' is not resolved", //$NON-NLS-1$ //$NON-NLS-2$
+ isPluginResolved(bundle.getSymbolicName()));
+ System.out.println(bundle.getSymbolicName() + " was resolved and activated");
+ }
+ }
+
+// public void testAsComp() throws IOException {
+// testBundlesAreLoadedFor("org.jboss.ide.eclipse.as.feature");
+// }
+//
+// public void testJdtComp() throws IOException {
+// testBundlesAreLoadedFor("org.eclipse.jdt");
+// }
+//
+// public void testRichfacesComp() throws IOException {
+// testBundlesAreLoadedFor("org.jboss.tools.richfaces.feature");
+// }
+}
Deleted: 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 2009-09-02 18:29:22 UTC (rev 17425)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2009-09-02 18:32:26 UTC (rev 17426)
@@ -1,161 +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.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.osgi.framework.Bundle;
-/**
- *
- * //TODO try to refactor it to use Eclipse API to get plug-ins list in installed feature
- * //
- *
- * @author eskimo
- *
- */
-public class PlugInLoadTest extends TestCase {
-
- public static final String rhdsNS = "org.jboss.tools."; //$NON-NLS-1$
- private static String jbideNS = "org.jboss.ide.eclipse."; //$NON-NLS-1$
- private static String hibNS = "org.hibernate.eclipse."; //$NON-NLS-1$
- private static String jbpmNS = "org.jbpm.gd.jpdl"; //$NON-NLS-1$
- private static String jbwsNS = "com.eviware.soapui."; //$NON-NLS-1$
-
- private boolean isPluginResolved(String pluginId) {
- Bundle bundle = Platform.getBundle(pluginId);
- assertNotNull(pluginId + " failed to load.", bundle); //$NON-NLS-1$
- try {
- // In 3.3 when test case is running plug-in.getState always returns
- // STARTING state
- // to move plug-in in ACTIVE state at one class should be loaded
- // from plug-in
- bundle.loadClass("fake class"); //$NON-NLS-1$
- } catch (Exception e) {
- // It happens always because loaded class doesn't not exist
- }
- return ((bundle.getState() & Bundle.RESOLVED) > 0)
- || ((bundle.getState() & Bundle.ACTIVE) > 0);
- }
-
- private void assertPluginsResolved(String[] pluginIds) {
- for (int i = 0; i < pluginIds.length; i++) {
- assertTrue("plugin '" + pluginIds[i] + "' is not resolved", //$NON-NLS-1$ //$NON-NLS-2$
- isPluginResolved(pluginIds[i]));
- }
- }
-
- public void testCommonPluginsResolved() {
- assertPluginsResolved(new String[] {
- rhdsNS + "common", //$NON-NLS-1$
- rhdsNS + "common.gef", //$NON-NLS-1$
- rhdsNS + "common.kb", //$NON-NLS-1$
- rhdsNS + "common.model", //$NON-NLS-1$
- rhdsNS + "common.model.ui", //$NON-NLS-1$
- rhdsNS + "common.projecttemplates", //$NON-NLS-1$
- rhdsNS + "common.text.ext", //$NON-NLS-1$
- rhdsNS + "common.text.xml", //$NON-NLS-1$
- rhdsNS + "common.verification", //$NON-NLS-1$
- rhdsNS + "common.verification.ui", }); //$NON-NLS-1$
- }
-
- public void testJsfPluginsResolved() {
- assertPluginsResolved(new String[] {
- rhdsNS + "jsf", //$NON-NLS-1$
- rhdsNS + "jsf.text.ext", //$NON-NLS-1$
- rhdsNS + "jsf.text.ext.facelets", //$NON-NLS-1$
- rhdsNS + "jsf.ui", //$NON-NLS-1$
- rhdsNS + "jsf.verification", //$NON-NLS-1$
- rhdsNS + "jsf.vpe.ajax4jsf", //$NON-NLS-1$
- rhdsNS + "jsf.vpe.facelets", //$NON-NLS-1$
- rhdsNS + "jsf.vpe.richfaces", //$NON-NLS-1$
- rhdsNS + "jsf.vpe.seam" }); //$NON-NLS-1$
- }
-
- public void testJstPluginsResolved() {
- assertPluginsResolved(new String[] {
- rhdsNS + "jst.jsp", //$NON-NLS-1$
- rhdsNS + "jst.web", //$NON-NLS-1$
- rhdsNS + "jst.web.tiles", //$NON-NLS-1$
- rhdsNS + "jst.web.tiles.ui", //$NON-NLS-1$
- rhdsNS + "jst.web.ui", //$NON-NLS-1$
- rhdsNS + "jst.web.verification" }); //$NON-NLS-1$
- }
-
- public void testVpePluginsResolved() {
- assertPluginsResolved(new String[] {
- rhdsNS + "vpe", //$NON-NLS-1$
- rhdsNS + "vpe.ui.palette", //$NON-NLS-1$
- rhdsNS + "vpe.xulrunner" }); //$NON-NLS-1$
- }
-
- public void testStrutsPluginsResolved() {
- assertPluginsResolved(new String[] {
- rhdsNS + "struts", //$NON-NLS-1$
- rhdsNS + "struts.text.ext", //$NON-NLS-1$
- rhdsNS + "struts.ui", //$NON-NLS-1$
- rhdsNS + "struts.validator.ui", //$NON-NLS-1$
- rhdsNS + "struts.verification" }); //$NON-NLS-1$
- }
-
- public void testCorePluginsResolved() {
- assertPluginsResolved(new String[] {
- jbideNS + "archives.core", //$NON-NLS-1$
- jbideNS + "archives.ui"}); //$NON-NLS-1$
- }
-
- public void testASPluginsResolved() {
- assertPluginsResolved(new String[] {
- jbideNS + "as.core", //$NON-NLS-1$
- jbideNS + "as.ui", //$NON-NLS-1$
- jbideNS + "as.ui.mbeans" }); //$NON-NLS-1$
- }
-
- public void testHibernatePluginsResolved() {
- assertPluginsResolved(new String[] {
- "org.hibernate.eclipse", //$NON-NLS-1$
- hibNS + "console", //$NON-NLS-1$
- hibNS + "help", //$NON-NLS-1$
- hibNS + "mapper", //$NON-NLS-1$
- hibNS + "jdt.ui", //$NON-NLS-1$
- hibNS + "jdt.apt.ui" }); //$NON-NLS-1$
- }
-
-
- // TODO: Move this test to JBDS
-// public void testJbpmPluginsResolved() {
-// assertPluginsResolved(new String[] {
-// jbpmNS });
-// }
-
- public void testFreemarkerPluginsResolved() {
- assertPluginsResolved(new String[] {
- jbideNS + "freemarker" }); //$NON-NLS-1$
- }
-
- public void testDroolsPluginsResolved() {
- // Skipped until drools migartion to 3.3 is finished
- // assertPluginsResolved(new String[] {
- // "org.drools.ide"
- // });
- }
-
- public void testJBossWSPluginsResolved() {
- // assertPluginsResolved(new String[] {
- // jbwsNS+"core",
- // jbwsNS+"eclipse.core",
- // jbwsNS+"jbosside.wstools",
- // jbwsNS+"libs"
- // });
- }
-
-}
Deleted: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/ToolsAllTests.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/ToolsAllTests.java 2009-09-02 18:29:22 UTC (rev 17425)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/ToolsAllTests.java 2009-09-02 18:32:26 UTC (rev 17426)
@@ -1,29 +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.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class ToolsAllTests extends TestCase {
-
- public static Test suite ()
- {
- TestSuite suite = new TestSuite(ToolsAllTests.class.getName());
-
- suite.addTestSuite(PlugInLoadTest.class);
-
- return suite;
- }
-
-}
\ No newline at end of file
15 years, 3 months