Author: snjeza
Date: 2011-06-02 16:00:22 -0400 (Thu, 02 Jun 2011)
New Revision: 31787
Added:
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/.project
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/build.properties
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.properties
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.xml
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/license.html
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/pom.xml
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/.project
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/build.properties
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.xml
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/license.html
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/pom.xml
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/.project
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/build.properties
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.xml
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/license.html
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/pom.xml
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/.project
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/build.properties
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.properties
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.xml
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/license.html
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/pom.xml
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.classpath
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.project
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.settings/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.settings/org.eclipse.jdt.core.prefs
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/META-INF/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/META-INF/MANIFEST.MF
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.html
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.ini
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.mappings
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.properties
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/build.properties
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/jboss_about.png
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.properties
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.xml
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/pom.xml
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/Messages.java
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/RuntimeAsActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/messages.properties
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.classpath
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.project
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.settings/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.settings/org.eclipse.jdt.core.prefs
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/META-INF/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/META-INF/MANIFEST.MF
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.html
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.ini
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.mappings
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.properties
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/build.properties
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/jboss_about.png
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.properties
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.xml
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/pom.xml
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/drools/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/drools/detector/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/drools/detector/RuntimeDroolsActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.classpath
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.project
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.settings/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.settings/org.eclipse.jdt.core.prefs
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/META-INF/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/META-INF/MANIFEST.MF
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.html
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.ini
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.mappings
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.properties
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/build.properties
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/jboss_about.png
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.properties
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.xml
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/pom.xml
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/jbpm/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/jbpm/detector/
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/jbpm/detector/RuntimeJbpmActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.classpath
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.project
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.settings/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.settings/org.eclipse.jdt.core.prefs
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/META-INF/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.html
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.ini
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.mappings
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.properties
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/build.properties
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/jboss_about.png
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.properties
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/pom.xml
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/seam/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/seam/detector/
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/seam/detector/RuntimeSeamActivator.java
Removed:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/handlers/
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime/META-INF/MANIFEST.MF
trunk/runtime/plugins/org.jboss.tools.runtime/plugin.xml
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
Log:
JBIDE-9026 Separate specific runtime detection plugins from base core
Added: trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/.project
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/.project
(rev 0)
+++ trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.as.detector.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/build.properties
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/build.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Added:
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.properties
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,55 @@
+###############################################################################
+# Copyright (c) 2009-2010 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.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Runtime AS Detector
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update/discovery sites
+updateSiteName=JBoss Developer Studio Updates
+JBossToolsUpdatesSiteName=JBoss Tools Updates
+
+# "description" property - description of the feature
+description=JBoss Runtime AS Detector
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2011 JBoss by Red Hat and others.\nAll rights reserved. This
program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.\n
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Added: trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/feature.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.runtime.as.detector.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.runtime.as.detector">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.jboss.tools.runtime.as.detector"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added: trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/license.html
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/license.html
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/license.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/pom.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/pom.xml
(rev 0)
+++ trunk/runtime/features/org.jboss.tools.runtime.as.detector.feature/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.features</groupId>
+ <artifactId>org.jboss.tools.runtime.as.detector.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/.project
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/.project
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.drools.detector.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/build.properties
===================================================================
---
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/build.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Added:
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties
===================================================================
---
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,55 @@
+###############################################################################
+# Copyright (c) 2009-2010 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.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Runtime Drools Detector
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update/discovery sites
+updateSiteName=JBoss Developer Studio Updates
+JBossToolsUpdatesSiteName=JBoss Tools Updates
+
+# "description" property - description of the feature
+description=JBoss Runtime Drools Detector
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2011 JBoss by Red Hat and others.\nAll rights reserved. This
program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.\n
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Added: trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/feature.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.runtime.drools.detector.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.runtime.drools.detector">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.jboss.tools.runtime.drools.detector"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added:
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/license.html
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/license.html
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/license.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/pom.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/pom.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.drools.detector.feature/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.features</groupId>
+ <artifactId>org.jboss.tools.runtime.drools.detector.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/.project
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/.project
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.jbpm.detector.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/build.properties
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/build.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ license.html
Added:
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties
===================================================================
---
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,55 @@
+###############################################################################
+# Copyright (c) 2009-2010 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.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Runtime jBPM Detector
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update/discovery sites
+updateSiteName=JBoss Developer Studio Updates
+JBossToolsUpdatesSiteName=JBoss Tools Updates
+
+# "description" property - description of the feature
+description=JBoss Runtime jBPM Detector
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2011 JBoss by Red Hat and others.\nAll rights reserved. This
program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.\n
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Added: trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.runtime.jbpm.detector.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.runtime.jbpm.detector">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.jboss.tools.runtime.jbpm.detector"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added: trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/license.html
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/license.html
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/license.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/pom.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/pom.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.jbpm.detector.feature/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.features</groupId>
+ <artifactId>org.jboss.tools.runtime.jbpm.detector.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/.project
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/.project
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.seam.detector.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/build.properties
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/build.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Added:
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.properties
===================================================================
---
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.properties
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,55 @@
+###############################################################################
+# Copyright (c) 2009-2010 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.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Runtime Seam Detector
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update/discovery sites
+updateSiteName=JBoss Developer Studio Updates
+JBossToolsUpdatesSiteName=JBoss Tools Updates
+
+# "description" property - description of the feature
+description=JBoss Runtime Seam Detector
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2011 JBoss by Red Hat and others.\nAll rights reserved. This
program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.\n
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Added: trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/feature.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.runtime.seam.detector.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.runtime.seam.detector">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.jboss.tools.runtime.seam.detector"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added: trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/license.html
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/license.html
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/license.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/pom.xml
===================================================================
--- trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/pom.xml
(rev 0)
+++
trunk/runtime/features/org.jboss.tools.runtime.seam.detector.feature/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.features</groupId>
+ <artifactId>org.jboss.tools.runtime.seam.detector.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
Modified: trunk/runtime/plugins/org.jboss.tools.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime/META-INF/MANIFEST.MF 2011-06-02 19:51:52
UTC (rev 31786)
+++ trunk/runtime/plugins/org.jboss.tools.runtime/META-INF/MANIFEST.MF 2011-06-02 20:00:22
UTC (rev 31787)
@@ -5,26 +5,14 @@
Bundle-Version: 1.3.0.qualifier
Bundle-Activator: org.jboss.tools.runtime.Activator
Bundle-Vendor: %BundleVendor
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.jboss.tools.seam.core,
- org.drools.eclipse;resolution:=optional,
- org.eclipse.ui,
- org.eclipse.wst.server.core,
- org.eclipse.ui.navigator,
- org.eclipse.debug.core,
- org.eclipse.jdt.launching,
- org.eclipse.ui.workbench,
- org.eclipse.datatools.connectivity;visibility:=reexport,
- org.eclipse.datatools.connectivity.db.generic,
- org.jboss.tools.common,
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
org.jboss.tools.runtime.core,
- org.jboss.ide.eclipse.as.core,
- org.jboss.tools.jbpm.common
+ org.eclipse.ui.navigator;bundle-version="3.5.100"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: org.jboss.tools.runtime,
- org.jboss.tools.runtime.handlers,
org.jboss.tools.runtime.preferences
Modified: trunk/runtime/plugins/org.jboss.tools.runtime/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime/plugin.xml 2011-06-02 19:51:52 UTC (rev
31786)
+++ trunk/runtime/plugins/org.jboss.tools.runtime/plugin.xml 2011-06-02 20:00:22 UTC (rev
31787)
@@ -61,43 +61,4 @@
</extension>
-->
- <extension
- point="org.jboss.tools.runtime.core.runtimeDetectors">
- <runtimeDetector
- id="org.jboss.tools.runtime.handlers.JBossASHandler"
- name="JBoss AS"
- class="org.jboss.tools.runtime.handlers.JBossASHandler"
- preferenceId="org.eclipse.wst.server.ui.runtime.preferencePage"
- priority="100"/>
- </extension>
-
- <extension
- point="org.jboss.tools.runtime.core.runtimeDetectors">
- <runtimeDetector
- id="org.jboss.tools.runtime.handlers.DroolsHandler"
- name="Drools"
- class="org.jboss.tools.runtime.handlers.DroolsHandler"
-
preferenceId="org.drools.eclipse.preferences.DroolsRuntimesPreferencePage"
- priority="300"/>
- </extension>
-
- <extension
- point="org.jboss.tools.runtime.core.runtimeDetectors">
- <runtimeDetector
- id="org.jboss.tools.runtime.handlers.JbpmHandler"
- name="jBPM"
- class="org.jboss.tools.runtime.handlers.JbpmHandler"
- preferenceId="org.jboss.tools.jbpm.locations"
- priority="400"/>
- </extension>
-
- <extension
- point="org.jboss.tools.runtime.core.runtimeDetectors">
- <runtimeDetector
- id="org.jboss.tools.runtime.handlers.SeamHandler"
- name="Seam"
- class="org.jboss.tools.runtime.handlers.SeamHandler"
- preferenceId="org.jboss.tools.common.model.ui.seam"
- priority="200"/>
- </extension>
</plugin>
Deleted:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.runtime;
-
-public interface IJBossRuntimePluginConstants {
- public static final String DEFAULT_DS = "DefaultDS";
- public static final String RUNTIME = Messages.JBossRuntimeStartup_Runtime;
- public static final String EAP = "EAP"; //$NON-NLS-1$
- public static final String EAP_STD = "EAP_STD"; //$NON-NLS-1$
- public static final String SOA_P = "SOA-P"; //$NON-NLS-1$
- public static final String SOA_P_STD = "SOA-P-STD"; //$NON-NLS-1$
- public static final String EPP = "EPP"; //$NON-NLS-1$
- public static final String EWP = "EWP"; //$NON-NLS-1$
- public static final String SEAM = "SEAM"; // NON-NLS-1$
- public static final String DROOLS = "DROOLS"; // NON-NLS-1$
- public static final String AS = "AS"; //$NON-NLS-1$
- public static final String JBOSS_EAP_HOME = "../../../../jboss-eap/jboss-as";
// JBoss AS home directory (relative to plugin)- <RHDS_HOME>/jbossas.
//$NON-NLS-1$
- public static final String JBOSS_EAP_HOME_CONFIGURATION =
"../../jboss-eap/jboss-as"; // JBoss AS home directory (relative to plugin)-
<RHDS_HOME>/jbossas. //$NON-NLS-1$
- public static final String SERVERS_FILE_NAME =
"application_platforms.properties"; //$NON-NLS-1$
- public static final String SERVERS_FILE = "../../../../studio/" +
SERVERS_FILE_NAME; //$NON-NLS-1$
- public static final String SERVERS_FILE_CONFIGURATION = "../../studio/" +
SERVERS_FILE_NAME; //$NON-NLS-1$
- public static String RUNTIME_CONFIG_FORMAT_VERSION = "1.0"; //$NON-NLS-1$
-
- public static final String SEAM_1_2_HOME = "../../../../jboss-eap/seam";
//$NON-NLS-1$
- public static final String SEAM_1_2_HOME_CONFIGURATION =
"../../jboss-eap/seam"; //$NON-NLS-1$
- public static final String SEAM_1_2_HOME_CP = "../../../../jboss-eap/seam1";
//$NON-NLS-1$
- public static final String SEAM_1_2_HOME_CONFIGURATION_CP =
"../../jboss-eap/seam1"; //$NON-NLS-1$
-
- public static final String SEAM_2_0_HOME = "../../../../jboss-eap/seamfp";
//$NON-NLS-1$
- public static final String SEAM_2_0_HOME_CONFIGURATION =
"../../jboss-eap/seamfp"; //$NON-NLS-1$
- public static final String SEAM_2_0_HOME_CP = "../../../../jboss-eap/seam2";
//$NON-NLS-1$
- public static final String SEAM_2_0_HOME_CONFIGURATION_CP =
"../../jboss-eap/seam2"; //$NON-NLS-1$
-
- public static final String[] SEAM_HOME_FOLDER_OPTIONS =
{"seam","seam1","seam2","seamfp"};
-
- // This constants are made to avoid dependency with org.jboss.ide.eclipse.as.core
plugin
- public static final String JBOSS_AS_RUNTIME_TYPE_ID[] = {
- "org.jboss.ide.eclipse.as.runtime.32", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.40", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.42", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.50", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.51", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.60", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.eap.43", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.eap.50", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.runtime.70" //$NON-NLS-1$
- };
-
- public static final String HSQLDB_DRIVER_JAR_NAME = "hsqldb.jar";
//$NON-NLS-1$
-
- public static final String HSQLDB_DRIVER_3X_4X_LOCATION =
"/server/default/lib/" + HSQLDB_DRIVER_JAR_NAME; //$NON-NLS-1$
-
- public static final String HSQLDB_DRIVER_5X_LOCATION = "/common/lib/" +
HSQLDB_DRIVER_JAR_NAME; //$NON-NLS-1$
-
- // This constants are made to avoid dependency with org.jboss.ide.eclipse.as.core
plugin
- public static final String JBOSS_AS_HSQL_DRIVER_LOCATION[] = {
- HSQLDB_DRIVER_3X_4X_LOCATION,
- HSQLDB_DRIVER_3X_4X_LOCATION,
- HSQLDB_DRIVER_3X_4X_LOCATION,
- HSQLDB_DRIVER_5X_LOCATION,
- HSQLDB_DRIVER_5X_LOCATION,
- HSQLDB_DRIVER_5X_LOCATION,
- HSQLDB_DRIVER_3X_4X_LOCATION,
- HSQLDB_DRIVER_5X_LOCATION
- };
-
- public static final String JBOSS_AS_TYPE_ID[] = {
- "org.jboss.ide.eclipse.as.32", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.40", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.42", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.50", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.51", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.60", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.eap.43", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.eap.50", //$NON-NLS-1$
- "org.jboss.ide.eclipse.as.70" //$NON-NLS-1$
- };
-
- public static final String JBOSS_AS_NAME[] = {
- Messages.JBossRuntimeStartup_JBoss_Application_Server_3_2,
- Messages.JBossRuntimeStartup_JBoss_Application_Server_4_0,
- Messages.JBossRuntimeStartup_JBoss_Application_Server_4_2,
- Messages.JBossRuntimeStartup_JBoss_Application_Server_5_0,
- Messages.JBossRuntimeStartup_JBoss_Application_Server_5_1,
- Messages.JBossRuntimeStartup_JBoss_Application_Server_6_0,
- Messages.JBossRuntimeStartup_JBoss_EAP_Server_4_3,
- Messages.JBossRuntimeStartup_JBoss_EAP_Server_5_0,
- Messages.JBossRuntimeStartup_JBoss_Application_Server_7_0
- };
-
- public static final String JBOSS_AS_HOST = "localhost"; //$NON-NLS-1$
-
- public static final String JBOSS_AS_DEFAULT_CONFIGURATION_NAME = "default";
//$NON-NLS-1$
-
- //public static final String FIRST_START_PREFERENCE_NAME = "FIRST_START";
-
- public static final String HSQL_DRIVER_DEFINITION_ID
- = "DriverDefn.Hypersonic DB"; //$NON-NLS-1$
-
- public static final String HSQL_DRIVER_NAME = "Hypersonic DB"; //$NON-NLS-1$
-
- public static final String HSQL_DRIVER_TEMPLATE_ID
- = "org.eclipse.datatools.enablement.hsqldb.1_8.driver"; //$NON-NLS-1$
-
- public static final String DTP_DB_URL_PROPERTY_ID
- = "org.eclipse.datatools.connectivity.db.URL"; //$NON-NLS-1$
-
- public static final String HSQL_PROFILE_ID =
"org.eclipse.datatools.enablement.hsqldb.connectionProfile";
-
- public static final String JBPM = "JBPM";
-
-}
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -27,6 +27,8 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
@@ -36,25 +38,49 @@
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.navigator.CommonNavigator;
+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.ServerDefinition;
import org.osgi.framework.Bundle;
import org.osgi.service.prefs.BackingStoreException;
-public class JBossRuntimeStartup implements IStartup, IJBossRuntimePluginConstants {
+public class JBossRuntimeStartup implements IStartup {
+ private static final String JBOSS_EAP_HOME = "../../../../jboss-eap"; //
JBoss EAP home directory (relative to plugin)- <RHDS_HOME>/jbossas. //$NON-NLS-1$
+ private static final String SERVERS_FILE_NAME =
"application_platforms.properties"; //$NON-NLS-1$
+ private static final String SERVERS_FILE = "../../../../studio/" +
SERVERS_FILE_NAME; //$NON-NLS-1$
+ private static final String SERVERS_FILE_CONFIGURATION = "../../studio/" +
SERVERS_FILE_NAME; //$NON-NLS-1$
+
private List<ServerDefinition> serverDefinitions = new
ArrayList<ServerDefinition>();
private IEclipsePreferences preferences;
public void earlyStartup() {
if (isJBDS() && willBeInitialized()) {
parseServerFile();
+ initializeIncludedRuntimes();
initializeRuntimes(serverDefinitions);
saveWorkspacePreferences();
}
}
+ private void initializeIncludedRuntimes() {
+ try {
+ String pluginLocation =
FileLocator.resolve(Activator.getDefault().getBundle().getEntry("/")).getPath();
//$NON-NLS-1$
+ File directory = new File(pluginLocation, JBOSS_EAP_HOME);
+ if (directory.isDirectory()) {
+ IPath path = new Path(directory.getAbsolutePath());
+ JBossRuntimeLocator locator = new JBossRuntimeLocator();
+ List<ServerDefinition> definitions = locator.searchForRuntimes(path, new
NullProgressMonitor());
+ serverDefinitions.addAll(definitions);
+
+ }
+ } catch (IOException e) {
+ Activator.log(e);
+ }
+
+ }
+
public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
for( IRuntimeDetector detector:detectors) {
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.classpath
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.classpath
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.classpath 2011-06-02
20:00:22 UTC (rev 31787)
@@ -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/plugins/org.jboss.tools.runtime.as.detector/.project
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.project
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.project 2011-06-02 20:00:22
UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.as.detector</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/plugins/org.jboss.tools.runtime.as.detector/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/.settings/org.eclipse.jdt.core.prefs 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,8 @@
+#Mon May 30 12:32:14 CEST 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/plugins/org.jboss.tools.runtime.as.detector/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/META-INF/MANIFEST.MF 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.runtime.as.detector;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.runtime.as.detector.RuntimeAsActivator
+Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.0",
+ org.eclipse.wst.server.core;bundle-version="1.1.302",
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.debug.core;bundle-version="3.7.0",
+ org.eclipse.jdt.launching;bundle-version="3.6.0",
+ org.eclipse.ui.workbench;bundle-version="3.7.0",
+
org.eclipse.datatools.connectivity;bundle-version="1.2.2";visibility:=reexport,
+ org.eclipse.datatools.connectivity.db.generic;bundle-version="1.0.1",
+ org.jboss.tools.common,
+ org.jboss.tools.runtime.core,
+ org.jboss.ide.eclipse.as.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %BundleVendor
+Bundle-Localization: plugin
+Export-Package: org.jboss.tools.runtime.as.detector,
+ org.jboss.tools.runtime.handlers
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.html
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.html
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
+<title>JBoss Runtime Detection</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Runtime AS Detector</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a
href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a
href="http://www.jboss.org/tools">JBoss Tools project
page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a
href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License
- Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.ini
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.ini
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.ini 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog
(translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=jboss_about.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which
the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.mappings
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.mappings
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.mappings 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.properties
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/about.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,2 @@
+blurb=JBoss Runtime AS Detector\n\nVersion\: {featureVersion}\n\n(c) Copyright JBoss by
Red Hat, contributors and others 2004 - 2011. All rights reserved.\nVisit
http\://jboss.org/tools
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/build.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/build.properties
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ jboss_about.png
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/jboss_about.png
===================================================================
(Binary files differ)
Property changes on:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/jboss_about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.properties
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.runtime
+BundleVendor = JBoss by Red Hat
+BundleName = JBoss Runtime AS Detector
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/plugin.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.jboss.tools.runtime.core.runtimeDetectors">
+ <runtimeDetector
+ id="org.jboss.tools.runtime.handlers.JBossASHandler"
+ name="JBoss AS"
+ class="org.jboss.tools.runtime.handlers.JBossASHandler"
+ preferenceId="org.eclipse.wst.server.ui.runtime.preferencePage"
+ priority="100"/>
+ </extension>
+
+</plugin>
Added: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/pom.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/pom.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/pom.xml 2011-06-02 20:00:22
UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.plugins</groupId>
+ <artifactId>org.jboss.tools.runtime.as.detector</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/IJBossRuntimePluginConstants.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.runtime.as.detector;
+
+public interface IJBossRuntimePluginConstants {
+ public static final String DEFAULT_DS = "DefaultDS";
+ public static final String RUNTIME = Messages.JBossRuntimeStartup_Runtime;
+ public static final String EAP = "EAP"; //$NON-NLS-1$
+ public static final String EAP_STD = "EAP_STD"; //$NON-NLS-1$
+ public static final String SOA_P = "SOA-P"; //$NON-NLS-1$
+ public static final String SOA_P_STD = "SOA-P-STD"; //$NON-NLS-1$
+ public static final String EPP = "EPP"; //$NON-NLS-1$
+ public static final String EWP = "EWP"; //$NON-NLS-1$
+ public static final String AS = "AS"; //$NON-NLS-1$
+ public static final String JBOSS_EAP_HOME = "../../../../jboss-eap/jboss-as";
// JBoss AS home directory (relative to plugin)- <RHDS_HOME>/jbossas.
//$NON-NLS-1$
+ public static final String JBOSS_EAP_HOME_CONFIGURATION =
"../../jboss-eap/jboss-as"; // JBoss AS home directory (relative to plugin)-
<RHDS_HOME>/jbossas. //$NON-NLS-1$
+ public static final String SERVERS_FILE_NAME =
"application_platforms.properties"; //$NON-NLS-1$
+ public static final String SERVERS_FILE = "../../../../studio/" +
SERVERS_FILE_NAME; //$NON-NLS-1$
+ public static final String SERVERS_FILE_CONFIGURATION = "../../studio/" +
SERVERS_FILE_NAME; //$NON-NLS-1$
+ public static String RUNTIME_CONFIG_FORMAT_VERSION = "1.0"; //$NON-NLS-1$
+
+ // This constants are made to avoid dependency with org.jboss.ide.eclipse.as.core
plugin
+ public static final String JBOSS_AS_RUNTIME_TYPE_ID[] = {
+ "org.jboss.ide.eclipse.as.runtime.32", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.40", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.42", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.50", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.51", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.60", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.eap.43", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.eap.50", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.runtime.70" //$NON-NLS-1$
+ };
+
+ public static final String HSQLDB_DRIVER_JAR_NAME = "hsqldb.jar";
//$NON-NLS-1$
+
+ public static final String HSQLDB_DRIVER_3X_4X_LOCATION =
"/server/default/lib/" + HSQLDB_DRIVER_JAR_NAME; //$NON-NLS-1$
+
+ public static final String HSQLDB_DRIVER_5X_LOCATION = "/common/lib/" +
HSQLDB_DRIVER_JAR_NAME; //$NON-NLS-1$
+
+ // This constants are made to avoid dependency with org.jboss.ide.eclipse.as.core
plugin
+ public static final String JBOSS_AS_HSQL_DRIVER_LOCATION[] = {
+ HSQLDB_DRIVER_3X_4X_LOCATION,
+ HSQLDB_DRIVER_3X_4X_LOCATION,
+ HSQLDB_DRIVER_3X_4X_LOCATION,
+ HSQLDB_DRIVER_5X_LOCATION,
+ HSQLDB_DRIVER_5X_LOCATION,
+ HSQLDB_DRIVER_5X_LOCATION,
+ HSQLDB_DRIVER_3X_4X_LOCATION,
+ HSQLDB_DRIVER_5X_LOCATION
+ };
+
+ public static final String JBOSS_AS_TYPE_ID[] = {
+ "org.jboss.ide.eclipse.as.32", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.40", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.42", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.50", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.51", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.60", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.eap.43", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.eap.50", //$NON-NLS-1$
+ "org.jboss.ide.eclipse.as.70" //$NON-NLS-1$
+ };
+
+ public static final String JBOSS_AS_NAME[] = {
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_3_2,
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_4_0,
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_4_2,
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_5_0,
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_5_1,
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_6_0,
+ Messages.JBossRuntimeStartup_JBoss_EAP_Server_4_3,
+ Messages.JBossRuntimeStartup_JBoss_EAP_Server_5_0,
+ Messages.JBossRuntimeStartup_JBoss_Application_Server_7_0
+ };
+
+ public static final String JBOSS_AS_HOST = "localhost"; //$NON-NLS-1$
+
+ public static final String JBOSS_AS_DEFAULT_CONFIGURATION_NAME = "default";
//$NON-NLS-1$
+
+ //public static final String FIRST_START_PREFERENCE_NAME = "FIRST_START";
+
+ public static final String HSQL_DRIVER_DEFINITION_ID
+ = "DriverDefn.Hypersonic DB"; //$NON-NLS-1$
+
+ public static final String HSQL_DRIVER_NAME = "Hypersonic DB"; //$NON-NLS-1$
+
+ public static final String HSQL_DRIVER_TEMPLATE_ID
+ = "org.eclipse.datatools.enablement.hsqldb.1_8.driver"; //$NON-NLS-1$
+
+ public static final String DTP_DB_URL_PROPERTY_ID
+ = "org.eclipse.datatools.connectivity.db.URL"; //$NON-NLS-1$
+
+ public static final String HSQL_PROFILE_ID =
"org.eclipse.datatools.enablement.hsqldb.connectionProfile";
+
+}
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/Messages.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/Messages.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/Messages.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.runtime.as.detector;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.runtime.as.detector.messages"; //$NON-NLS-1$
+ public static String JBossRuntimeStartup_JBoss_Application_Server_6_0;
+ public static String JBossRuntimeStartup_JBoss_Application_Server_7_0;
+ public static String JBossRuntimeStartup_Cannot_create_new_JBoss_Server;
+ public static String JBossRuntimeStartup_Cannott_create_new_DTP_Connection_Profile;
+ public static String JBossRuntimeStartup_Cannott_create_new_HSQL_DB_Driver;
+ public static String JBossRuntimeStartup_JBoss_Application_Server_3_2;
+ public static String JBossRuntimeStartup_JBoss_Application_Server_4_0;
+ public static String JBossRuntimeStartup_JBoss_Application_Server_4_2;
+ public static String JBossRuntimeStartup_JBoss_Application_Server_5_0;
+ public static String JBossRuntimeStartup_JBoss_Application_Server_5_1;
+ public static String JBossRuntimeStartup_JBoss_EAP_Server_4_3;
+ public static String JBossRuntimeStartup_JBoss_EAP_Server_5_0;
+ public static String JBossRuntimeStartup_Runtime;
+ public static String JBossRuntimeStartup_The_JBoss_AS_Hypersonic_embedded_database;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/RuntimeAsActivator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/RuntimeAsActivator.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/RuntimeAsActivator.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.runtime.as.detector;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class RuntimeAsActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.runtime.as.detector";
//$NON-NLS-1$
+
+ // The shared instance
+ private static RuntimeAsActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public RuntimeAsActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#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 RuntimeAsActivator getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e
+ .getLocalizedMessage(), e);
+ getDefault().getLog().log(status);
+ }
+
+ public static void log(Throwable e, String message) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+ getDefault().getLog().log(status);
+ }
+
+
+}
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/messages.properties
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/messages.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/as/detector/messages.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+JBossRuntimeStartup_Cannot_create_new_JBoss_Server=Can''t create new JBoss
Server
+JBossRuntimeStartup_Cannott_create_new_DTP_Connection_Profile=Can''t create new
DTP Connection Profile for JBoss AS Hypersonic embedded database
+JBossRuntimeStartup_Cannott_create_new_HSQL_DB_Driver=Can''t create new HSQL DB
Driver.
+JBossRuntimeStartup_JBoss_Application_Server_3_2=JBoss Application Server 3.2
+JBossRuntimeStartup_JBoss_Application_Server_4_0=JBoss Application Server 4.0
+JBossRuntimeStartup_JBoss_Application_Server_4_2=JBoss Application Server 4.2
+JBossRuntimeStartup_JBoss_Application_Server_5_0=JBoss Application Server 5.0
+JBossRuntimeStartup_JBoss_Application_Server_5_1=JBoss Application Server 5.1
+JBossRuntimeStartup_JBoss_Application_Server_6_0=JBoss Application Server 6.0
+JBossRuntimeStartup_JBoss_Application_Server_7_0=JBoss Application Server 7.0
+JBossRuntimeStartup_JBoss_EAP_Server_4_3=JBoss EAP Server 4.3
+JBossRuntimeStartup_JBoss_EAP_Server_5_0=JBoss EAP Server 5.0
+JBossRuntimeStartup_Runtime=Runtime
+JBossRuntimeStartup_The_JBoss_AS_Hypersonic_embedded_database=The JBoss AS Hypersonic
embedded database
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,500 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.runtime.handlers;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
+import org.eclipse.datatools.connectivity.drivers.DriverInstance;
+import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.datatools.connectivity.drivers.IDriverMgmtConstants;
+import org.eclipse.datatools.connectivity.drivers.IPropertySet;
+import org.eclipse.datatools.connectivity.drivers.PropertySetImpl;
+import org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerType;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
+import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.bean.JBossServerType;
+import org.jboss.ide.eclipse.as.core.server.bean.ServerBean;
+import org.jboss.ide.eclipse.as.core.server.bean.ServerBeanLoader;
+import org.jboss.tools.runtime.as.detector.IJBossRuntimePluginConstants;
+import org.jboss.tools.runtime.as.detector.Messages;
+import org.jboss.tools.runtime.as.detector.RuntimeAsActivator;
+import org.jboss.tools.runtime.core.JBossRuntimeLocator;
+import org.jboss.tools.runtime.core.RuntimeCoreActivator;
+import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
+import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.osgi.framework.Bundle;
+
+public class JBossASHandler extends AbstractRuntimeDetector implements
IJBossRuntimePluginConstants {
+
+ private static final int JBOSS_AS7_INDEX = 8;
+ private static String[] hasIncludedRuntimes = new String[] {SOA_P, EAP, EPP, EWP,
SOA_P_STD};
+ private static final String DROOLS = "DROOLS"; // NON-NLS-1$
+
+ public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ // FIXME
+ //createInitialJBossServer();
+ createJBossServerFromDefinitions(serverDefinitions);
+ }
+
+// public static void createInitialJBossServer(){
+// try {
+// String pluginLocation =
FileLocator.resolve(Activator.getDefault().getBundle().getEntry("/")).getPath();
//$NON-NLS-1$
+// File jbossASDir = new File(pluginLocation, JBOSS_EAP_HOME);
+// if (!jbossASDir.isDirectory()) {
+// Location configLocation = Platform.getConfigurationLocation();
+// URL configURL = configLocation.getURL();
+// String configuration = FileLocator.resolve(configURL).getPath();
+// jbossASDir = new File(configuration,
JBOSS_EAP_HOME_CONFIGURATION).getCanonicalFile();
+// } else {
+// jbossASDir = jbossASDir.getCanonicalFile();
+// }
+// if (jbossASDir.isDirectory()) {
+// int index = getJBossASVersion(jbossASDir);
+// createJBossServer(jbossASDir,index, "jboss-eap", "jboss-eap " +
RUNTIME); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+// } catch (IOException e) {
+// Activator.log(e,Messages.JBossRuntimeStartup_Cannot_create_new_JBoss_Server);
+// }
+// }
+
+ private static File getLocation(ServerDefinition serverDefinition) {
+ String type = serverDefinition.getType();
+ if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type)) {
+ return new File(serverDefinition.getLocation(), "jboss-as");
+ }
+ if (SOA_P_STD.equals(type)) {
+ return new File(serverDefinition.getLocation(),"jboss-esb");
//$NON-NLS-1$
+ }
+ if(EWP.equals(type)) {
+ return new File(serverDefinition.getLocation(),"jboss-as-web");
//$NON-NLS-1$
+ }
+ if (AS.equals(type) || EAP_STD.equals(type)) {
+ return serverDefinition.getLocation();
+ }
+ return null;
+ }
+
+ public static void createJBossServerFromDefinitions(List<ServerDefinition>
serverDefinitions) {
+ for (ServerDefinition serverDefinition:serverDefinitions) {
+ if (!serverDefinition.isEnabled()) {
+ continue;
+ }
+ File asLocation = getLocation(serverDefinition);
+ if (asLocation == null || !asLocation.isDirectory()) {
+ continue;
+ }
+ String type = serverDefinition.getType();
+ if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type)
+ || SOA_P_STD.equals(type) || EWP.equals(type)
+ || EAP_STD.equals(type)) {
+ String name = serverDefinition.getName();
+ String runtimeName = name + " " + RUNTIME; //$NON-NLS-1$
+ int index = getJBossASVersion(asLocation);
+ createJBossServer(asLocation, index, name, runtimeName);
+ } else if (AS.equals(type)){
+ String version = serverDefinition.getVersion();
+ int index = 2;
+ if ("3.2".equals(version)) { //$NON-NLS-1$
+ index = 0;
+ } else if ("4.0".equals(version)) { //$NON-NLS-1$
+ index = 1;
+ } else if ("4.2".equals(version)) { //$NON-NLS-1$
+ index = 2;
+ } else if ("5.0".equals(version)) { //$NON-NLS-1$
+ index = 3;
+ } else if ("5.1".equals(version)) { //$NON-NLS-1$
+ index = 4;
+ } else if ("6.0".equals(version)) { //$NON-NLS-1$
+ index = 5;
+ } else if ("7.0".equals(version)) { //$NON-NLS-1$
+ index = 8;
+ }
+ createJBossServer(serverDefinition.getLocation(),index,serverDefinition.getName(),serverDefinition.getName()
+ " " + RUNTIME); //$NON-NLS-1$
+ }
+ createJBossServerFromDefinitions(serverDefinition.getIncludedServerDefinitions());
+ }
+ }
+
+ private static int getJBossASVersion(File asLocation) {
+ int index = -1;
+ String fullVersion = new ServerBeanLoader().getFullServerVersion(new File(asLocation,
JBossServerType.AS.getSystemJarPath()));
+ if(fullVersion != null ) {
+ String version = fullVersion.substring(0, 3);
+ if ("4.3".equals(version)) { //$NON-NLS-1$
+ index = 6;
+ } else if ("5.0".equals(version)) { //$NON-NLS-1$
+ index = 7;
+ } else if ("5.1".equals(version)) { //$NON-NLS-1$
+ // FIXME - this needs to be changed when adding a new runtime type for JBoss EAP 5.1
+ index = 7;
+ }
+ }
+ return index;
+ }
+
+ private static void createJBossServer(File asLocation, int index, String name, String
runtimeName) {
+ if (asLocation == null || !asLocation.isDirectory() || index==-1) {
+ return;
+ }
+ IPath jbossAsLocationPath = new Path(asLocation.getAbsolutePath());
+
+ IServer[] servers = ServerCore.getServers();
+ for (int i = 0; i < servers.length; i++) {
+ IRuntime runtime = servers[i].getRuntime();
+ if(runtime != null && runtime.getLocation() != null &&
runtime.getLocation().equals(jbossAsLocationPath)) {
+ return;
+ }
+ }
+
+ IRuntime runtime = null;
+ IRuntime[] runtimes = ServerCore.getRuntimes();
+ for (int i = 0; i < runtimes.length; i++) {
+ if (runtimes[i] == null || runtimes[i].getLocation() == null) {
+ continue;
+ }
+ if (runtimes[i].getLocation().equals(jbossAsLocationPath)) {
+ runtime = runtimes[i].createWorkingCopy();
+ break;
+ }
+ }
+
+ IProgressMonitor progressMonitor = new NullProgressMonitor();
+ try {
+ if (runtime == null) {
+ runtime = createRuntime(runtimeName, asLocation.getAbsolutePath(), progressMonitor,
index);
+ }
+ if (runtime != null) {
+ createServer(progressMonitor, runtime, index, name);
+ }
+
+ createDriver(asLocation.getAbsolutePath(), index);
+ } catch (CoreException e) {
+ RuntimeAsActivator.log(e,Messages.JBossRuntimeStartup_Cannot_create_new_JBoss_Server);
+ } catch (ConnectionProfileException e) {
+ RuntimeAsActivator.log(e,Messages.JBossRuntimeStartup_Cannott_create_new_DTP_Connection_Profile);
+ }
+ }
+ /**
+ * Creates new JBoss AS Runtime, Server and hsqldb driver
+ * @param jbossASLocation location of JBoss Server
+ * @param progressMonitor to report progress
+ * @return server working copy
+ * @throws CoreException
+ * @throws ConnectionProfileException
+ */
+// public static IServerWorkingCopy initJBossAS(String jbossASLocation, IProgressMonitor
progressMonitor) throws CoreException, ConnectionProfileException {
+// IRuntime runtime = createRuntime(null, jbossASLocation, progressMonitor, 2);
+// IServerWorkingCopy server = null;
+// if (runtime != null) {
+// server = createServer(progressMonitor, runtime, 2, null);
+// }
+// createDriver(jbossASLocation);
+// return server;
+// }
+
+ /**
+ * Creates new JBoss AS Runtime
+ * @param jbossASLocation location of JBoss AS
+ * @param progressMonitor
+ * @return runtime working copy
+ * @throws CoreException
+ */
+ private static IRuntime createRuntime(String runtimeName, String jbossASLocation,
IProgressMonitor progressMonitor, int index) throws CoreException {
+ IRuntimeWorkingCopy runtime = null;
+ String type = null;
+ String version = null;
+ String runtimeId = null;
+ IPath jbossAsLocationPath = new Path(jbossASLocation);
+ IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(type, version,
JBOSS_AS_RUNTIME_TYPE_ID[index]);
+ if (runtimeTypes.length > 0) {
+ runtime = runtimeTypes[0].createRuntime(runtimeId, progressMonitor);
+ runtime.setLocation(jbossAsLocationPath);
+ if(runtimeName!=null) {
+ runtime.setName(runtimeName);
+ }
+// to fix
https://jira.jboss.org/jira/browse/JBDS-852 VM attributes initialization
below was commented
+// IVMInstall defaultVM = JavaRuntime.getDefaultVMInstall();
+ // IJBossServerRuntime.PROPERTY_VM_ID
+// ((RuntimeWorkingCopy) runtime).setAttribute("PROPERTY_VM_ID",
defaultVM.getId()); //$NON-NLS-1$
+ // IJBossServerRuntime.PROPERTY_VM_TYPE_ID
+// ((RuntimeWorkingCopy) runtime).setAttribute("PROPERTY_VM_TYPE_ID",
defaultVM.getVMInstallType().getId()); //$NON-NLS-1$
+ // IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME
+ ((RuntimeWorkingCopy)
runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName",
JBOSS_AS_DEFAULT_CONFIGURATION_NAME); //$NON-NLS-1$
+
+ return runtime.save(false, progressMonitor);
+ }
+ return runtime;
+ }
+
+ /**
+ * Creates new JBoss Server
+ * @param progressMonitor
+ * @param runtime parent JBoss AS Runtime
+ * @return server working copy
+ * @throws CoreException
+ */
+ private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor,
IRuntime runtime, int index, String name) throws CoreException {
+ if (name == null) {
+ name = JBOSS_AS_NAME[index];
+ }
+ IServer[] servers = ServerCore.getServers();
+ for (IServer server:servers) {
+ if (name.equals(server.getName()) ) {
+ return null;
+ }
+ }
+ IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID[index]);
+ IServerWorkingCopy server = serverType.createServer(null, null, runtime,
progressMonitor);
+
+ server.setHost(JBOSS_AS_HOST);
+ server.setName(name);
+
+ if (index != JBOSS_AS7_INDEX) {
+ // JBossServer.DEPLOY_DIRECTORY
+ // JBIDE-7822
+ //String deployVal =
runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString();
//$NON-NLS-1$ //$NON-NLS-2$
+ //((ServerWorkingCopy)
server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory",
deployVal); //$NON-NLS-1$
+ ((ServerWorkingCopy) server).setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE,
IDeployableServer.DEPLOY_SERVER);
+
+ // IDeployableServer.TEMP_DEPLOY_DIRECTORY
+ String deployTmpFolderVal =
runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("tmp").append("jbosstoolsTemp").toOSString();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ((ServerWorkingCopy)
server).setAttribute("org.jboss.ide.eclipse.as.core.server.tempDeployDirectory",
deployTmpFolderVal); //$NON-NLS-1$
+
+ // If we'd need to set up a username / pw for JMX, do it here.
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
+ }
+ server.save(false, progressMonitor);
+ return server;
+ }
+
+ /**
+ * Creates HSQL DB Driver
+ * @param jbossASLocation location of JBoss AS
+ * @param index
+ * @throws ConnectionProfileException
+ * @return driver instance
+ */
+ private static void createDriver(String jbossASLocation, int index) throws
ConnectionProfileException {
+ if(ProfileManager.getInstance().getProfileByName(DEFAULT_DS) != null) {
+ // Don't create the driver a few times
+ return;
+ }
+ String driverPath;
+ try {
+ driverPath = new File(jbossASLocation +
JBOSS_AS_HSQL_DRIVER_LOCATION[index]).getCanonicalPath(); //$NON-NLS-1$
+ } catch (IOException e) {
+ RuntimeAsActivator.getDefault().getLog().log(new Status(IStatus.ERROR,
+ RuntimeAsActivator.PLUGIN_ID,
Messages.JBossRuntimeStartup_Cannott_create_new_HSQL_DB_Driver, e));
+ return;
+ }
+
+ DriverInstance driver =
DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if (driver == null) {
+ TemplateDescriptor descr =
TemplateDescriptor.getDriverTemplateDescriptor(HSQL_DRIVER_TEMPLATE_ID);
+ IPropertySet instance = new PropertySetImpl(HSQL_DRIVER_NAME,
HSQL_DRIVER_DEFINITION_ID);
+ instance.setName(HSQL_DRIVER_NAME);
+ instance.setID(HSQL_DRIVER_DEFINITION_ID);
+ Properties props = new Properties();
+
+ IConfigurationElement[] template = descr.getProperties();
+ for (int i = 0; i < template.length; i++) {
+ IConfigurationElement prop = template[i];
+ String id = prop.getAttribute("id"); //$NON-NLS-1$
+
+ String value = prop.getAttribute("value"); //$NON-NLS-1$
+ props.setProperty(id, value == null ? "" : value); //$NON-NLS-1$
+ }
+ props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:."); //$NON-NLS-1$
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE, descr.getId());
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST, driverPath);
+
+ instance.setBaseProperties(props);
+ DriverManager.getInstance().removeDriverInstance(instance.getID());
+ System.gc();
+ DriverManager.getInstance().addDriverInstance(instance);
+ }
+
+ driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if (driver != null && ProfileManager.getInstance().getProfileByName(DEFAULT_DS)
== null) { //$NON-NLS-1$
+ // create profile
+ Properties props = new Properties();
+ props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
HSQL_DRIVER_DEFINITION_ID);
+ props.setProperty(IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,
""); //$NON-NLS-1$
+ props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID,
driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID,
driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID,
"Default"); //$NON-NLS-1$
+ props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, "");
//$NON-NLS-1$
+ props.setProperty(IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID,
"false"); //$NON-NLS-1$
+ props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID,
driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID,
driver.getProperty(IDBDriverDefinitionConstants.URL_PROP_ID));
+
+ ProfileManager.getInstance().createProfile(DEFAULT_DS, Messages.JBossRuntimeStartup_The_JBoss_AS_Hypersonic_embedded_database,
HSQL_PROFILE_ID, props, "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ }
+
+ public ServerDefinition getServerDefinition(File root,
+ IProgressMonitor monitor) {
+ if (monitor.isCanceled() || root == null || !isEnabled()) {
+ return null;
+ }
+ ServerBeanLoader loader = new ServerBeanLoader();
+ ServerBean serverBean = loader.loadFromLocation(root);
+
+ if (!JBossServerType.UNKNOWN.equals(serverBean.getType())) {
+ ServerDefinition serverDefinition = new ServerDefinition(serverBean.getName(),
+ serverBean.getVersion(), serverBean.getType().getId(), new
File(serverBean.getLocation()));
+ calculateIncludedServerDefinition(serverDefinition, monitor);
+ return serverDefinition;
+ }
+ return null;
+ }
+
+ private void calculateIncludedServerDefinition(
+ ServerDefinition serverDefinition, IProgressMonitor monitor) {
+ if (serverDefinition == null || serverDefinition.getType() == null) {
+ return;
+ }
+ String type = serverDefinition.getType();
+ if (!hasIncludedRuntimes(type)) {
+ return;
+ }
+ serverDefinition.getIncludedServerDefinitions().clear();
+ List<ServerDefinition> serverDefinitions = serverDefinition
+ .getIncludedServerDefinitions();
+ JBossRuntimeLocator locator = new JBossRuntimeLocator();
+ final File location = getLocation(serverDefinition);
+ File[] directories = serverDefinition.getLocation().listFiles(
+ new FileFilter() {
+
+ @Override
+ public boolean accept(File file) {
+ if (!file.isDirectory() || file.equals(location)) {
+ return false;
+ }
+ return true;
+ }
+ });
+ boolean saved = isEnabled();
+ try {
+ setEnabled(false);
+ for (File directory : directories) {
+ List<ServerDefinition> definitions = new ArrayList<ServerDefinition>();
+ locator.searchDirectory(directory, definitions, 1, monitor);
+ for (ServerDefinition definition:definitions) {
+ definition.setParent(serverDefinition);
+ }
+ serverDefinitions.addAll(definitions);
+ }
+ if (SOA_P.equals(type) || SOA_P_STD.equals(type)) {
+ Bundle drools = Platform.getBundle("org.drools.eclipse");
+ Bundle droolsDetector = Platform
+ .getBundle("org.jboss.tools.runtime.drools.detector");
+ if (drools != null && droolsDetector != null) {
+ File droolsRoot = serverDefinition.getLocation();
+ if (droolsRoot.isDirectory()) {
+ String name = "Drools - " + serverDefinition.getName();
+ ServerDefinition droolsDefinition = new ServerDefinition(
+ name, serverDefinition.getVersion(), DROOLS,
+ droolsRoot);
+ droolsDefinition.setParent(serverDefinition);
+ serverDefinition.getIncludedServerDefinitions().add(
+ droolsDefinition);
+ }
+ }
+ }
+ } finally {
+ setEnabled(saved);
+ }
+ }
+
+ private boolean hasIncludedRuntimes(String type) {
+ for (String t:hasIncludedRuntimes) {
+ if (t.equals(type)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean exists(ServerDefinition serverDefinition) {
+ if (serverDefinition == null || serverDefinition.getLocation() == null) {
+ return false;
+ }
+ File location = getLocation(serverDefinition);
+ if (location == null || !location.isDirectory()) {
+ return false;
+ }
+ String path = location.getAbsolutePath();
+ if (path == null) {
+ return false;
+ }
+ IServer[] servers = ServerCore.getServers();
+ for (int i = 0; i < servers.length; i++) {
+ IRuntime runtime = servers[i].getRuntime();
+ if (runtime == null || runtime.getLocation() == null) {
+ continue;
+ }
+ if(path.equals(runtime.getLocation().toOSString())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void computeIncludedServerDefinition(
+ ServerDefinition serverDefinition) {
+ if (serverDefinition == null) {
+ return;
+ }
+ String type = serverDefinition.getType();
+ if (AS.equals(type)) {
+ return;
+ }
+ calculateIncludedServerDefinition(serverDefinition, new NullProgressMonitor());
+ }
+
+
+}
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -73,7 +73,7 @@
}
- private void searchDirectory(File directory, List<ServerDefinition>
serverDefinitions,
+ public void searchDirectory(File directory, List<ServerDefinition>
serverDefinitions,
int depth, IProgressMonitor monitor) {
if (depth == 0 || monitor.isCanceled() || directory == null ||
!directory.isDirectory()) {
return;
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -56,6 +56,8 @@
private static final String PRIORITY = "priority";
+ private static Set<IRuntimeDetector> declaredRuntimeDetectors;
+
private static Set<IRuntimeDetector> runtimeDetectors;
// The shared instance
@@ -97,8 +99,8 @@
}
public static Set<IRuntimeDetector> getDeclaredRuntimeDetectors() {
- if (runtimeDetectors == null) {
- runtimeDetectors = new TreeSet<IRuntimeDetector>();
+ if (declaredRuntimeDetectors == null) {
+ declaredRuntimeDetectors = new TreeSet<IRuntimeDetector>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = registry
.getExtensionPoint(RUNTIME_DETECTOR_EXTENSION_ID);
@@ -138,11 +140,11 @@
priority = Integer.MAX_VALUE;
}
detector.setPriority(priority);
- runtimeDetectors.add(detector);
+ declaredRuntimeDetectors.add(detector);
}
}
}
- return runtimeDetectors;
+ return declaredRuntimeDetectors;
}
public static void log(Throwable e) {
@@ -157,24 +159,28 @@
}
public static Set<IRuntimeDetector> getRuntimeDetectors() {
- Set<IRuntimeDetector> detectors = getDeclaredRuntimeDetectors();
- String enabledDetectors = getPreferences().get(ENABLED_DETECTORS, null);
- if (enabledDetectors == null) {
- saveEnabledDetectors(detectors);
- } else {
- StringTokenizer tokenizer = new StringTokenizer(enabledDetectors, ",");
- List<String> enabled = new ArrayList<String>();
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- if (token != null && !token.isEmpty()) {
- enabled.add(token);
+ if (runtimeDetectors == null) {
+ runtimeDetectors = getDeclaredRuntimeDetectors();
+ String enabledDetectors = getPreferences().get(ENABLED_DETECTORS,
+ null);
+ if (enabledDetectors == null) {
+ saveEnabledDetectors(runtimeDetectors);
+ } else {
+ StringTokenizer tokenizer = new StringTokenizer(
+ enabledDetectors, ",");
+ List<String> enabled = new ArrayList<String>();
+ while (tokenizer.hasMoreTokens()) {
+ String token = tokenizer.nextToken();
+ if (token != null && !token.isEmpty()) {
+ enabled.add(token);
+ }
}
+ for (IRuntimeDetector detector : runtimeDetectors) {
+ detector.setEnabled(enabled.contains(detector.getId()));
+ }
}
- for (IRuntimeDetector detector:detectors) {
- detector.setEnabled(enabled.contains(detector.getId()));
- }
}
- return detectors;
+ return runtimeDetectors;
}
public static void saveEnabledDetectors(Set<IRuntimeDetector> detectors) {
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -46,11 +46,6 @@
public void setPreferenceId(String preferenceId) {
this.preferenceId = preferenceId;
}
-
- @Override
- public String includedRuntimes(ServerDefinition serverDefinition) {
- return "";
- }
public String getImplementationVersion(File dir, String file) {
File jarFile = new File(dir, file);
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -40,8 +40,6 @@
ServerDefinition getServerDefinition(File root, IProgressMonitor monitor);
- String includedRuntimes(ServerDefinition serverDefinition);
-
boolean exists(ServerDefinition serverDefinition);
int getPriority();
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.classpath
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.classpath
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.classpath 2011-06-02
20:00:22 UTC (rev 31787)
@@ -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/plugins/org.jboss.tools.runtime.drools.detector/.project
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.project
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.drools.detector</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/plugins/org.jboss.tools.runtime.drools.detector/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/.settings/org.eclipse.jdt.core.prefs 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,8 @@
+#Mon May 30 13:52:12 CEST 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/plugins/org.jboss.tools.runtime.drools.detector/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/META-INF/MANIFEST.MF 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.runtime.drools.detector;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.runtime.drools.detector.RuntimeDroolsActivator
+Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.jboss.tools.runtime.core,
+ org.drools.eclipse
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %BundleVendor
+Bundle-Localization: plugin
+Export-Package: org.jboss.tools.runtime.drools.detector,
+ org.jboss.tools.runtime.handlers
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.html
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.html
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
+<title>JBoss Runtime Detection</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Runtime Drools Detector</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a
href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a
href="http://www.jboss.org/tools">JBoss Tools project
page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a
href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License
- Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.ini
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.ini
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.ini 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog
(translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=jboss_about.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which
the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.mappings
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.mappings
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.mappings 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/about.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,2 @@
+blurb=JBoss Runtime Drools Detector\n\nVersion\: {featureVersion}\n\n(c) Copyright JBoss
by Red Hat, contributors and others 2004 - 2011. All rights reserved.\nVisit
http\://jboss.org/tools
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/build.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/build.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ jboss_about.png
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/jboss_about.png
===================================================================
(Binary files differ)
Property changes on:
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/jboss_about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.runtime
+BundleVendor = JBoss by Red Hat
+BundleName = JBoss Runtime Drools Detector
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/plugin.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.jboss.tools.runtime.core.runtimeDetectors">
+ <runtimeDetector
+ id="org.jboss.tools.runtime.handlers.DroolsHandler"
+ name="Drools"
+ class="org.jboss.tools.runtime.handlers.DroolsHandler"
+
preferenceId="org.drools.eclipse.preferences.DroolsRuntimesPreferencePage"
+ priority="300"/>
+ </extension>
+
+</plugin>
Added: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/pom.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/pom.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.plugins</groupId>
+ <artifactId>org.jboss.tools.runtime.drools.detector</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/drools/detector/RuntimeDroolsActivator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/drools/detector/RuntimeDroolsActivator.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/drools/detector/RuntimeDroolsActivator.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.runtime.drools.detector;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class RuntimeDroolsActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID =
"org.jboss.tools.runtime.drools.detector"; //$NON-NLS-1$
+
+ // The shared instance
+ private static RuntimeDroolsActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public RuntimeDroolsActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#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 RuntimeDroolsActivator getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e
+ .getLocalizedMessage(), e);
+ getDefault().getLog().log(status);
+ }
+
+ public static void log(Throwable e, String message) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+ getDefault().getLog().log(status);
+ }
+
+}
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.runtime.handlers;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.drools.eclipse.util.DroolsRuntime;
+import org.drools.eclipse.util.DroolsRuntimeManager;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
+import org.jboss.tools.runtime.core.model.ServerDefinition;
+
+public class DroolsHandler extends AbstractRuntimeDetector {
+
+ private static final String DROOLS = "DROOLS"; // NON-NLS-1$
+ private static final String SOA_P = "SOA-P"; //$NON-NLS-1$
+
+ @Override
+ public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ DroolsRuntime[] existingRuntimes = DroolsRuntimeManager
+ .getDroolsRuntimes();
+ List<DroolsRuntime> droolsRuntimes = new ArrayList<DroolsRuntime>();
+ if (existingRuntimes != null) {
+ for (DroolsRuntime runtime : existingRuntimes) {
+ droolsRuntimes.add(runtime);
+ }
+ }
+ initializeInternal(serverDefinitions, droolsRuntimes);
+ if (droolsRuntimes.size() > 0) {
+ DroolsRuntime[] dra = droolsRuntimes.toArray(new DroolsRuntime[0]);
+ DroolsRuntimeManager.setDroolsRuntimes(dra);
+ }
+
+ }
+
+ private void initializeInternal(List<ServerDefinition> serverDefinitions,
+ List<DroolsRuntime> droolsRuntimes) {
+ for (ServerDefinition serverDefinition : serverDefinitions) {
+ String type = serverDefinition.getType();
+ if (serverDefinition.isEnabled() && !droolsExists(serverDefinition)) {
+ if (DROOLS.equals(type)) {
+ File droolsRoot = serverDefinition.getLocation(); //$NON-NLS-1$
+ if (droolsRoot.isDirectory()) {
+ DroolsRuntime runtime = new DroolsRuntime();
+ runtime.setName("Drools " + serverDefinition.getVersion() + " -
" + serverDefinition.getName()); //$NON-NLS-1$
+ runtime.setPath(droolsRoot.getAbsolutePath());
+ DroolsRuntimeManager.recognizeJars(runtime);
+ runtime.setDefault(true);
+ droolsRuntimes.add(runtime);
+ }
+ }
+ }
+ initializeInternal(serverDefinition.getIncludedServerDefinitions(),
+ droolsRuntimes);
+ }
+ }
+
+ /**
+ * @param serverDefinition
+ * @return
+ */
+ private static boolean droolsExists(ServerDefinition serverDefinition) {
+ DroolsRuntime[] droolsRuntimes = DroolsRuntimeManager
+ .getDroolsRuntimes();
+ for (DroolsRuntime dr : droolsRuntimes) {
+ String location = dr.getPath();
+ if (location != null
+ && location.equals(serverDefinition.getLocation()
+ .getAbsolutePath())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public ServerDefinition getServerDefinition(File root,
+ IProgressMonitor monitor) {
+ if (monitor.isCanceled() || root == null) {
+ return null;
+ }
+ String[] files = root.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if (name.startsWith("drools-api") &&
name.endsWith(".jar")) {
+ return true;
+ }
+ return false;
+ }
+ });
+ if (files != null && files.length > 0) {
+ String version = getImplementationVersion(root, files[0]);
+ if (version != null) {
+ version = version.substring(0, 3);
+ return new ServerDefinition(root.getName(), version, DROOLS,
+ root.getAbsoluteFile());
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public boolean exists(ServerDefinition serverDefinition) {
+ if (serverDefinition == null || serverDefinition.getLocation() == null) {
+ return false;
+ }
+ return droolsExists(serverDefinition);
+ }
+
+ public static void calculateIncludedServerDefinition(
+ ServerDefinition serverDefinition) {
+ if (serverDefinition == null
+ || !SOA_P.equals(serverDefinition.getType())) {
+ return;
+ }
+ File droolsRoot = serverDefinition.getLocation(); //$NON-NLS-1$
+ if (droolsRoot.isDirectory()) {
+ String name = "Drools - " + serverDefinition.getName(); //$NON-NLS-1$
+ ServerDefinition sd = new ServerDefinition(name,
+ serverDefinition.getVersion(), DROOLS, droolsRoot);
+ sd.setParent(serverDefinition);
+ serverDefinition.getIncludedServerDefinitions().add(sd);
+ }
+ }
+
+}
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.classpath
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.classpath
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.classpath 2011-06-02
20:00:22 UTC (rev 31787)
@@ -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/plugins/org.jboss.tools.runtime.jbpm.detector/.project
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.project
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.jbpm.detector</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/plugins/org.jboss.tools.runtime.jbpm.detector/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/.settings/org.eclipse.jdt.core.prefs 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,8 @@
+#Mon May 30 14:19:53 CEST 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/plugins/org.jboss.tools.runtime.jbpm.detector/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/META-INF/MANIFEST.MF 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.jboss.tools.runtime.jbpm.detector;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.runtime.jbpm.detector.RuntimeJbpmActivator
+Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.jboss.tools.runtime.core,
+ org.jboss.tools.jbpm.common
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Name: %BundleName
+Bundle-Vendor: %BundleVendor
+Bundle-Localization: plugin
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.html
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.html
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
+<title>JBoss Runtime Detection</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Runtime jBPM Detector</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a
href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a
href="http://www.jboss.org/tools">JBoss Tools project
page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a
href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License
- Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.ini
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.ini
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.ini 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog
(translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=jboss_about.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which
the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.mappings
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.mappings
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.mappings 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/about.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,2 @@
+blurb=JBoss Runtime jBPM Detector\n\nVersion\: {featureVersion}\n\n(c) Copyright JBoss by
Red Hat, contributors and others 2004 - 2011. All rights reserved.\nVisit
http\://jboss.org/tools
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/build.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/build.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ jboss_about.png
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/jboss_about.png
===================================================================
(Binary files differ)
Property changes on:
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/jboss_about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.runtime
+BundleVendor = JBoss by Red Hat
+BundleName = JBoss Runtime jBPM Detector
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/plugin.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.jboss.tools.runtime.core.runtimeDetectors">
+ <runtimeDetector
+ id="org.jboss.tools.runtime.handlers.JbpmHandler"
+ name="jBPM"
+ class="org.jboss.tools.runtime.handlers.JbpmHandler"
+ preferenceId="org.jboss.tools.jbpm.locations"
+ priority="400"/>
+ </extension>
+
+</plugin>
Added: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/pom.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/pom.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.plugins</groupId>
+ <artifactId>org.jboss.tools.runtime.jbpm.detector</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,144 @@
+/*************************************************************************************
+ * Copyright (c) 2010 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.handlers;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.jbpm.preferences.JbpmInstallation;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
+import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
+import org.jboss.tools.runtime.core.model.ServerDefinition;
+
+public class JbpmHandler extends AbstractRuntimeDetector {
+
+ private static final String JBPM3 = "jBPM3"; //$NON-NLS-1$
+ private static final String JBPM4 = "jBPM4"; //$NON-NLS-1$
+ private static final String JBPM = "JBPM"; //$NON-NLS-1$
+ private static final String SOA_P = "SOA-P"; //$NON-NLS-1$
+ private static final String SOA_P_STD = "SOA-P-STD"; //$NON-NLS-1$
+
+ public static File getJbpmRoot(ServerDefinition serverDefinition) {
+ String type = serverDefinition.getType();
+ if (SOA_P.equals(type) || SOA_P_STD.equals(type)) {
+ return new File(serverDefinition.getLocation(),"jbpm-jpdl"); //$NON-NLS-1$
+ }
+ if (JBPM.equals(type)) {
+ return serverDefinition.getLocation();
+ }
+ return null;
+ }
+
+ @Override
+ public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ for (ServerDefinition serverDefinition : serverDefinitions) {
+ if (serverDefinition.isEnabled() && !jbpmExists(serverDefinition)) {
+ File jbpmRoot = getJbpmRoot(serverDefinition);
+ if (jbpmRoot == null || !jbpmRoot.isDirectory()) {
+ continue;
+ }
+ String type = serverDefinition.getType();
+ if (JBPM.equals(type)) {
+ PreferencesManager.getInstance().addJbpmInstallation(serverDefinition.getName(),
jbpmRoot.getAbsolutePath(), serverDefinition.getVersion());
+ }
+ }
+ initializeRuntimes(serverDefinition.getIncludedServerDefinitions());
+ }
+
+ }
+
+ /**
+ * @param serverDefinition
+ * @return
+ */
+ public static boolean jbpmExists(ServerDefinition serverDefinition) {
+ File jbpmRoot = getJbpmRoot(serverDefinition);
+ if (jbpmRoot == null || !jbpmRoot.isDirectory()) {
+ return false;
+ }
+ Map<String, JbpmInstallation> jbpmMap =
PreferencesManager.getInstance().getJbpmInstallationMap();
+ Collection<JbpmInstallation> jbpmInstalations = jbpmMap.values();
+ for (JbpmInstallation jbpm:jbpmInstalations) {
+ String location = jbpm.location;
+ if (location != null && location.equals(jbpmRoot.getAbsolutePath())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public ServerDefinition getServerDefinition(File root,
+ IProgressMonitor monitor) {
+ if (monitor.isCanceled() || root == null) {
+ return null;
+ }
+ boolean isJBPM = isValidJbpmInstallation(root.getAbsolutePath());
+ if (isJBPM) {
+ String version = "unknown";
+ if (isJbpm3(root.getAbsolutePath())) {
+ version = JBPM3;
+ } else if (isJbpm4(root.getAbsolutePath())) {
+ version = JBPM4;
+ }
+ String name = root.getName();
+ int index = 1;
+ boolean nameExists = PreferencesManager.getInstance().getJbpmInstallation(name) !=
null;
+ while (nameExists) {
+ name = root.getName() + " " + index++;
+ nameExists = PreferencesManager.getInstance().getJbpmInstallation(name) != null;
+ }
+ return new ServerDefinition(name, version, JBPM, root.getAbsoluteFile());
+ }
+ return null;
+ }
+
+ private static boolean isJbpm3(String location) {
+ return new
Path(location).append("/src/resources/gpd/version.info.xml").toFile().exists();
+ }
+
+ private static boolean isJbpm4(String location) {
+ return new Path(location).append("/jbpm.jar").toFile().exists();
+ }
+
+ private boolean isValidJbpmInstallation(String location) {
+ return isJbpm3(location) || isJbpm4(location);
+ }
+
+ @Override
+ public boolean exists(ServerDefinition serverDefinition) {
+ if (serverDefinition == null || serverDefinition.getLocation() == null) {
+ return false;
+ }
+ return jbpmExists(serverDefinition);
+ }
+
+ public static void calculateIncludedServerDefinition(
+ ServerDefinition serverDefinition) {
+ if (serverDefinition == null || !SOA_P.equals(serverDefinition.getType())) {
+ return;
+ }
+ File jbpmRoot = new File(serverDefinition.getLocation(),"jbpm-jpdl");
//$NON-NLS-1$
+ if (jbpmRoot.isDirectory()) {
+ String version = JBPM3;
+ if (isJbpm4(serverDefinition.getLocation().getAbsolutePath())) {
+ version = JBPM4;
+ }
+ ServerDefinition sd = new ServerDefinition(serverDefinition.getName(), version, JBPM,
jbpmRoot);
+ sd.setParent(serverDefinition);
+ serverDefinition.getIncludedServerDefinitions().add(sd);
+ }
+ }
+}
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/jbpm/detector/RuntimeJbpmActivator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/jbpm/detector/RuntimeJbpmActivator.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/jbpm/detector/RuntimeJbpmActivator.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,50 @@
+package org.jboss.tools.runtime.jbpm.detector;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class RuntimeJbpmActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID =
"org.jboss.tools.runtime.jbpm.detector"; //$NON-NLS-1$
+
+ // The shared instance
+ private static RuntimeJbpmActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public RuntimeJbpmActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#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 RuntimeJbpmActivator getDefault() {
+ return plugin;
+ }
+
+}
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.classpath
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.classpath
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.classpath 2011-06-02
20:00:22 UTC (rev 31787)
@@ -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/plugins/org.jboss.tools.runtime.seam.detector/.project
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.project
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.project 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.seam.detector</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/plugins/org.jboss.tools.runtime.seam.detector/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/.settings/org.eclipse.jdt.core.prefs 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,8 @@
+#Mon May 30 13:29:40 CEST 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/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.runtime.seam.detector;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.runtime.seam.detector.RuntimeSeamActivator
+Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.0",
+ org.jboss.tools.seam.core,
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.ui.workbench;bundle-version="3.7.0",
+ org.jboss.tools.common,
+ org.jboss.tools.runtime.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Localization: plugin
+Bundle-Vendor: %BundleVendor
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.html
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.html
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.html 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
+<title>JBoss Runtime Detection</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Runtime Seam Detector</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a
href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a
href="http://www.jboss.org/tools">JBoss Tools project
page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a
href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License
- Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.ini
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.ini
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.ini 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog
(translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=jboss_about.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which
the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.mappings
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.mappings
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.mappings 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/about.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,2 @@
+blurb=JBoss Runtime Seam Detector\n\nVersion\: {featureVersion}\n\n(c) Copyright JBoss by
Red Hat, contributors and others 2004 - 2011. All rights reserved.\nVisit
http\://jboss.org/tools
+
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/build.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/build.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/build.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ jboss_about.png
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/jboss_about.png
===================================================================
(Binary files differ)
Property changes on:
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/jboss_about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.properties
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.properties 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.runtime
+BundleVendor = JBoss by Red Hat
+BundleName = JBoss Runtime Seam Detector
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.jboss.tools.runtime.core.runtimeDetectors">
+ <runtimeDetector
+ id="org.jboss.tools.runtime.handlers.SeamHandler"
+ name="Seam"
+ class="org.jboss.tools.runtime.handlers.SeamHandler"
+ preferenceId="org.jboss.tools.common.model.ui.seam"
+ priority="200"/>
+ </extension>
+</plugin>
Added: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/pom.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/pom.xml
(rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/pom.xml 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,14 @@
+<?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.runtime</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.plugins</groupId>
+ <artifactId>org.jboss.tools.runtime.seam.detector</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,180 @@
+/*************************************************************************************
+ * Copyright (c) 2010 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.handlers;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
+import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.seam.core.SeamUtil;
+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;
+
+public class SeamHandler extends AbstractRuntimeDetector {
+
+ private final static String seamJarName = "jboss-seam.jar";
+ private final static String seamVersionAttributeName = "Seam-Version";
+ private static final String SEAM = "SEAM"; // NON-NLS-1$
+
+ private static File getSeamRoot(ServerDefinition serverDefinition) {
+ String type = serverDefinition.getType();
+ if (SEAM.equals(type)) {
+ return serverDefinition.getLocation();
+ }
+ return null;
+ }
+
+ @Override
+ public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+
+ Map<String, SeamRuntime> map = new HashMap<String,SeamRuntime>();
+
+ for(ServerDefinition serverDefinition:serverDefinitions) {
+ if (!serverDefinition.isEnabled()) {
+ continue;
+ }
+ String type = serverDefinition.getType();
+ if (SEAM.equals(type)) {
+ addSeam(map, serverDefinition, serverDefinition.getLocation());
+ }
+ initializeRuntimes(serverDefinition.getIncludedServerDefinitions());
+ }
+ SeamRuntimeManager.getInstance().save();
+ }
+
+ private static void addSeam(Map<String, SeamRuntime> map,
+ ServerDefinition serverDefinition, File seamFile) {
+ if (seamFile.exists() && seamFile.canRead() && seamFile.isDirectory())
{
+ SeamVersion seamVersion = getSeamVersion(seamFile.getAbsolutePath());
+ if (seamVersion != null) {
+ String name = "Seam " + serverDefinition.getName() + " " +
seamVersion; //$NON-NLS-1$ //$NON-NLS-2$
+ addSeam(map, seamFile.getAbsolutePath(), seamVersion, name);
+ }
+ }
+ }
+
+ private static void addSeam(Map<String, SeamRuntime> map, String
seamPath,SeamVersion seamVersion, String name) {
+ if (!seamExists(seamPath)) {
+ File seamFolder = new File(seamPath);
+ if(seamFolder.exists() && seamFolder.isDirectory()) {
+ SeamRuntime rt = new SeamRuntime();
+ rt.setHomeDir(seamPath);
+ rt.setName(name);
+ rt.setDefault(true);
+ rt.setVersion(seamVersion);
+ SeamRuntimeManager.getInstance().addRuntime(rt);
+ }
+ }
+ }
+
+ private static SeamVersion getSeamVersion(String seamGenBuildPath) {
+ if (seamGenBuildPath == null || seamGenBuildPath.trim().length() <= 0) {
+ return null;
+ }
+ String fullVersion = SeamUtil.getSeamVersionFromManifest(seamGenBuildPath);
+ if (fullVersion == null) {
+ return null;
+ }
+ String version = fullVersion.substring(0,3);
+ SeamVersion seamVersion = null;
+ if (version != null) {
+ seamVersion = SeamVersion.findByString(version);
+ }
+ return seamVersion;
+ }
+
+ /**
+ * @param seamPath
+ * @return
+ */
+ private static boolean seamExists(String seamPath) {
+ SeamRuntime[] seamRuntimes = SeamRuntimeManager.getInstance().getRuntimes();
+ for (SeamRuntime sr:seamRuntimes) {
+ if (seamPath != null && seamPath.equals(sr.getHomeDir())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public ServerDefinition getServerDefinition(File root,
+ IProgressMonitor monitor) {
+ if (monitor.isCanceled() || root == null) {
+ return null;
+ }
+ String seamVersion = getSeamVersionFromManifest(root.getAbsolutePath());
+ if (seamVersion != null) {
+ return new ServerDefinition(root.getName(), seamVersion, SEAM,
root.getAbsoluteFile());
+ }
+ return null;
+ }
+
+ private static String getSeamVersionFromManifest(String seamHome) {
+ File seamHomeFolder = new File(seamHome);
+ if (seamHomeFolder == null || !seamHomeFolder.isDirectory()) {
+ return null;
+ }
+ String[] seamFiles = seamHomeFolder.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if ("seam-gen".equals(name)) {
+ return true;
+ }
+ if ("lib".equals(name)) {
+ return true;
+ }
+ return false;
+ }
+ });
+ if (seamFiles == null || seamFiles.length != 2) {
+ return null;
+ }
+ File jarFile = new File(seamHome, "lib/" + seamJarName);
+ if(!jarFile.isFile()) {
+ jarFile = new File(seamHome, seamJarName);
+ if(!jarFile.isFile()) {
+ return null;
+ }
+ }
+ try {
+ JarFile jar = new JarFile(jarFile);
+ Attributes attributes = jar.getManifest().getMainAttributes();
+ String version = attributes.getValue(seamVersionAttributeName);
+ return version;
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean exists(ServerDefinition serverDefinition) {
+ if (serverDefinition == null || serverDefinition.getLocation() == null) {
+ return false;
+ }
+ File seamRoot = getSeamRoot(serverDefinition);
+ if (seamRoot == null || !seamRoot.isDirectory()) {
+ return false;
+ }
+ String path = seamRoot.getAbsolutePath();
+ return seamExists(path);
+ }
+
+}
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/seam/detector/RuntimeSeamActivator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/seam/detector/RuntimeSeamActivator.java
(rev 0)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/seam/detector/RuntimeSeamActivator.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.runtime.seam.detector;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class RuntimeSeamActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID =
"org.jboss.tools.runtime.seam.detector"; //$NON-NLS-1$
+
+ // The shared instance
+ private static RuntimeSeamActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public RuntimeSeamActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#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 RuntimeSeamActivator getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e
+ .getLocalizedMessage(), e);
+ getDefault().getLog().log(status);
+ }
+
+ public static void log(Throwable e, String message) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+ getDefault().getLog().log(status);
+ }
+}
Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF 2011-06-02
19:51:52 UTC (rev 31786)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF 2011-06-02
20:00:22 UTC (rev 31787)
@@ -32,7 +32,11 @@
org.jboss.tools.seam.ui.pages,
org.jboss.tools.seam.xml,
org.jboss.tools.seam.xml.ui,
- org.jboss.tools.seam.text.ext
+ org.jboss.tools.seam.text.ext,
+ org.jboss.tools.runtime.as.detector,
+ org.jboss.tools.runtime.drools.detector,
+ org.jboss.tools.runtime.jbpm.detector,
+ org.jboss.tools.runtime.seam.detector
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %BundleVendor
Modified:
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 2011-06-02
19:51:52 UTC (rev 31786)
+++
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java 2011-06-02
20:00:22 UTC (rev 31787)
@@ -38,7 +38,7 @@
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.IJBossRuntimePluginConstants;
+import org.jboss.tools.runtime.as.detector.IJBossRuntimePluginConstants;
import org.jboss.tools.runtime.core.JBossRuntimeLocator;
import org.jboss.tools.runtime.core.RuntimeCoreActivator;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;