JBoss Tools SVN: r30002 - in trunk/runtime/tests/org.jboss.tools.runtime.test: .settings and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-03-24 20:53:51 -0400 (Thu, 24 Mar 2011)
New Revision: 30002
Added:
trunk/runtime/tests/org.jboss.tools.runtime.test/.classpath
trunk/runtime/tests/org.jboss.tools.runtime.test/.project
trunk/runtime/tests/org.jboss.tools.runtime.test/.settings/
trunk/runtime/tests/org.jboss.tools.runtime.test/.settings/org.eclipse.jdt.core.prefs
trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/
trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF
trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties
trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.properties
trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml
trunk/runtime/tests/org.jboss.tools.runtime.test/requirements.properties
trunk/runtime/tests/org.jboss.tools.runtime.test/src/
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionAllTests.java
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
Log:
JBIDE-7583 Add tests for org.jboss.tools.runtime plugin
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/.classpath
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/.classpath (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/.classpath 2011-03-25 00:53:51 UTC (rev 30002)
@@ -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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/.project
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/.project (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/.project 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.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>
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/.settings/org.eclipse.jdt.core.prefs 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,8 @@
+#Thu Mar 24 21:12:52 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.runtime.test
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.core.runtime,
+ org.junit4,
+ org.jboss.tools.runtime,
+ org.jboss.tools.runtime.ui,
+ org.jboss.tools.runtime.core,
+ org.jboss.tools.tests,
+ org.jboss.tools.seam.core,
+ org.eclipse.datatools.connectivity,
+ org.eclipse.datatools.connectivity.db.generic,
+ org.jboss.tools.common,
+ org.jboss.tools.tests,
+ org.jboss.ide.eclipse.as.core,
+ org.eclipse.wst.server.core,
+ org.eclipse.datatools.enablement.hsqldb,
+ org.eclipse.datatools.enablement.hsqldb.dbdefinition,
+ org.eclipse.datatools.enablement.hsqldb.ui,
+ org.eclipse.jst.jee,
+ org.eclipse.jst.jee.ejb,
+ org.eclipse.jst.jee.ui,
+ org.eclipse.jst.jee.web,
+ org.eclipse.ui,
+ org.eclipse.core.resources,
+ org.junit4,
+ org.jboss.tools.jsf.vpe.seam,
+ org.jboss.tools.seam.pages.xml,
+ org.jboss.tools.seam.ui,
+ org.jboss.tools.seam.ui.pages,
+ org.jboss.tools.seam.xml,
+ org.jboss.tools.seam.xml.ui,
+ org.jboss.tools.seam.text.ext
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %BundleVendor
+Bundle-Localization: plugin
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.properties (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.properties 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.project.examples
+BundleVendor = JBoss by Red Hat
+BundleName = JBoss Runtime Detection Tests
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.tests</groupId>
+ <artifactId>org.jboss.tools.runtime.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <systemProperties>-Djbosstools.test.jboss.home.4.2=${requirement.build.root}/jboss-4.2.3.GA -Djbosstools.test.jboss.home.5.1=${requirement.build.root}/jboss-5.1.0.GA -Djbosstools.test.seam.2.0.1.GA.home=${requirement.build.root}/jboss-seam-2.0.1.GA -Djbosstools.test.seam.2.2.0.GA.home=${requirement.build.root}/jboss-seam-2.2.0.GA -Djbosstools.test.eap.4.3.home=${requirement.build.root}/jboss-eap-4.3</systemProperties>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <useUIThread>false</useUIThread>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>org.jboss.tools.runtime.test</testSuite>
+ <testClass>org.jboss.tools.runtime.test.RuntimeDetectionAllTests</testClass>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/requirements.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/requirements.properties (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/requirements.properties 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1 @@
+requirements=jbossas,seam-2.0.1.GA,seam-2.2.0.GA,jbeap
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,30 @@
+/*************************************************************************************
+ * Copyright (c) 2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.test;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public interface IRuntimeDetectionConstants {
+
+ final static String JBOSS_42_HOME = System.getProperty("jbosstools.test.jboss.home.4.2", "E:\\JBossRuntimes\\jboss-4.2.3.GA");
+
+ final static String JBOSS_51_HOME = System.getProperty("jbosstools.test.jboss.home.5.1", "E:\\JBossRuntimes\\jboss-5.1.0.GA");
+
+ final static String SEAM_20_HOME = System.getProperty("jbosstools.test.seam.2.0.1.GA.home", "E:\\JBossRuntimes\\jboss-seam-2.0.1.GA");
+
+ final static String SEAM_22_HOME = System.getProperty("jbosstools.test.seam.2.2.0.GA.home", "E:\\jboss-seam-2.2.1.Final");
+
+ final static String EAP_43_HOME = System.getProperty("jbosstools.test.eap.4.3.home", "E:\\jboss-eap43_cp03");
+
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionAllTests.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionAllTests.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionAllTests.java 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,24 @@
+/*************************************************************************************
+ * Copyright (c) 2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.test;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+(a)Suite.SuiteClasses({
+ RuntimeDetectionTest.class,
+})
+
+(a)RunWith(Suite.class)
+public class RuntimeDetectionAllTests {
+
+}
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java 2011-03-25 00:53:51 UTC (rev 30002)
@@ -0,0 +1,154 @@
+/*************************************************************************************
+ * Copyright (c) 2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.tools.runtime.core.JBossRuntimeLocator;
+import org.jboss.tools.runtime.core.RuntimeCoreActivator;
+import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.RuntimePath;
+import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.ui.RuntimeUIActivator;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.junit.Test;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public class RuntimeDetectionTest {
+
+ @Test
+ public void testRuntimeDetectors() {
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ assertTrue("Runtime detectors don't exist.",detectors.size() > 0);
+ }
+
+ @Test
+ public void testRuntimePaths() {
+ List<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault().getRuntimePaths();
+ assertTrue("There are initial runtime paths.", runtimePaths.size() == 0);
+ }
+
+ @Test
+ public void addRuntimePaths() {
+ List<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault().getRuntimePaths();
+ String[] paths = { IRuntimeDetectionConstants.JBOSS_42_HOME, IRuntimeDetectionConstants.JBOSS_51_HOME,
+ IRuntimeDetectionConstants.SEAM_20_HOME, IRuntimeDetectionConstants.SEAM_22_HOME,
+ IRuntimeDetectionConstants.EAP_43_HOME};
+
+ for (String path : paths) {
+ assertTrue(path != null);
+ File file = new File(path);
+ assertTrue("The '" + path + "' path isn't valid.", file.isDirectory());
+ RuntimePath runtimePath = new RuntimePath(path);
+ runtimePaths.add(runtimePath);
+ }
+ RuntimeUIActivator.getDefault().saveRuntimePaths();
+ runtimePaths = null;
+ runtimePaths = RuntimeUIActivator.getDefault().getRuntimePaths();
+ assertTrue("runtimePaths.size()\nExpected: 5\nWas: " + runtimePaths.size(), runtimePaths.size() == 5);
+ List<ServerDefinition> serverDefinitions = new ArrayList<ServerDefinition>();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ for( IRuntimeDetector detector:detectors) {
+ if (detector.isEnabled()) {
+ detector.initializeRuntimes(serverDefinitions);
+ }
+ }
+ assertTrue("serverDefinitions.size()\nExpected: 0\nWas: " + serverDefinitions.size(), serverDefinitions.size() == 0);
+ }
+
+ @Test
+ public void createRuntimes() {
+ JBossRuntimeLocator locator = new JBossRuntimeLocator();
+ List<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault().getRuntimePaths();
+ for (RuntimePath runtimePath : runtimePaths) {
+ List<ServerDefinition> serverDefinitions = locator
+ .searchForRuntimes(runtimePath.getPath(), new NullProgressMonitor());
+ runtimePath.getServerDefinitions().clear();
+ for (ServerDefinition serverDefinition : serverDefinitions) {
+ serverDefinition.setRuntimePath(runtimePath);
+ }
+ runtimePath.getServerDefinitions()
+ .addAll(serverDefinitions);
+ }
+ List<ServerDefinition> serverDefinitions = RuntimeUIActivator.getDefault().getServerDefinitions();
+ assertTrue("serverDefinitions.size()\nExpected: >0\nWas: " + serverDefinitions.size(), serverDefinitions.size() > 0);
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ for( IRuntimeDetector detector:detectors) {
+ if (detector.isEnabled()) {
+ detector.initializeRuntimes(serverDefinitions);
+ }
+ }
+ }
+
+ @Test
+ public void testSeamRuntimes() {
+ SeamRuntime[] seamRuntimes = SeamRuntimeManager.getInstance().getRuntimes();
+ assertTrue("seamRuntimes.length\nExpected: 4\nWas: " + seamRuntimes.length, seamRuntimes.length == 4);
+ boolean seam20Exists = false;
+ boolean seam22Exists = false;
+ boolean seam12Exists = false;
+ for(SeamRuntime seamRuntime:seamRuntimes) {
+ SeamVersion version = seamRuntime.getVersion();
+ if (SeamVersion.SEAM_2_0.equals(version)) {
+ seam20Exists = true;
+ }
+ if (SeamVersion.SEAM_2_2.equals(version)) {
+ seam22Exists = true;
+ }
+ if (SeamVersion.SEAM_1_2.equals(version)) {
+ seam12Exists = true;
+ }
+ }
+ assertTrue("Seam 2.0 Runtime isn't created.", seam20Exists);
+ assertTrue("Seam 2.2 Runtime isn't created.", seam22Exists);
+ assertTrue("Seam 1.2 Runtime isn't created.", seam12Exists);
+ }
+
+ @Test
+ public void testWtpRuntimes() {
+ IRuntime[] runtimes = ServerCore.getRuntimes();
+ assertTrue("runtimes.length\nExpected: 3\nWas: " + runtimes.length, runtimes.length == 3);
+ boolean as42Exists = false;
+ boolean as51Exists = false;
+ boolean eap43Exists = false;
+ for(IRuntime runtime:runtimes) {
+ IRuntimeType runtimeType = runtime.getRuntimeType();
+ if (IJBossToolingConstants.AS_42.equals(runtimeType.getId())) {
+ as42Exists = true;
+ }
+ if (IJBossToolingConstants.AS_51.equals(runtimeType.getId())) {
+ as51Exists = true;
+ }
+ if (IJBossToolingConstants.EAP_43.equals(runtimeType.getId())) {
+ eap43Exists = true;
+ }
+ }
+ assertTrue("JBoss AS 4.2 Runtime isn't created.", as42Exists);
+ assertTrue("JBoss AS 5.1 Runtime isn't created.", as51Exists);
+ assertTrue("JBoss EAP 4.3 Runtime isn't created.", eap43Exists);
+ }
+}
13 years, 9 months
JBoss Tools SVN: r30001 - trunk/runtime/tests.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-03-24 20:49:05 -0400 (Thu, 24 Mar 2011)
New Revision: 30001
Added:
trunk/runtime/tests/org.jboss.tools.runtime.test/
Log:
Initial import.
13 years, 9 months
JBoss Tools SVN: r30000 - in trunk/runtime: tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-03-24 20:47:09 -0400 (Thu, 24 Mar 2011)
New Revision: 30000
Added:
trunk/runtime/tests/
trunk/runtime/tests/pom.xml
Modified:
trunk/runtime/pom.xml
Log:
JBIDE-7583 Add tests for org.jboss.tools.runtime plugin
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2011-03-25 00:00:57 UTC (rev 29999)
+++ trunk/runtime/pom.xml 2011-03-25 00:47:09 UTC (rev 30000)
@@ -9,7 +9,7 @@
<modules>
<module>plugins</module>
<module>features</module>
- <!-- <module>tests</module> -->
+ <module>tests</module>
<module>site</module>
</modules>
</project>
Added: trunk/runtime/tests/pom.xml
===================================================================
--- trunk/runtime/tests/pom.xml (rev 0)
+++ trunk/runtime/tests/pom.xml 2011-03-25 00:47:09 UTC (rev 30000)
@@ -0,0 +1,13 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools.maven</groupId>
+ <artifactId>tests</artifactId>
+ <name>maven.tests</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.jboss.tools.runtime.test</module>
+ </modules>
+</project>
+
13 years, 9 months
JBoss Tools SVN: r29998 - trunk/build/util.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-24 19:56:32 -0400 (Thu, 24 Mar 2011)
New Revision: 29998
Modified:
trunk/build/util/checkPOMvsManifest.sh
Log:
add debug and verbose modes; fix line ending false positives
Modified: trunk/build/util/checkPOMvsManifest.sh
===================================================================
--- trunk/build/util/checkPOMvsManifest.sh 2011-03-24 23:48:04 UTC (rev 29997)
+++ trunk/build/util/checkPOMvsManifest.sh 2011-03-24 23:56:32 UTC (rev 29998)
@@ -1,11 +1,17 @@
#!/bin/bash
+verbose=false
+debug=false
+
if [[ $1 ]] && [[ -d $1 ]]; then
basedir=$1
else
basedir=.
fi
+if [[ $2 == "-v" ]]; then verbose=true; fi
+if [[ $2 == "-d" ]]; then debug=true; fi
+
files=$(find . -maxdepth 5 -type f -name MANIFEST.MF | egrep -v "target|sdk")" "$(find . -maxdepth 4 -type f -name "feature.xml" | egrep -v "target|sdk")
for f in $files; do
d=${f/META-INF\/MANIFEST.MF/}; #assume plugin
@@ -23,20 +29,22 @@
fi
artVersionLine=" "$altVersionLine
else
- artVersionLine=$(cat $f | egrep "Bundle-Version: " | egrep "[0-9]\.[0-9]\.[0-9]")
+ artVersionLine=$(cat $f | egrep "Bundle-Version: " | egrep "[0-9]\.[0-9]\.[0-9]" | tr "\r\t\n" "\n" )
artVersion=${artVersionLine##*: }
artVersion=${artVersion%%.qualifier}
artVersionLine=" "$artVersionLine
fi
if [[ -f $d/pom.xml ]]; then
- pomVersionLine=$(cat $d/pom.xml | sed "s/\t//" | egrep ".0-SNAPSHOT" | egrep "[0-9]\.[0-9]\.[0-9]")
+ pomVersionLine=$(cat $d/pom.xml | sed "s/\t//" | egrep "\.[0-9]-SNAPSHOT" | egrep "[0-9]\.[0-9]\.[0-9]" | tail -1)
if [[ ! $pomVersionLine ]]; then # not a snapshot version
+ #echo "pomVersionLine[1] = $pomVersionLine"
pomVersionLine=$(cat $d/pom.xml | sed "s/\t//" | egrep "<version>" | egrep "[0-9]\.[0-9]\.[0-9]" | tail -1)
pomVersion=${pomVersionLine%%</version>*}
pomVersion=${pomVersion#*<version>}
#echo "[WARNING] [$pomVersion] ${d}pom.xml not SNAPSHOT version."
else
+ #echo "pomVersionLine[2] = $pomVersionLine"
pomVersion=${pomVersionLine%%-SNAPSHOT*}
pomVersion=${pomVersion#*<version>}
fi
@@ -48,8 +56,15 @@
echo "[ERROR] $artVersionLine"
echo "[ERROR] $pomVersionLine"
echo ""
+ elif [[ $debug == true ]]; then
+ echo "[DEBUG] $d"
+ echo "[DEBUG] Artifact version [$artVersion] != pom version [$pomVersion]" | egrep "[0-9]\.[0-9]\.[0-9]";
+ echo "[DEBUG] $artVersionLine"
+ echo "[DEBUG] $pomVersionLine"
+ echo ""
+ elif [[ $verbose == true ]]; then
+ echo "[INFO] [$artVersion] = [$pomVersion] $d "
else
- #echo "[INFO] [$artVersion] = [$pomVersion] $d "
true
fi
else
13 years, 9 months
JBoss Tools SVN: r29997 - in branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core: src/org/jboss/tools/esb/core/model/impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-24 19:48:04 -0400 (Thu, 24 Mar 2011)
New Revision: 29997
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java
Log:
JBIDE-8466
https://issues.jboss.org/browse/JBIDE-8466
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-24 23:42:54 UTC (rev 29996)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-24 23:48:04 UTC (rev 29997)
@@ -11,7 +11,9 @@
<PAIR name="org.jboss.soa.esb.actions.Aggregator" value="ESBPreActionAggregator"/>
<PAIR name="org.jboss.soa.esb.actions.BusinessRulesProcessor" value="ESBPreActionBusinessRulesProcessor"/>
<PAIR name="org.jboss.soa.esb.actions.ContentBasedRouter" value="ESBPreActionContentBasedRouter"/>
+ <PAIR name="org.jboss.soa.esb.actions.ContentBasedWiretap" value="ESBPreActionContentBasedRouter"/>
<PAIR name="org.jboss.soa.esb.actions.EJBProcessor" value="ESBPreActionEJBProcessor"/>
+ <PAIR name="org.jboss.soa.esb.actions.MessageFilter" value="ESBPreActionContentBasedRouter"/>
<PAIR name="org.jboss.soa.esb.actions.MessagePersister" value="ESBPreActionMessagePersister"/>
<PAIR name="org.jboss.soa.esb.actions.Notifier" value="ESBPreActionNotifier"/>
<PAIR name="org.jboss.soa.esb.actions.StaticRouter" value="ESBPreActionStaticRouter"/>
@@ -710,7 +712,12 @@
name="name" xmlname="name"/>
<XModelAttribute PROPERTIES="category=general;save=always"
default="org.jboss.soa.esb.actions.ContentBasedRouter" name="class" xmlname="class">
- <Editor name="Uneditable"/>
+ <Constraint loader="List">
+ <value name="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ <value name="org.jboss.soa.esb.actions.ContentBasedWiretap"/>
+ <value name="org.jboss.soa.esb.actions.MessageFilter"/>
+ </Constraint>
+ <Editor name="List"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="cbr alias" xmlname="cbrAlias">
@@ -741,6 +748,24 @@
<Editor name="TreeChooser"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
+ name="rule agent properties" xmlname="ruleAgentProperties">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenRuleAgent"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="decision table" xmlname="decisionTable">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=xls"/>
+ <value name="linkAction=OpenDecisionTable"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
default="Default(false)" name="rule reload" xmlname="ruleReload">
<Constraint loader="ListString">
<value name="Default(false)"/>
@@ -750,14 +775,76 @@
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
- name="rule agent properties" xmlname="ruleAgentProperties">
+ default="Default(false)" name="stateful" xmlname="stateful">
+ <Constraint loader="ListString">
+ <value name="Default(false)"/>
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule audit type" xmlname="ruleAuditType">
+ <Constraint loader="List">
+ <value/>
+ <value name="CONSOLE"/>
+ <value name="FILE"/>
+ <value name="THREADED_FILE"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule audit file" xmlname="ruleAuditFile">
<Constraint loader="Tree">
<value name="ESBResourceTree"/>
- <value name="extensions=properties"/>
- <value name="linkAction=OpenRuleAgent"/>
+ <value name="linkAction=OpenAuditFile"/>
</Constraint>
<Editor name="TreeChooser"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule audit interval" xmlname="ruleAuditInterval"/>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(REALTIME)" name="rule clock type" xmlname="ruleClockType">
+ <Constraint loader="List">
+ <value name="Default(REALTIME)"/>
+ <value name="REALTIME"/>
+ <value name="PSEUDO"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(CLOUD)" name="rule event processing type" xmlname="ruleEventProcessingType">
+ <Constraint loader="List">
+ <value name="Default(CLOUD)"/>
+ <value name="CLOUD"/>
+ <value name="STREAM"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(FIRE_ALL_RULES)" name="rule fire method" xmlname="ruleFireMethod">
+ <Constraint loader="List">
+ <value name="Default(FIRE_ALL_RULES)"/>
+ <value name="FIRE_ALL_RULES"/>
+ <value name="FIRE_UNTIL_HALT"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(false)" name="rule multithread evaluation" xmlname="ruleMultithreadEvaluation">
+ <Constraint loader="ListString">
+ <value name="Default(false)"/>
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule max threads" xmlname="ruleMaxThreads">
+ <Constraint loader="Int">
+ <value name="minimum=1"/>
+ </Constraint>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="process" xmlname="process">
<Constraint loader="ListString">
<value name="process"/>
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java 2011-03-24 23:42:54 UTC (rev 29996)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java 2011-03-24 23:48:04 UTC (rev 29997)
@@ -1,49 +1,16 @@
package org.jboss.tools.esb.core.model.impl;
-import org.jboss.tools.esb.core.model.ESBCustomizedObjectImpl;
+/**
+ * It seems that all ESB action classes extending ContentBasedRouter use the same set of attributes.
+ * It means that we may not need specific implementations for the inherited actions.
+ *
+ * @author slava
+ *
+ */
-public class BusinessRulesProcessor extends ESBCustomizedObjectImpl {
+public class BusinessRulesProcessor extends ContentBasedRouter {
private static final long serialVersionUID = 1L;
- public static String ATTR_RULE_AGENT_PROPERTIES = "rule agent properties";
- public static String ATTR_DECISION_TABLE = "decision table";
- public static String ATTR_RULE_MAX_THREADS = "rule max threads";
- public static String ATTR_RULE_MULTITHREAD_EVALUATION = "rule multithread evaluation";
- static int RULE_SET_BASED = 0;
- static int RULE_AGENT_BASED = 1;
- static int DECISION_TABLE_BASED = 2;
-
public BusinessRulesProcessor() {}
- @Override
- public boolean isAttributeEditable(String name) {
- if(ContentBasedRouter.ATTR_RULE_SET.equals(name)) {
- int kind = getKind();
- return kind < 0 || kind == RULE_SET_BASED;
- } else if(ATTR_RULE_AGENT_PROPERTIES.equals(name)) {
- int kind = getKind();
- return kind < 0 || kind == RULE_AGENT_BASED;
- } else if(ATTR_DECISION_TABLE.equals(name)) {
- int kind = getKind();
- return kind < 0 || kind == DECISION_TABLE_BASED;
- }
- if(ATTR_RULE_MAX_THREADS.equals(name)) {
- String a = getAttributeValue(ATTR_RULE_MULTITHREAD_EVALUATION);
- if("true".equals(a)) return true;
- String b = getAttributeValue(ATTR_RULE_MAX_THREADS);
- return b != null && b.length() > 0;
-
- }
- return super.isAttributeEditable(name);
- }
-
- int getKind() {
- String ruleSet = getAttributeValue(ContentBasedRouter.ATTR_RULE_SET);
- if(ruleSet != null && ruleSet.length() > 0) return RULE_SET_BASED;
- String ruleAgent = getAttributeValue(ATTR_RULE_AGENT_PROPERTIES);
- if(ruleAgent != null && ruleAgent.length() > 0) return RULE_AGENT_BASED;
- String decisionTable = getAttributeValue(ATTR_DECISION_TABLE);
- if(decisionTable != null && decisionTable.length() > 0) return DECISION_TABLE_BASED;
- return -1;
- }
}
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java 2011-03-24 23:42:54 UTC (rev 29996)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java 2011-03-24 23:48:04 UTC (rev 29997)
@@ -23,6 +23,15 @@
public static String ATTR_RULE_SET = "rule set";
public static String ATTR_RULE_RELOAD = "rule reload";
+ public static String ATTR_RULE_AGENT_PROPERTIES = "rule agent properties";
+ public static String ATTR_DECISION_TABLE = "decision table";
+ public static String ATTR_RULE_MAX_THREADS = "rule max threads";
+ public static String ATTR_RULE_MULTITHREAD_EVALUATION = "rule multithread evaluation";
+
+ static int RULE_SET_BASED = 0;
+ static int RULE_AGENT_BASED = 1;
+ static int DECISION_TABLE_BASED = 2;
+
public ContentBasedRouter() {}
@Override
@@ -38,6 +47,25 @@
return false;
}
}
+
+ if(ContentBasedRouter.ATTR_RULE_SET.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_SET_BASED;
+ } else if(ATTR_RULE_AGENT_PROPERTIES.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_AGENT_BASED;
+ } else if(ATTR_DECISION_TABLE.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == DECISION_TABLE_BASED;
+ }
+ if(ATTR_RULE_MAX_THREADS.equals(name)) {
+ String a = getAttributeValue(ATTR_RULE_MULTITHREAD_EVALUATION);
+ if("true".equals(a)) return true;
+ String b = getAttributeValue(ATTR_RULE_MAX_THREADS);
+ return b != null && b.length() > 0;
+
+ }
+
return super.isAttributeEditable(name);
}
@@ -59,5 +87,14 @@
}
}
+ int getKind() {
+ String ruleSet = getAttributeValue(ContentBasedRouter.ATTR_RULE_SET);
+ if(ruleSet != null && ruleSet.length() > 0) return RULE_SET_BASED;
+ String ruleAgent = getAttributeValue(ATTR_RULE_AGENT_PROPERTIES);
+ if(ruleAgent != null && ruleAgent.length() > 0) return RULE_AGENT_BASED;
+ String decisionTable = getAttributeValue(ATTR_DECISION_TABLE);
+ if(decisionTable != null && decisionTable.length() > 0) return DECISION_TABLE_BASED;
+ return -1;
+ }
}
13 years, 9 months
JBoss Tools SVN: r29996 - in trunk/esb/plugins/org.jboss.tools.esb.core: src/org/jboss/tools/esb/core/model/impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-24 19:42:54 -0400 (Thu, 24 Mar 2011)
New Revision: 29996
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java
Log:
JBIDE-8466
https://issues.jboss.org/browse/JBIDE-8466
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-24 20:56:22 UTC (rev 29995)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-24 23:42:54 UTC (rev 29996)
@@ -11,7 +11,9 @@
<PAIR name="org.jboss.soa.esb.actions.Aggregator" value="ESBPreActionAggregator"/>
<PAIR name="org.jboss.soa.esb.actions.BusinessRulesProcessor" value="ESBPreActionBusinessRulesProcessor"/>
<PAIR name="org.jboss.soa.esb.actions.ContentBasedRouter" value="ESBPreActionContentBasedRouter"/>
+ <PAIR name="org.jboss.soa.esb.actions.ContentBasedWiretap" value="ESBPreActionContentBasedRouter"/>
<PAIR name="org.jboss.soa.esb.actions.EJBProcessor" value="ESBPreActionEJBProcessor"/>
+ <PAIR name="org.jboss.soa.esb.actions.MessageFilter" value="ESBPreActionContentBasedRouter"/>
<PAIR name="org.jboss.soa.esb.actions.MessagePersister" value="ESBPreActionMessagePersister"/>
<PAIR name="org.jboss.soa.esb.actions.Notifier" value="ESBPreActionNotifier"/>
<PAIR name="org.jboss.soa.esb.actions.StaticRouter" value="ESBPreActionStaticRouter"/>
@@ -710,7 +712,12 @@
name="name" xmlname="name"/>
<XModelAttribute PROPERTIES="category=general;save=always"
default="org.jboss.soa.esb.actions.ContentBasedRouter" name="class" xmlname="class">
- <Editor name="Uneditable"/>
+ <Constraint loader="List">
+ <value name="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+ <value name="org.jboss.soa.esb.actions.ContentBasedWiretap"/>
+ <value name="org.jboss.soa.esb.actions.MessageFilter"/>
+ </Constraint>
+ <Editor name="List"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="cbr alias" xmlname="cbrAlias">
@@ -741,6 +748,24 @@
<Editor name="TreeChooser"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
+ name="rule agent properties" xmlname="ruleAgentProperties">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenRuleAgent"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="decision table" xmlname="decisionTable">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=xls"/>
+ <value name="linkAction=OpenDecisionTable"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
default="Default(false)" name="rule reload" xmlname="ruleReload">
<Constraint loader="ListString">
<value name="Default(false)"/>
@@ -750,14 +775,76 @@
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
- name="rule agent properties" xmlname="ruleAgentProperties">
+ default="Default(false)" name="stateful" xmlname="stateful">
+ <Constraint loader="ListString">
+ <value name="Default(false)"/>
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule audit type" xmlname="ruleAuditType">
+ <Constraint loader="List">
+ <value/>
+ <value name="CONSOLE"/>
+ <value name="FILE"/>
+ <value name="THREADED_FILE"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule audit file" xmlname="ruleAuditFile">
<Constraint loader="Tree">
<value name="ESBResourceTree"/>
- <value name="extensions=properties"/>
- <value name="linkAction=OpenRuleAgent"/>
+ <value name="linkAction=OpenAuditFile"/>
</Constraint>
<Editor name="TreeChooser"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule audit interval" xmlname="ruleAuditInterval"/>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(REALTIME)" name="rule clock type" xmlname="ruleClockType">
+ <Constraint loader="List">
+ <value name="Default(REALTIME)"/>
+ <value name="REALTIME"/>
+ <value name="PSEUDO"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(CLOUD)" name="rule event processing type" xmlname="ruleEventProcessingType">
+ <Constraint loader="List">
+ <value name="Default(CLOUD)"/>
+ <value name="CLOUD"/>
+ <value name="STREAM"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(FIRE_ALL_RULES)" name="rule fire method" xmlname="ruleFireMethod">
+ <Constraint loader="List">
+ <value name="Default(FIRE_ALL_RULES)"/>
+ <value name="FIRE_ALL_RULES"/>
+ <value name="FIRE_UNTIL_HALT"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ default="Default(false)" name="rule multithread evaluation" xmlname="ruleMultithreadEvaluation">
+ <Constraint loader="ListString">
+ <value name="Default(false)"/>
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=advanced"
+ name="rule max threads" xmlname="ruleMaxThreads">
+ <Constraint loader="Int">
+ <value name="minimum=1"/>
+ </Constraint>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="process" xmlname="process">
<Constraint loader="ListString">
<value name="process"/>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java 2011-03-24 20:56:22 UTC (rev 29995)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java 2011-03-24 23:42:54 UTC (rev 29996)
@@ -1,49 +1,16 @@
package org.jboss.tools.esb.core.model.impl;
-import org.jboss.tools.esb.core.model.ESBCustomizedObjectImpl;
+/**
+ * It seems that all ESB action classes extending ContentBasedRouter use the same set of attributes.
+ * It means that we may not need specific implementations for the inherited actions.
+ *
+ * @author slava
+ *
+ */
-public class BusinessRulesProcessor extends ESBCustomizedObjectImpl {
+public class BusinessRulesProcessor extends ContentBasedRouter {
private static final long serialVersionUID = 1L;
- public static String ATTR_RULE_AGENT_PROPERTIES = "rule agent properties";
- public static String ATTR_DECISION_TABLE = "decision table";
- public static String ATTR_RULE_MAX_THREADS = "rule max threads";
- public static String ATTR_RULE_MULTITHREAD_EVALUATION = "rule multithread evaluation";
- static int RULE_SET_BASED = 0;
- static int RULE_AGENT_BASED = 1;
- static int DECISION_TABLE_BASED = 2;
-
public BusinessRulesProcessor() {}
- @Override
- public boolean isAttributeEditable(String name) {
- if(ContentBasedRouter.ATTR_RULE_SET.equals(name)) {
- int kind = getKind();
- return kind < 0 || kind == RULE_SET_BASED;
- } else if(ATTR_RULE_AGENT_PROPERTIES.equals(name)) {
- int kind = getKind();
- return kind < 0 || kind == RULE_AGENT_BASED;
- } else if(ATTR_DECISION_TABLE.equals(name)) {
- int kind = getKind();
- return kind < 0 || kind == DECISION_TABLE_BASED;
- }
- if(ATTR_RULE_MAX_THREADS.equals(name)) {
- String a = getAttributeValue(ATTR_RULE_MULTITHREAD_EVALUATION);
- if("true".equals(a)) return true;
- String b = getAttributeValue(ATTR_RULE_MAX_THREADS);
- return b != null && b.length() > 0;
-
- }
- return super.isAttributeEditable(name);
- }
-
- int getKind() {
- String ruleSet = getAttributeValue(ContentBasedRouter.ATTR_RULE_SET);
- if(ruleSet != null && ruleSet.length() > 0) return RULE_SET_BASED;
- String ruleAgent = getAttributeValue(ATTR_RULE_AGENT_PROPERTIES);
- if(ruleAgent != null && ruleAgent.length() > 0) return RULE_AGENT_BASED;
- String decisionTable = getAttributeValue(ATTR_DECISION_TABLE);
- if(decisionTable != null && decisionTable.length() > 0) return DECISION_TABLE_BASED;
- return -1;
- }
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java 2011-03-24 20:56:22 UTC (rev 29995)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/ContentBasedRouter.java 2011-03-24 23:42:54 UTC (rev 29996)
@@ -23,6 +23,15 @@
public static String ATTR_RULE_SET = "rule set";
public static String ATTR_RULE_RELOAD = "rule reload";
+ public static String ATTR_RULE_AGENT_PROPERTIES = "rule agent properties";
+ public static String ATTR_DECISION_TABLE = "decision table";
+ public static String ATTR_RULE_MAX_THREADS = "rule max threads";
+ public static String ATTR_RULE_MULTITHREAD_EVALUATION = "rule multithread evaluation";
+
+ static int RULE_SET_BASED = 0;
+ static int RULE_AGENT_BASED = 1;
+ static int DECISION_TABLE_BASED = 2;
+
public ContentBasedRouter() {}
@Override
@@ -38,6 +47,25 @@
return false;
}
}
+
+ if(ContentBasedRouter.ATTR_RULE_SET.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_SET_BASED;
+ } else if(ATTR_RULE_AGENT_PROPERTIES.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_AGENT_BASED;
+ } else if(ATTR_DECISION_TABLE.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == DECISION_TABLE_BASED;
+ }
+ if(ATTR_RULE_MAX_THREADS.equals(name)) {
+ String a = getAttributeValue(ATTR_RULE_MULTITHREAD_EVALUATION);
+ if("true".equals(a)) return true;
+ String b = getAttributeValue(ATTR_RULE_MAX_THREADS);
+ return b != null && b.length() > 0;
+
+ }
+
return super.isAttributeEditable(name);
}
@@ -59,5 +87,14 @@
}
}
+ int getKind() {
+ String ruleSet = getAttributeValue(ContentBasedRouter.ATTR_RULE_SET);
+ if(ruleSet != null && ruleSet.length() > 0) return RULE_SET_BASED;
+ String ruleAgent = getAttributeValue(ATTR_RULE_AGENT_PROPERTIES);
+ if(ruleAgent != null && ruleAgent.length() > 0) return RULE_AGENT_BASED;
+ String decisionTable = getAttributeValue(ATTR_DECISION_TABLE);
+ if(decisionTable != null && decisionTable.length() > 0) return DECISION_TABLE_BASED;
+ return -1;
+ }
}
13 years, 9 months
JBoss Tools SVN: r29993 - trunk/usage/plugins/org.jboss.tools.usage.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-03-24 16:55:05 -0400 (Thu, 24 Mar 2011)
New Revision: 29993
Modified:
trunk/usage/plugins/org.jboss.tools.usage/pom.xml
Log:
fix coverage report for usage plugin
Modified: trunk/usage/plugins/org.jboss.tools.usage/pom.xml
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/pom.xml 2011-03-24 15:33:53 UTC (rev 29992)
+++ trunk/usage/plugins/org.jboss.tools.usage/pom.xml 2011-03-24 20:55:05 UTC (rev 29993)
@@ -10,4 +10,8 @@
<artifactId>org.jboss.tools.usage</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools.usage*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.usage</emma.instrument.bundles>
+ </properties>
</project>
\ No newline at end of file
13 years, 9 months
JBoss Tools SVN: r29992 - in trunk/download.jboss.org/jbosstools/builds/staging/_composite_: trunk and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-24 11:33:53 -0400 (Thu, 24 Mar 2011)
New Revision: 29992
Modified:
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
Log:
replace savara-1.1_trunk and pi4soa-3.1_trunk with new savara-tools-eclipse-master repo
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo... 2011-03-24 14:11:37 UTC (rev 29991)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo... 2011-03-24 15:33:53 UTC (rev 29992)
@@ -7,9 +7,9 @@
get new time w/
date +%s000
-->
-<property name='p2.timestamp' value='1299094445000'/>
+<property name='p2.timestamp' value='1300979641000'/>
</properties>
-<children size='35'>
+<children size='34'>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
@@ -48,10 +48,9 @@
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-pi4soa-3.1...'/>
+<child location='http://download.jboss.org/jbosstools/builds/staging/savara-tools-eclipse-...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-teiid-desi...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-drools-5.2...'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-savara-1.1...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.1.2/all...'/>
</children>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo... 2011-03-24 14:11:37 UTC (rev 29991)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo... 2011-03-24 15:33:53 UTC (rev 29992)
@@ -7,9 +7,9 @@
get new time w/
date +%s000
-->
-<property name='p2.timestamp' value='1299094445000'/>
+<property name='p2.timestamp' value='1300979641000'/>
</properties>
-<children size='35'>
+<children size='34'>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
@@ -48,10 +48,9 @@
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-pi4soa-3.1...'/>
+<child location='http://download.jboss.org/jbosstools/builds/staging/savara-tools-eclipse-...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-teiid-desi...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-drools-5.2...'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-savara-1.1...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.1.2/all...'/>
</children>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-03-24 14:11:37 UTC (rev 29991)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-03-24 15:33:53 UTC (rev 29992)
@@ -7,9 +7,9 @@
get new time w/
date +%s000
-->
-<property name='p2.timestamp' value='1299094445000'/>
+<property name='p2.timestamp' value='1300979641000'/>
</properties>
-<children size='35'>
+<children size='34'>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
@@ -48,10 +48,9 @@
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-pi4soa-3.1...'/>
+<child location='http://download.jboss.org/jbosstools/builds/staging/savara-tools-eclipse-...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-teiid-desi...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-drools-5.2...'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-savara-1.1...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.1.2/all...'/>
</children>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-03-24 14:11:37 UTC (rev 29991)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-03-24 15:33:53 UTC (rev 29992)
@@ -7,9 +7,9 @@
get new time w/
date +%s000
-->
-<property name='p2.timestamp' value='1299094445000'/>
+<property name='p2.timestamp' value='1300979641000'/>
</properties>
-<children size='35'>
+<children size='34'>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
@@ -48,10 +48,9 @@
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.3_trunk....'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-pi4soa-3.1...'/>
+<child location='http://download.jboss.org/jbosstools/builds/staging/savara-tools-eclipse-...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-teiid-desi...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-drools-5.2...'/>
-<child location='http://download.jboss.org/jbosstools/builds/staging/jbosstools-savara-1.1...'/>
<child location='http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.1.2/all...'/>
</children>
13 years, 9 months