Author: koen.aers(a)jboss.com
Date: 2011-01-24 09:31:52 -0500 (Mon, 24 Jan 2011)
New Revision: 28546
Added:
trunk/forge/plugins/.classpath
trunk/forge/plugins/.project
trunk/forge/plugins/.settings/
trunk/forge/plugins/.settings/org.eclipse.jdt.core.prefs
trunk/forge/plugins/META-INF/
trunk/forge/plugins/META-INF/MANIFEST.MF
trunk/forge/plugins/build.properties
trunk/forge/plugins/icons/
trunk/forge/plugins/icons/start.gif
trunk/forge/plugins/icons/stop.gif
trunk/forge/plugins/lib/
trunk/forge/plugins/lib/activation.jar
trunk/forge/plugins/lib/aether-api.jar
trunk/forge/plugins/lib/aether-impl.jar
trunk/forge/plugins/lib/aether-spi.jar
trunk/forge/plugins/lib/aether-util.jar
trunk/forge/plugins/lib/cal10n-api.jar
trunk/forge/plugins/lib/cdi-api.jar
trunk/forge/plugins/lib/commands.jar
trunk/forge/plugins/lib/common.jar
trunk/forge/plugins/lib/contenttype.jar
trunk/forge/plugins/lib/core.jar
trunk/forge/plugins/lib/el-api.jar
trunk/forge/plugins/lib/el-impl.jar
trunk/forge/plugins/lib/expressions.jar
trunk/forge/plugins/lib/filesystem.jar
trunk/forge/plugins/lib/forge-j2ee-plugins.jar
trunk/forge/plugins/lib/forge-parser-java.jar
trunk/forge/plugins/lib/forge-project-model.jar
trunk/forge/plugins/lib/forge-scaffold.jar
trunk/forge/plugins/lib/forge-shell-api.jar
trunk/forge/plugins/lib/forge-shell.jar
trunk/forge/plugins/lib/guava.jar
trunk/forge/plugins/lib/hibernate-jpa-2.0-api.jar
trunk/forge/plugins/lib/jansi.jar
trunk/forge/plugins/lib/javassist.jar
trunk/forge/plugins/lib/javax.inject.jar
trunk/forge/plugins/lib/jaxrs-api.jar
trunk/forge/plugins/lib/jboss-annotations-api_1.1_spec.jar
trunk/forge/plugins/lib/jboss-connector-api_1.5_spec.jar
trunk/forge/plugins/lib/jboss-ejb-api_3.1_spec.jar
trunk/forge/plugins/lib/jboss-el-api_2.2_spec.jar
trunk/forge/plugins/lib/jboss-interceptor.jar
trunk/forge/plugins/lib/jboss-interceptors-api_1.1_spec.jar
trunk/forge/plugins/lib/jboss-jacc-api_1.4_spec.jar
trunk/forge/plugins/lib/jboss-jad-api_1.2_spec.jar
trunk/forge/plugins/lib/jboss-jaspi-api_1.0_spec.jar
trunk/forge/plugins/lib/jboss-javaee-6.0.pom
trunk/forge/plugins/lib/jboss-jaxb-api_2.2_spec.jar
trunk/forge/plugins/lib/jboss-jaxr-api_1.0_spec.jar
trunk/forge/plugins/lib/jboss-jaxrpc-api_1.1_spec.jar
trunk/forge/plugins/lib/jboss-jaxws-api_2.2_spec.jar
trunk/forge/plugins/lib/jboss-jms-api_1.1_spec.jar
trunk/forge/plugins/lib/jboss-jsp-api_2.2_spec.jar
trunk/forge/plugins/lib/jboss-logging.jar
trunk/forge/plugins/lib/jboss-saaj-api_1.3_spec.jar
trunk/forge/plugins/lib/jboss-servlet-api_3.0_spec.jar
trunk/forge/plugins/lib/jboss-transaction-api_1.1_spec.jar
trunk/forge/plugins/lib/jline.jar
trunk/forge/plugins/lib/jobs.jar
trunk/forge/plugins/lib/jsf-api.jar
trunk/forge/plugins/lib/jsr181-api.jar
trunk/forge/plugins/lib/jsr250-api.jar
trunk/forge/plugins/lib/jstl.jar
trunk/forge/plugins/lib/jta.jar
trunk/forge/plugins/lib/log4j.jar
trunk/forge/plugins/lib/mail.jar
trunk/forge/plugins/lib/maven-aether-provider.jar
trunk/forge/plugins/lib/maven-artifact.jar
trunk/forge/plugins/lib/maven-compat.jar
trunk/forge/plugins/lib/maven-core.jar
trunk/forge/plugins/lib/maven-model-builder.jar
trunk/forge/plugins/lib/maven-model.jar
trunk/forge/plugins/lib/maven-plugin-api.jar
trunk/forge/plugins/lib/maven-repository-metadata.jar
trunk/forge/plugins/lib/maven-settings-builder.jar
trunk/forge/plugins/lib/maven-settings.jar
trunk/forge/plugins/lib/metawidget.jar
trunk/forge/plugins/lib/mvel2.jar
trunk/forge/plugins/lib/osgi.jar
trunk/forge/plugins/lib/plexus-cipher.jar
trunk/forge/plugins/lib/plexus-classworlds.jar
trunk/forge/plugins/lib/plexus-component-annotations.jar
trunk/forge/plugins/lib/plexus-interpolation.jar
trunk/forge/plugins/lib/plexus-sec-dispatcher.jar
trunk/forge/plugins/lib/plexus-utils.jar
trunk/forge/plugins/lib/preferences.jar
trunk/forge/plugins/lib/registry.jar
trunk/forge/plugins/lib/resources.jar
trunk/forge/plugins/lib/runtime.jar
trunk/forge/plugins/lib/seam-render.jar
trunk/forge/plugins/lib/shrinkwrap-descriptors-api.jar
trunk/forge/plugins/lib/sisu-guice-noaop.jar
trunk/forge/plugins/lib/sisu-inject-bean.jar
trunk/forge/plugins/lib/sisu-inject-plexus.jar
trunk/forge/plugins/lib/slf4j-api.jar
trunk/forge/plugins/lib/slf4j-ext.jar
trunk/forge/plugins/lib/slf4j-log4j12.jar
trunk/forge/plugins/lib/stax-api.jar
trunk/forge/plugins/lib/text.jar
trunk/forge/plugins/lib/validation-api.jar
trunk/forge/plugins/lib/wagon-provider-api.jar
trunk/forge/plugins/lib/weld-api.jar
trunk/forge/plugins/lib/weld-core.jar
trunk/forge/plugins/lib/weld-extensions.jar
trunk/forge/plugins/lib/weld-se-core.jar
trunk/forge/plugins/lib/weld-spi.jar
trunk/forge/plugins/plugin.xml
trunk/forge/plugins/src/
trunk/forge/plugins/src/org/
trunk/forge/plugins/src/org/jboss/
trunk/forge/plugins/src/org/jboss/tools/
trunk/forge/plugins/src/org/jboss/tools/seam/
trunk/forge/plugins/src/org/jboss/tools/seam/forge/
trunk/forge/plugins/src/org/jboss/tools/seam/forge/Activator.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/ConsoleTerminateAction.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StartDelegate.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StopDelegate.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/runtime/
trunk/forge/plugins/src/org/jboss/tools/seam/forge/runtime/Manager.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/Console.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleLineNotifier.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsolePage.java
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleView.java
Log:
initial upload of forge plugin
Added: trunk/forge/plugins/.classpath
===================================================================
--- trunk/forge/plugins/.classpath (rev 0)
+++ trunk/forge/plugins/.classpath 2011-01-24 14:31:52 UTC (rev 28546)
@@ -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>
Property changes on: trunk/forge/plugins/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/.project
===================================================================
--- trunk/forge/plugins/.project (rev 0)
+++ trunk/forge/plugins/.project 2011-01-24 14:31:52 UTC (rev 28546)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.seam.forge</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/forge/plugins/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/forge/plugins/.settings/org.eclipse.jdt.core.prefs (rev
0)
+++ trunk/forge/plugins/.settings/org.eclipse.jdt.core.prefs 2011-01-24 14:31:52 UTC (rev
28546)
@@ -0,0 +1,8 @@
+#Fri Jan 07 16:05:07 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/forge/plugins/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/META-INF/MANIFEST.MF (rev 0)
+++ trunk/forge/plugins/META-INF/MANIFEST.MF 2011-01-24 14:31:52 UTC (rev 28546)
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Forge Tools
+Bundle-SymbolicName: org.jboss.tools.seam.forge;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.console;bundle-version="3.5.0",
+ org.eclipse.jface.text;bundle-version="3.6.1",
+ org.eclipse.debug.ui;bundle-version="3.6.1",
+ org.eclipse.jdt.launching;bundle-version="3.5.100",
+ org.eclipse.core.variables;bundle-version="3.2.400",
+ org.eclipse.ui.editors;bundle-version="3.6.1",
+ org.eclipse.ui.ide;bundle-version="3.6.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.jboss.tools.seam.forge.Activator
Property changes on: trunk/forge/plugins/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/build.properties
===================================================================
--- trunk/forge/plugins/build.properties (rev 0)
+++ trunk/forge/plugins/build.properties 2011-01-24 14:31:52 UTC (rev 28546)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ plugin.xml,\
+ bin/,\
+ lib/
Property changes on: trunk/forge/plugins/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/icons/start.gif
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/icons/start.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/icons/stop.gif
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/icons/stop.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/activation.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/activation.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/aether-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/aether-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/aether-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/aether-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/aether-spi.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/aether-spi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/aether-util.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/aether-util.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/cal10n-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/cal10n-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/cdi-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/cdi-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/commands.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/commands.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/common.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/common.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/contenttype.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/contenttype.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/core.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/el-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/el-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/el-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/el-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/expressions.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/expressions.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/filesystem.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/filesystem.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/forge-j2ee-plugins.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/forge-j2ee-plugins.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/forge-parser-java.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/forge-parser-java.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/forge-project-model.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/forge-project-model.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/forge-scaffold.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/forge-scaffold.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/forge-shell-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/forge-shell-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/forge-shell.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/forge-shell.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/guava.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/guava.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/hibernate-jpa-2.0-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/hibernate-jpa-2.0-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jansi.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jansi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/javassist.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/javassist.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/javax.inject.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/javax.inject.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jaxrs-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jaxrs-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-annotations-api_1.1_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-annotations-api_1.1_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-connector-api_1.5_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-connector-api_1.5_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-ejb-api_3.1_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-ejb-api_3.1_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-el-api_2.2_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-el-api_2.2_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-interceptor.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-interceptor.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-interceptors-api_1.1_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-interceptors-api_1.1_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jacc-api_1.4_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jacc-api_1.4_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jad-api_1.2_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jad-api_1.2_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jaspi-api_1.0_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jaspi-api_1.0_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-javaee-6.0.pom
===================================================================
--- trunk/forge/plugins/lib/jboss-javaee-6.0.pom (rev 0)
+++ trunk/forge/plugins/lib/jboss-javaee-6.0.pom 2011-01-24 14:31:52 UTC (rev 28546)
@@ -0,0 +1,176 @@
+<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/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-specs-parent</artifactId>
+ <version>1.0.0.Beta2</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-javaee-6.0</artifactId>
+ <version>1.0.0.CR1</version>
+ <packaging>pom</packaging>
+ <name>JBoss Java EE 6.0 API Aggregate</name>
+ <description>Java EE 6.0 APIs for use with JBoss AS 6</description>
+
+ <!-- Properties -->
+ <properties>
+ <version.jboss.javaee6.bom>1.0.0.CR1</version.jboss.javaee6.bom>
+ </properties>
+
+ <scm>
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/spe...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projec...
+
<
url>http://fisheye.jboss.org/browse/JBossAS/projects/specs/tags/jboss-...
+ </scm>
+
+ <!-- This repository declaration exists so that Maven 2.2.x clients will download
the Spec BOM. -->
+ <!-- If you do not include it, projects consuming this artifact and built in Maven
3.x will build correctly, -->
+ <!-- but will throw an error if built with 2.2.x. If your project has the
jboss-public-repository as one of it's -->
+ <!-- declared repositories and consumes this spec jar, it will download the spec
artifact correctly, -->
+ <!-- but won't find the org.jboss.spec:jboss-javaee6-specs-bom artifact.
-->
+ <!-- This declaration can be removed once all the spec POM's dependencies are
in the Maven Central Repo. -->
+ <!-- Since the spec POM is consumed by end-users via the archetypes, it needs to be
work with projects built under Maven 2.x. -->
+ <repositories>
+ <repository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <
url>https://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>daily</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee6-specs-bom</artifactId>
+ <version>${version.jboss.javaee6.bom}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.spec.javax.annotation</groupId>
+ <artifactId>jboss-annotations-api_1.1_spec</artifactId>
+ </dependency>
+ <!-- JavaEE 6 requires Connector API 1.6 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.resource</groupId>
+ <artifactId>jboss-connector-api_1.5_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.ejb</groupId>
+ <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.el</groupId>
+ <artifactId>jboss-el-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.interceptor</groupId>
+ <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.security.jacc</groupId>
+ <artifactId>jboss-jacc-api_1.4_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.enterprise.deploy</groupId>
+ <artifactId>jboss-jad-api_1.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.security.auth.message</groupId>
+ <artifactId>jboss-jaspi-api_1.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.registry</groupId>
+ <artifactId>jboss-jaxr-api_1.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.jms</groupId>
+ <artifactId>jboss-jms-api_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.servlet.jsp</groupId>
+ <artifactId>jboss-jsp-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.servlet</groupId>
+ <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.transaction</groupId>
+ <artifactId>jboss-transaction-api_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.bind</groupId>
+ <artifactId>jboss-jaxb-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.rpc</groupId>
+ <artifactId>jboss-jaxrpc-api_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.soap</groupId>
+ <artifactId>jboss-saaj-api_1.3_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.ws</groupId>
+ <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.jws</groupId>
+ <artifactId>jsr181-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>jaxrs-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Added: trunk/forge/plugins/lib/jboss-jaxb-api_2.2_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jaxb-api_2.2_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jaxr-api_1.0_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jaxr-api_1.0_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jaxrpc-api_1.1_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jaxrpc-api_1.1_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jaxws-api_2.2_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jaxws-api_2.2_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jms-api_1.1_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jms-api_1.1_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-jsp-api_2.2_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-jsp-api_2.2_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-logging.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-logging.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-saaj-api_1.3_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-saaj-api_1.3_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-servlet-api_3.0_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-servlet-api_3.0_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jboss-transaction-api_1.1_spec.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jboss-transaction-api_1.1_spec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jline.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jline.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jobs.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jobs.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jsr181-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jsr181-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jsr250-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jsr250-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jstl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jstl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/jta.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/jta.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/log4j.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/log4j.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/mail.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/mail.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-aether-provider.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-aether-provider.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-artifact.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-artifact.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-compat.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-compat.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-core.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-model-builder.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-model-builder.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-model.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-model.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-plugin-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-plugin-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-repository-metadata.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-repository-metadata.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-settings-builder.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-settings-builder.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/maven-settings.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/maven-settings.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/metawidget.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/metawidget.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/mvel2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/mvel2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/osgi.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/osgi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/plexus-cipher.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/plexus-cipher.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/plexus-classworlds.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/plexus-classworlds.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/plexus-component-annotations.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/plexus-component-annotations.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/plexus-interpolation.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/plexus-interpolation.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/plexus-sec-dispatcher.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/plexus-sec-dispatcher.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/plexus-utils.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/plexus-utils.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/preferences.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/preferences.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/registry.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/registry.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/resources.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/resources.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/runtime.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/runtime.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/seam-render.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/seam-render.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/shrinkwrap-descriptors-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/shrinkwrap-descriptors-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/sisu-guice-noaop.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/sisu-guice-noaop.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/sisu-inject-bean.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/sisu-inject-bean.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/sisu-inject-plexus.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/sisu-inject-plexus.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/slf4j-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/slf4j-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/slf4j-ext.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/slf4j-ext.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/slf4j-log4j12.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/slf4j-log4j12.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/stax-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/stax-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/text.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/text.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/validation-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/validation-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/wagon-provider-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/wagon-provider-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/weld-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/weld-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/weld-core.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/weld-core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/weld-extensions.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/weld-extensions.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/weld-se-core.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/weld-se-core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/lib/weld-spi.jar
===================================================================
(Binary files differ)
Property changes on: trunk/forge/plugins/lib/weld-spi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/forge/plugins/plugin.xml
===================================================================
--- trunk/forge/plugins/plugin.xml (rev 0)
+++ trunk/forge/plugins/plugin.xml 2011-01-24 14:31:52 UTC (rev 28546)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ id="org.jboss.tools.seam.forge"
+ name="Seam Forge">
+ </category>
+ <view
+ category="org.jboss.tools.seam.forge"
+ class="org.jboss.tools.seam.forge.view.ConsoleView"
+ id="org.jboss.tools.seam.forge.console"
+ name="Forge Console"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.viewActions">
+ <viewContribution
+ id="org.jboss.tools.seam.forge.view"
+ targetID="org.jboss.tools.seam.forge.console">
+ <menu
+ id="org.jboss.tools.seam.forge.menubar"
+ label="Seam Forge">
+ </menu>
+ <action
+ class="org.jboss.tools.seam.forge.action.StopDelegate"
+ icon="icons/stop.gif"
+ id="org.jboss.tools.seam.forge.stop"
+ label="Stop Forge"
+ menubarPath="org.jboss.tools.seam.forge.menubar"
+ style="push"
+ toolbarPath="org.jboss.tools.seam.forge.toolbar">
+ </action>
+ <action
+ class="org.jboss.tools.seam.forge.action.StartDelegate"
+ icon="icons/start.gif"
+ id="org.jboss.tools.seam.forge.start"
+ label="Start Forge"
+ menubarPath="org.jboss.tools.seam.forge.menu"
+ style="push"
+ toolbarPath="org.jboss.tools.seam.forge.toolbar">
+ </action>
+ </viewContribution>
+ </extension>
+
+</plugin>
Property changes on: trunk/forge/plugins/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/Activator.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/Activator.java
(rev 0)
+++ trunk/forge/plugins/src/org/jboss/tools/seam/forge/Activator.java 2011-01-24 14:31:52
UTC (rev 28546)
@@ -0,0 +1,54 @@
+package org.jboss.tools.seam.forge;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.seam.forge.runtime.Manager;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.seam.forge";
//$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (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 {
+ if (Manager.INSTANCE.isForgeRunning()) {
+ Manager.INSTANCE.stopForge();
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/forge/plugins/src/org/jboss/tools/seam/forge/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/ConsoleTerminateAction.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/ConsoleTerminateAction.java
(rev 0)
+++
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/ConsoleTerminateAction.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,97 @@
+package org.jboss.tools.seam.forge.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.commands.ITerminateHandler;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.commands.actions.DebugCommandService;
+import org.eclipse.debug.internal.ui.views.console.ConsoleMessages;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.IUpdate;
+import org.jboss.tools.seam.forge.view.Console;
+
+/**
+ * ConsoleTerminateAction
+ */
+public class ConsoleTerminateAction extends Action implements IUpdate {
+
+ private Console fConsole;
+ private IWorkbenchWindow fWindow;
+
+ /**
+ * Creates a terminate action for the console
+ */
+ public ConsoleTerminateAction(IWorkbenchWindow window, Console console) {
+ super(ConsoleMessages.ConsoleTerminateAction_0);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
IDebugHelpContextIds.CONSOLE_TERMINATE_ACTION);
+ fConsole = console;
+ fWindow = window;
+ setToolTipText(ConsoleMessages.ConsoleTerminateAction_1);
+ setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_TERMINATE));
+ setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE));
+ setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_TERMINATE));
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
IDebugHelpContextIds.CONSOLE_TERMINATE_ACTION);
+ update();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.IUpdate#update()
+ */
+ public void update() {
+ IProcess process = fConsole.getProcess();
+ setEnabled(process.canTerminate());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ IProcess process = fConsole.getProcess();
+ List targets = collectTargets(process);
+ targets.add(process);
+ DebugCommandService service = DebugCommandService.getService(fWindow);
+ service.executeCommand(ITerminateHandler.class, targets.toArray(), null);
+ }
+
+ /**
+ * Collects targets associated with a process.
+ *
+ * @param process
+ * @return associated targets
+ */
+ private List collectTargets(IProcess process) {
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunch[] launches = launchManager.getLaunches();
+ List targets = new ArrayList();
+ for (int i = 0; i < launches.length; i++) {
+ ILaunch launch = launches[i];
+ IProcess[] processes = launch.getProcesses();
+ for (int j = 0; j < processes.length; j++) {
+ IProcess process2 = processes[j];
+ if (process2.equals(process)) {
+ IDebugTarget[] debugTargets = launch.getDebugTargets();
+ for (int k = 0; k < debugTargets.length; k++) {
+ targets.add(debugTargets[k]);
+ }
+ return targets; // all possible targets have been terminated for the
launch.
+ }
+ }
+ }
+ return targets;
+ }
+
+ public void dispose() {
+ fConsole = null;
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/ConsoleTerminateAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StartDelegate.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StartDelegate.java
(rev 0)
+++
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StartDelegate.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,28 @@
+package org.jboss.tools.seam.forge.action;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.jboss.tools.seam.forge.runtime.Manager;
+
+public class StartDelegate implements IViewActionDelegate {
+
+ @Override
+ public void run(IAction action) {
+ Manager.INSTANCE.startForge();
+ }
+
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void init(IViewPart view) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StartDelegate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StopDelegate.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StopDelegate.java
(rev 0)
+++ trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StopDelegate.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,28 @@
+package org.jboss.tools.seam.forge.action;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.jboss.tools.seam.forge.runtime.Manager;
+
+public class StopDelegate implements IViewActionDelegate {
+
+ @Override
+ public void run(IAction action) {
+ Manager.INSTANCE.stopForge();
+ }
+
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void init(IViewPart view) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/action/StopDelegate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/runtime/Manager.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/runtime/Manager.java
(rev 0)
+++ trunk/forge/plugins/src/org/jboss/tools/seam/forge/runtime/Manager.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,217 @@
+package org.jboss.tools.seam.forge.runtime;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.internal.jobs.JobManager;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.seam.forge.Activator;
+import org.osgi.framework.Bundle;
+
+public class Manager implements IDebugEventSetListener {
+
+ public static final Manager INSTANCE = new Manager();
+ public static final String STATE_NOT_RUNNING =
"org.jboss.tools.seam.forge.notRunning";
+ public static final String STATE_RUNNING =
"org.jboss.tools.seam.forge.running";
+ public static final String STATE_STARTING =
"org.jboss.tools.seam.forge.starting";
+ public static final String STATE_STOPPING =
"org.jboss.tools.seam.forge.stopping";
+
+ private IProcess forgeProcess = null;
+ private String runtimeState = STATE_NOT_RUNNING;
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ private Manager() {}
+
+ public boolean isForgeRunning() {
+ return forgeProcess != null && !forgeProcess.isTerminated();
+ }
+
+ public void startForge() {
+ try {
+ if (!isForgeRunning()) {
+ setRuntimeState(STATE_STARTING);
+ ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType type =
manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
+ ILaunchConfiguration[] configurations = manager.getLaunchConfigurations(type);
+ for (int i = 0; i < configurations.length; i++) {
+ ILaunchConfiguration configuration = configurations[i];
+ if (configuration.getName().equals("Seam Forge")) {
+ configuration.delete();
+ break;
+ }
+ }
+ ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, "Seam
Forge");
+ workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
"org.jboss.seam.forge.shell.Bootstrap");
+ List<String> classpath = new ArrayList<String>();
+ Bundle bundle = Platform.getBundle("org.jboss.tools.seam.forge");
+ File file = null;
+ try {
+ file = FileLocator.getBundleFile(bundle);
+ } catch (IOException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ if (file == null) return;
+ File[] children = file.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.endsWith("lib");
+ }
+ });
+ if (children.length != 1) return;
+ File forgeLibDir = children[0];
+
+ File[] forgeLibFiles = forgeLibDir.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.endsWith("jar");
+ }
+ });
+ for (File libFile: forgeLibFiles) {
+ IRuntimeClasspathEntry entry = JavaRuntime.newArchiveRuntimeClasspathEntry(new
Path(libFile.getAbsolutePath()));
+ entry.setClasspathProperty(IRuntimeClasspathEntry.USER_CLASSES);
+ classpath.add(entry.getMemento());
+ }
+ IPath systemLibsPath = new Path(JavaRuntime.JRE_CONTAINER);
+ IRuntimeClasspathEntry systemLibsEntry =
JavaRuntime.newRuntimeContainerClasspathEntry(
+ systemLibsPath,
+ IRuntimeClasspathEntry.STANDARD_CLASSES);
+ classpath.add(systemLibsEntry.getMemento());
+ workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH,
classpath);
+ workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
false);
+// workingCopy.setAttribute(
+// IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
+// "-Dforge.home=/Users/koen/Downloads/forge-1.0.0.Alpha1 "); // +
+// "-Dseam.forge.shell.colorEnabled=true" );
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRoot root = workspace.getRoot();
+ IPath path = root.getLocation();
+ File workingDir = path.toFile();
+ workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
workingDir.getAbsolutePath());
+ ILaunchConfiguration configuration = workingCopy.doSave();
+ ILaunch launch = configuration.launch(ILaunchManager.RUN_MODE, null, false, false);
+ IProcess[] processes = launch.getProcesses();
+ if (processes.length == 1) {
+ forgeProcess = processes[0];
+ }
+ DebugPlugin.getDefault().addDebugEventListener(this);
+ setRuntimeState(STATE_RUNNING);
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void stopForge() {
+ if (isForgeRunning()) {
+ setRuntimeState(STATE_STOPPING);
+ try {
+ forgeProcess.terminate();
+ } catch (DebugException e) {
+ e.printStackTrace();
+ }
+ setRuntimeState(STATE_NOT_RUNNING);
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+ }
+ }
+
+ public void setRuntimeState(String newRuntimeState) {
+ String oldRuntimeState = this.runtimeState;
+ this.runtimeState = newRuntimeState;
+ propertyChangeSupport.firePropertyChange(
+ new PropertyChangeEvent(
+ this,
+ "runtimeState",
+ oldRuntimeState,
+ newRuntimeState));
+ }
+
+ public String getRuntimeState() {
+ return runtimeState;
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ propertyChangeSupport.addPropertyChangeListener("runtimeState", listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ propertyChangeSupport.removePropertyChangeListener("runtimeState",
listener);
+ }
+
+ private IStatus createStatus(String message) {
+ return new Status(
+ IStatus.INFO,
+ Activator.getDefault().getBundle().getSymbolicName(),
+ IStatus.OK,
+ message,
+ null);
+ }
+
+ private void log(String message) {
+ Activator.getDefault().getLog().log(createStatus(message));
+ }
+
+ protected void finalize() throws Throwable {
+ if (forgeProcess != null) {
+ if (!forgeProcess.isTerminated()) {
+ forgeProcess.terminate();
+ }
+ forgeProcess = null;
+ }
+ super.finalize();
+ }
+
+ public IProcess getProcess() {
+ return forgeProcess;
+ }
+
+ @Override
+ public void handleDebugEvents(DebugEvent[] events) {
+ for (int i = 0; i < events.length; i++) {
+ DebugEvent event = events[i];
+ if (event.getSource().equals(getProcess())) {
+ if (event.getKind() == DebugEvent.TERMINATE) {
+ if (forgeProcess.isTerminated()) {
+ DebugPlugin.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ setRuntimeState(STATE_NOT_RUNNING);
+ }
+ });
+ }
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+ }
+ }
+ }
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/runtime/Manager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/Console.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/Console.java
(rev 0)
+++ trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/Console.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,823 @@
+package org.jboss.tools.seam.forge.view;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.internal.jobs.JobManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+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.PlatformObject;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.IStreamListener;
+import org.eclipse.debug.core.model.IFlushableStreamMonitor;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStreamMonitor;
+import org.eclipse.debug.core.model.IStreamsProxy;
+import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
+import org.eclipse.debug.internal.ui.views.console.ConsoleMessages;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.console.IConsole;
+import org.eclipse.debug.ui.console.IConsoleColorProvider;
+import org.eclipse.debug.ui.console.IConsoleHyperlink;
+import org.eclipse.debug.ui.console.IConsoleLineTracker;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IHyperlink;
+import org.eclipse.ui.console.IOConsole;
+import org.eclipse.ui.console.IOConsoleInputStream;
+import org.eclipse.ui.console.IOConsoleOutputStream;
+import org.eclipse.ui.console.IPatternMatchListener;
+import org.eclipse.ui.console.PatternMatchEvent;
+import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * A console for a system process with standard I/O streams.
+ *
+ * @since 3.0
+ */
+public class Console extends IOConsole implements IConsole, IDebugEventSetListener,
IPropertyChangeListener {
+ private IProcess fProcess = null;
+
+ private List fStreamListeners = new ArrayList();
+
+ private IConsoleColorProvider fColorProvider;
+
+ private IOConsoleInputStream fInput;
+
+ private FileOutputStream fFileOutputStream;
+
+ private boolean fAllocateConsole = true;
+
+ private boolean fStreamsClosed = false;
+
+ private InputReadJob inputReadJob;
+
+ /**
+ * Proxy to a console document
+ */
+ public Console(IProcess process, IConsoleColorProvider colorProvider) {
+ this(process, colorProvider, null);
+ }
+
+ /**
+ * Constructor
+ * @param process the process to associate with this console
+ * @param colorProvider the colour provider for this console
+ * @param encoding the desired encoding for this console
+ */
+ public Console(IProcess process, IConsoleColorProvider colorProvider, String
encoding) {
+ super(IInternalDebugCoreConstants.EMPTY_STRING,
IDebugUIConstants.ID_PROCESS_CONSOLE_TYPE, null, encoding, true);
+ fProcess = process;
+
+ ILaunchConfiguration configuration =
process.getLaunch().getLaunchConfiguration();
+ String file = null;
+ boolean append = false;
+ if (configuration != null) {
+ try {
+ file = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE,
(String) null);
+ if (file != null) {
+ IStringVariableManager stringVariableManager =
VariablesPlugin.getDefault().getStringVariableManager();
+ file = stringVariableManager.performStringSubstitution(file);
+ append =
configuration.getAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, false);
+ }
+ } catch (CoreException e) {
+ }
+ }
+
+ if (file != null && configuration != null) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRoot root = workspace.getRoot();
+ Path path = new Path(file);
+ IFile ifile = root.getFileForLocation(path);
+ String message = null;
+
+ try {
+ String fileLoc = null;
+ if (ifile != null) {
+ if (append && ifile.exists()) {
+ ifile.appendContents(new ByteArrayInputStream(new byte[0]), true,
true, new NullProgressMonitor());
+ } else {
+ if (ifile.exists()) {
+ ifile.delete(true, new NullProgressMonitor());
+ }
+ ifile.create(new ByteArrayInputStream(new byte[0]), true, new
NullProgressMonitor());
+ }
+ }
+
+ File outputFile = new File(file);
+ fFileOutputStream = new FileOutputStream(outputFile, append);
+ fileLoc = outputFile.getAbsolutePath();
+
+ message = MessageFormat.format(ConsoleMessages.ProcessConsole_1, new
String[] {fileLoc});
+ addPatternMatchListener(new ConsoleLogFilePatternMatcher(fileLoc));
+ } catch (FileNotFoundException e) {
+ message = MessageFormat.format(ConsoleMessages.ProcessConsole_2, new
String[] {file});
+ } catch (CoreException e) {
+ DebugUIPlugin.log(e);
+ }
+ if (message != null) {
+ try {
+ IOConsoleOutputStream stream = newOutputStream();
+ stream.write(message);
+ stream.close();
+ } catch (IOException e) {
+ DebugUIPlugin.log(e);
+ }
+ }
+ try {
+ fAllocateConsole =
configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, true);
+ } catch (CoreException e) {
+ }
+ }
+
+ fColorProvider = colorProvider;
+ fInput = getInputStream();
+ colorProvider.connect(fProcess, this);
+
+ setName(computeName());
+
+ Color color =
fColorProvider.getColor(IDebugUIConstants.ID_STANDARD_INPUT_STREAM);
+ fInput.setColor(color);
+
+ IConsoleLineTracker[] lineTrackers =
DebugUIPlugin.getDefault().getProcessConsoleManager().getLineTrackers(process);
+ if (lineTrackers.length > 0) {
+ addPatternMatchListener(new ConsoleLineNotifier());
+ }
+ }
+
+ /**
+ * Computes and returns the image descriptor for this console.
+ *
+ * @return an image descriptor for this console or <code>null</code>
+ */
+ protected ImageDescriptor computeImageDescriptor() {
+ ILaunchConfiguration configuration =
getProcess().getLaunch().getLaunchConfiguration();
+ if (configuration != null) {
+ ILaunchConfigurationType type;
+ try {
+ type = configuration.getType();
+ return DebugPluginImages.getImageDescriptor(type.getIdentifier());
+ } catch (CoreException e) {
+ DebugUIPlugin.log(e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Computes and returns the current name of this console.
+ *
+ * @return a name for this console
+ */
+ protected String computeName() {
+ String label = null;
+ IProcess process = getProcess();
+ ILaunchConfiguration config = process.getLaunch().getLaunchConfiguration();
+
+ label = process.getAttribute(IProcess.ATTR_PROCESS_LABEL);
+ if (label == null) {
+ if (config == null) {
+ label = process.getLabel();
+ } else {
+ // check if PRIVATE config
+ if (DebugUITools.isPrivate(config)) {
+ label = process.getLabel();
+ } else {
+ String type = null;
+ try {
+ type = config.getType().getName();
+ } catch (CoreException e) {
+ }
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(config.getName());
+ if (type != null) {
+ buffer.append(" ["); //$NON-NLS-1$
+ buffer.append(type);
+ buffer.append("] "); //$NON-NLS-1$
+ }
+ buffer.append(process.getLabel());
+ label = buffer.toString();
+ }
+ }
+ }
+
+ if (process.isTerminated()) {
+ return MessageFormat.format(ConsoleMessages.ProcessConsole_0, new String[] {
label });
+ }
+ return label;
+ }
+
+ /**
+ * @see
org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent evt) {
+ String property = evt.getProperty();
+ IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
+ if (property.equals(IDebugPreferenceConstants.CONSOLE_WRAP) ||
property.equals(IDebugPreferenceConstants.CONSOLE_WIDTH)) {
+ boolean fixedWidth =
store.getBoolean(IDebugPreferenceConstants.CONSOLE_WRAP);
+ if (fixedWidth) {
+ int width = store.getInt(IDebugPreferenceConstants.CONSOLE_WIDTH);
+ setConsoleWidth(width);
+ } else {
+ setConsoleWidth(-1);
+ }
+ } else if
(property.equals(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT) ||
property.equals(IDebugPreferenceConstants.CONSOLE_HIGH_WATER_MARK) ||
property.equals(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK)) {
+ boolean limitBufferSize =
store.getBoolean(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT);
+ if (limitBufferSize) {
+ int highWater =
store.getInt(IDebugPreferenceConstants.CONSOLE_HIGH_WATER_MARK);
+ int lowWater =
store.getInt(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK);
+ if (highWater > lowWater) {
+ setWaterMarks(lowWater, highWater);
+ }
+ } else {
+ setWaterMarks(-1, -1);
+ }
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH)) {
+ int tabWidth = store.getInt(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH);
+ setTabWidth(tabWidth);
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT)) {
+ boolean activateOnOut =
store.getBoolean(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT);
+ IOConsoleOutputStream stream =
getStream(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM);
+ if (stream != null) {
+// stream.setActivateOnWrite(activateOnOut);
+ }
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR)) {
+ boolean activateOnErr =
store.getBoolean(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR);
+ IOConsoleOutputStream stream =
getStream(IDebugUIConstants.ID_STANDARD_ERROR_STREAM);
+ if (stream != null) {
+// stream.setActivateOnWrite(activateOnErr);
+ }
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_SYS_OUT_COLOR)) {
+ IOConsoleOutputStream stream =
getStream(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM);
+ if (stream != null) {
+
stream.setColor(fColorProvider.getColor(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM));
+ }
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_SYS_ERR_COLOR)) {
+ IOConsoleOutputStream stream =
getStream(IDebugUIConstants.ID_STANDARD_ERROR_STREAM);
+ if (stream != null) {
+
stream.setColor(fColorProvider.getColor(IDebugUIConstants.ID_STANDARD_ERROR_STREAM));
+ }
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_SYS_IN_COLOR)) {
+ if (fInput != null) {
+
fInput.setColor(fColorProvider.getColor(IDebugUIConstants.ID_STANDARD_INPUT_STREAM));
+ }
+ } else if (property.equals(IDebugUIConstants.PREF_CONSOLE_FONT)) {
+ setFont(JFaceResources.getFont(IDebugUIConstants.PREF_CONSOLE_FONT));
+ } else if (property.equals(IDebugPreferenceConstants.CONSOLE_BAKGROUND_COLOR)) {
+
setBackground(DebugUIPlugin.getPreferenceColor(IDebugPreferenceConstants.CONSOLE_BAKGROUND_COLOR));
+ }
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.console.IConsole#getStream(java.lang.String)
+ */
+ public IOConsoleOutputStream getStream(String streamIdentifier) {
+ for (Iterator i = fStreamListeners.iterator(); i.hasNext();) {
+ StreamListener listener = (StreamListener) i.next();
+ if (listener.fStreamId.equals(streamIdentifier)) {
+ return listener.fStream;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.console.IConsole#getProcess()
+ */
+ public IProcess getProcess() {
+ return fProcess;
+ }
+
+ /**
+ * @see org.eclipse.ui.console.IOConsole#dispose()
+ */
+ protected void dispose() {
+ super.dispose();
+ fColorProvider.disconnect();
+ closeStreams();
+ disposeStreams();
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+
DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
+ JFaceResources.getFontRegistry().removeListener(this);
+ }
+
+ /**
+ * cleanup method to clsoe all of the open stream to this console
+ */
+ public synchronized void closeStreams() {
+ if (fStreamsClosed) {
+ return;
+ }
+ for (Iterator i = fStreamListeners.iterator(); i.hasNext();) {
+ StreamListener listener = (StreamListener) i.next();
+ listener.closeStream();
+ }
+ if (fFileOutputStream != null) {
+ synchronized (fFileOutputStream) {
+ try {
+ fFileOutputStream.flush();
+ fFileOutputStream.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ try {
+ fInput.close();
+ } catch (IOException e) {
+ }
+ fStreamsClosed = true;
+ }
+
+ /**
+ * disposes ofthe listeners for each of the stream associated with this console
+ */
+ private synchronized void disposeStreams() {
+ for (Iterator i = fStreamListeners.iterator(); i.hasNext();) {
+ StreamListener listener = (StreamListener) i.next();
+ listener.dispose();
+ }
+ fFileOutputStream = null;
+ fInput = null;
+ }
+
+ /**
+ * @see org.eclipse.ui.console.AbstractConsole#init()
+ */
+ protected void init() {
+ super.init();
+ if (fProcess.isTerminated()) {
+ closeStreams();
+ resetName();
+ } else {
+ DebugPlugin.getDefault().addDebugEventListener(this);
+ }
+ IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
+ store.addPropertyChangeListener(this);
+ JFaceResources.getFontRegistry().addListener(this);
+ if (store.getBoolean(IDebugPreferenceConstants.CONSOLE_WRAP)) {
+ setConsoleWidth(store.getInt(IDebugPreferenceConstants.CONSOLE_WIDTH));
+ }
+ setTabWidth(store.getInt(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH));
+
+ if (store.getBoolean(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT)) {
+ int highWater =
store.getInt(IDebugPreferenceConstants.CONSOLE_HIGH_WATER_MARK);
+ int lowWater =
store.getInt(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK);
+ setWaterMarks(lowWater, highWater);
+ }
+
+ DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ public void run() {
+ setFont(JFaceResources.getFont(IDebugUIConstants.PREF_CONSOLE_FONT));
+
setBackground(DebugUIPlugin.getPreferenceColor(IDebugPreferenceConstants.CONSOLE_BAKGROUND_COLOR));
+ }
+ });
+ }
+
+ /**
+ * Notify listeners when name changes.
+ *
+ * @see
org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
+ */
+ public void handleDebugEvents(DebugEvent[] events) {
+ for (int i = 0; i < events.length; i++) {
+ DebugEvent event = events[i];
+ if (event.getSource().equals(getProcess())) {
+ if (event.getKind() == DebugEvent.TERMINATE) {
+ closeStreams();
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+ }
+ resetName();
+ }
+ }
+ }
+
+ /**
+ * resets the name of this console to the original computed name
+ */
+ private void resetName() {
+ final String newName = computeName();
+ String name = getName();
+ if (!name.equals(newName)) {
+ UIJob job = new UIJob("Update console title") { //$NON-NLS-1$
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ Console.this.setName(newName);
+ warnOfContentChange();
+ return Status.OK_STATUS;
+ }
+ };
+ job.setSystem(true);
+ job.schedule();
+ }
+ }
+
+ /**
+ * send notification of a change of content in this console
+ */
+ private void warnOfContentChange() {
+
ConsolePlugin.getDefault().getConsoleManager().warnOfContentChange(DebugUITools.getConsole(fProcess));
+ }
+
+ /**
+ * @see
org.eclipse.debug.ui.console.IConsole#connect(org.eclipse.debug.core.model.IStreamsProxy)
+ */
+ public void connect(IStreamsProxy streamsProxy) {
+ IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
+ IStreamMonitor streamMonitor = streamsProxy.getErrorStreamMonitor();
+ if (streamMonitor != null) {
+ connect(streamMonitor, IDebugUIConstants.ID_STANDARD_ERROR_STREAM,
+ store.getBoolean(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR));
+ }
+ streamMonitor = streamsProxy.getOutputStreamMonitor();
+ if (streamMonitor != null) {
+ connect(streamMonitor, IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM,
+ store.getBoolean(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT));
+ }
+ if (inputReadJob == null) {
+ inputReadJob = new InputReadJob(streamsProxy);
+ }
+ inputReadJob.setSystem(true);
+ inputReadJob.schedule();
+// InputReadJob readJob = new InputReadJob(streamsProxy);
+// readJob.setSystem(true);
+// readJob.schedule();
+ }
+
+ public Job getInputReadJob() {
+ return inputReadJob;
+ }
+
+ /**
+ * @see
org.eclipse.debug.ui.console.IConsole#connect(org.eclipse.debug.core.model.IStreamMonitor,
java.lang.String)
+ */
+ public void connect(IStreamMonitor streamMonitor, String streamIdentifier) {
+ connect(streamMonitor, streamIdentifier, false);
+ }
+
+ /**
+ * Connects the given stream monitor to a new output stream with the given
identifier.
+ *
+ * @param streamMonitor stream monitor
+ * @param streamIdentifier stream identifier
+ * @param activateOnWrite whether the stream should displayed when written to
+ */
+ private void connect(IStreamMonitor streamMonitor, String streamIdentifier, boolean
activateOnWrite) {
+ IOConsoleOutputStream stream = null;
+ if (fAllocateConsole) {
+ stream = newOutputStream();
+ Color color = fColorProvider.getColor(streamIdentifier);
+ stream.setColor(color);
+// stream.setActivateOnWrite(activateOnWrite);
+ }
+ synchronized (streamMonitor) {
+ StreamListener listener = new StreamListener(streamIdentifier, streamMonitor,
stream);
+ fStreamListeners.add(listener);
+ }
+ }
+
+ /**
+ * @see
org.eclipse.debug.ui.console.IConsole#addLink(org.eclipse.debug.ui.console.IConsoleHyperlink,
int, int)
+ */
+ public void addLink(IConsoleHyperlink link, int offset, int length) {
+ try {
+ addHyperlink(link, offset, length);
+ } catch (BadLocationException e) {
+ DebugUIPlugin.log(e);
+ }
+ }
+
+ /**
+ * @see
org.eclipse.debug.ui.console.IConsole#addLink(org.eclipse.ui.console.IHyperlink, int,
int)
+ */
+ public void addLink(IHyperlink link, int offset, int length) {
+ try {
+ addHyperlink(link, offset, length);
+ } catch (BadLocationException e) {
+ DebugUIPlugin.log(e);
+ }
+ }
+
+ /**
+ * @see
org.eclipse.debug.ui.console.IConsole#getRegion(org.eclipse.debug.ui.console.IConsoleHyperlink)
+ */
+ public IRegion getRegion(IConsoleHyperlink link) {
+ return super.getRegion(link);
+ }
+
+ /**
+ * This class listens to a specified IO stream
+ */
+ private class StreamListener implements IStreamListener {
+
+ private IOConsoleOutputStream fStream;
+
+ private IStreamMonitor fStreamMonitor;
+
+ private String fStreamId;
+
+ private boolean fFlushed = false;
+
+ private boolean fListenerRemoved = false;
+
+ public StreamListener(String streamIdentifier, IStreamMonitor monitor,
IOConsoleOutputStream stream) {
+ this.fStreamId = streamIdentifier;
+ this.fStreamMonitor = monitor;
+ this.fStream = stream;
+ fStreamMonitor.addListener(this);
+ //fix to bug 121454. Ensure that output to fast processes is processed.
+ streamAppended(null, monitor);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.core.IStreamListener#streamAppended(java.lang.String,
+ * org.eclipse.debug.core.model.IStreamMonitor)
+ */
+ public void streamAppended(String text, IStreamMonitor monitor) {
+ String encoding = getEncoding();
+ if (fFlushed) {
+ try {
+ if (fStream != null) {
+ if (encoding == null)
+ fStream.write(text);
+ else
+ fStream.write(text.getBytes(encoding));
+ }
+ if (fFileOutputStream != null) {
+ synchronized (fFileOutputStream) {
+ if (encoding == null)
+ fFileOutputStream.write(text.getBytes());
+ else
+ fFileOutputStream.write(text.getBytes(encoding));
+ }
+ }
+ } catch (IOException e) {
+ DebugUIPlugin.log(e);
+ }
+ } else {
+ String contents = null;
+ synchronized (fStreamMonitor) {
+ fFlushed = true;
+ contents = fStreamMonitor.getContents();
+ if (fStreamMonitor instanceof IFlushableStreamMonitor) {
+ IFlushableStreamMonitor m = (IFlushableStreamMonitor)
fStreamMonitor;
+ m.flushContents();
+ m.setBuffered(false);
+ }
+ }
+ try {
+ if (contents != null && contents.length() > 0) {
+ if (fStream != null) {
+ fStream.write(contents);
+ }
+ if (fFileOutputStream != null) {
+ synchronized (fFileOutputStream) {
+ fFileOutputStream.write(contents.getBytes());
+ }
+ }
+ }
+ } catch (IOException e) {
+ DebugUIPlugin.log(e);
+ }
+ }
+ }
+
+ public void closeStream() {
+ if (fStreamMonitor == null) {
+ return;
+ }
+ synchronized (fStreamMonitor) {
+ fStreamMonitor.removeListener(this);
+ if (!fFlushed) {
+ String contents = fStreamMonitor.getContents();
+ streamAppended(contents, fStreamMonitor);
+ }
+ fListenerRemoved = true;
+ try {
+ if (fStream != null) {
+ fStream.close();
+ }
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ public void dispose() {
+ if (!fListenerRemoved) {
+ closeStream();
+ }
+ fStream = null;
+ fStreamMonitor = null;
+ fStreamId = null;
+ }
+ }
+
+ private class InputReadJob extends Job {
+
+ private IStreamsProxy streamsProxy;
+
+ InputReadJob(IStreamsProxy streamsProxy) {
+ super("Forge Console Input Job"); //$NON-NLS-1$
+ this.streamsProxy = streamsProxy;
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ byte[] b = new byte[1024];
+ int read = 0;
+ while (fInput != null && read >= 0) {
+ read = fInput.read(b);
+ if (read > 0) {
+ String s = new String(b, 0, read);
+ streamsProxy.write(s);
+ }
+ }
+ } catch (IOException e) {
+ DebugUIPlugin.log(e);
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.IConsole#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor() {
+ if (super.getImageDescriptor() == null) {
+ setImageDescriptor(computeImageDescriptor());
+ }
+ return super.getImageDescriptor();
+ }
+
+ private class ConsoleLogFilePatternMatcher implements IPatternMatchListener {
+ String fFilePath;
+
+ public ConsoleLogFilePatternMatcher(String filePath) {
+ fFilePath = escape(filePath);
+ }
+
+ private String escape(String path) {
+ StringBuffer buffer = new StringBuffer(path);
+ int index = buffer.indexOf("\\"); //$NON-NLS-1$
+ while (index >= 0) {
+ buffer.insert(index, '\\');
+ index = buffer.indexOf("\\", index+2); //$NON-NLS-1$
+ }
+ return buffer.toString();
+ }
+
+ public String getPattern() {
+ return fFilePath;
+ }
+
+ public void matchFound(PatternMatchEvent event) {
+ try {
+ addHyperlink(new ConsoleLogFileHyperlink(fFilePath), event.getOffset(),
event.getLength());
+ removePatternMatchListener(this);
+ } catch (BadLocationException e) {
+ }
+ }
+
+ public int getCompilerFlags() {
+ return 0;
+ }
+
+ public String getLineQualifier() {
+ return null;
+ }
+
+ public void connect(TextConsole console) {
+ }
+
+ public void disconnect() {
+ }
+ }
+
+ private class ConsoleLogFileHyperlink implements IHyperlink {
+ String fFilePath;
+ ConsoleLogFileHyperlink(String filePath) {
+ fFilePath = filePath;
+ }
+
+ public void linkActivated() {
+ IEditorInput input;
+ Path path = new Path(fFilePath);
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IFile ifile = root.getFileForLocation(path);
+ if (ifile == null) { // The file is not in the workspace
+ File file = new File(fFilePath);
+ LocalFileStorage lfs = new LocalFileStorage(file);
+ input = new StorageEditorInput(lfs, file);
+
+ } else {
+ input = new FileEditorInput(ifile);
+ }
+
+ IWorkbenchPage activePage =
DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
+ try {
+ activePage.openEditor(input, EditorsUI.DEFAULT_TEXT_EDITOR_ID, true);
+ } catch (PartInitException e) {
+ }
+ }
+ public void linkEntered() {
+ }
+ public void linkExited() {
+ }
+ }
+
+ class StorageEditorInput extends PlatformObject implements IStorageEditorInput {
+ private File fFile;
+ private IStorage fStorage;
+
+ public StorageEditorInput(IStorage storage, File file) {
+ fStorage = storage;
+ fFile = file;
+ }
+
+ public IStorage getStorage() {
+ return fStorage;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return null;
+ }
+
+ public String getName() {
+ return getStorage().getName();
+ }
+
+ public IPersistableElement getPersistable() {
+ return null;
+ }
+
+ public String getToolTipText() {
+ return getStorage().getFullPath().toOSString();
+ }
+
+ public boolean equals(Object object) {
+ return object instanceof StorageEditorInput &&
+ getStorage().equals(((StorageEditorInput)object).getStorage());
+ }
+
+ public int hashCode() {
+ return getStorage().hashCode();
+ }
+
+ public boolean exists() {
+ return fFile.exists();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.AbstractConsole#getHelpContextId()
+ */
+ public String getHelpContextId() {
+ return IDebugHelpContextIds.PROCESS_CONSOLE;
+ }
+}
Property changes on: trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/Console.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleLineNotifier.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleLineNotifier.java
(rev 0)
+++
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleLineNotifier.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,151 @@
+package org.jboss.tools.seam.forge.view;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.ui.console.IConsoleLineTracker;
+import org.eclipse.debug.ui.console.IConsoleLineTrackerExtension;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IPatternMatchListener;
+import org.eclipse.ui.console.PatternMatchEvent;
+import org.eclipse.ui.console.TextConsole;
+
+/**
+ * Tracks text appended to the console and notifies listeners in terms of whole
+ * lines.
+ */
+public class ConsoleLineNotifier implements IPatternMatchListener,
IPropertyChangeListener {
+ /**
+ * Console listeners
+ */
+ private List fListeners = new ArrayList(2);
+
+ /**
+ * The console this notifier is tracking
+ */
+ private Console fConsole = null;
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.ui.console.IPatternMatchListenerDelegate#connect(org.eclipse.ui.console.TextConsole)
+ */
+ public void connect(TextConsole console) {
+ if (console instanceof Console) {
+ fConsole = (Console)console;
+
+ IConsoleLineTracker[] lineTrackers =
DebugUIPlugin.getDefault().getProcessConsoleManager().getLineTrackers(fConsole.getProcess());
+ for (int i = 0; i < lineTrackers.length; i++) {
+ lineTrackers[i].init(fConsole);
+ addConsoleListener(lineTrackers[i]);
+ }
+
+ fConsole.addPropertyChangeListener(this);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#disconnect()
+ */
+ public synchronized void disconnect() {
+ try {
+ IDocument document = fConsole.getDocument();
+ if (document != null) {
+ int lastLine = document.getNumberOfLines() - 1;
+ if (document.getLineDelimiter(lastLine) == null) {
+ IRegion lineInformation = document.getLineInformation(lastLine);
+ lineAppended(lineInformation);
+ }
+ }
+ } catch (BadLocationException e) {
+ }
+ }
+
+ /**
+ * Notification the console's streams have been closed
+ */
+ public synchronized void consoleClosed() {
+ int size = fListeners.size();
+ for (int i = 0; i < size; i++) {
+ IConsoleLineTracker tracker = (IConsoleLineTracker) fListeners.get(i);
+ if (tracker instanceof IConsoleLineTrackerExtension) {
+ ((IConsoleLineTrackerExtension) tracker).consoleClosed();
+ }
+ tracker.dispose();
+ }
+
+ fConsole = null;
+ fListeners = null;
+ }
+
+ /**
+ * Adds the given listener to the list of listeners notified when a line of
+ * text is appended to the console.
+ *
+ * @param listener
+ */
+ public void addConsoleListener(IConsoleLineTracker listener) {
+ if (!fListeners.contains(listener))
+ fListeners.add(listener);
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.ui.console.IPatternMatchListener#matchFound(org.eclipse.ui.console.PatternMatchEvent)
+ */
+ public void matchFound(PatternMatchEvent event) {
+ try {
+ IDocument document = fConsole.getDocument();
+ int lineOfOffset = document.getLineOfOffset(event.getOffset());
+ String delimiter = document.getLineDelimiter(lineOfOffset);
+ int strip = delimiter==null ? 0 : delimiter.length();
+ Region region = new Region(event.getOffset(), event.getLength()-strip);
+ lineAppended(region);
+ } catch (BadLocationException e) {}
+ }
+
+ public void lineAppended(IRegion region) {
+ int size = fListeners.size();
+ for (int i=0; i<size; i++) {
+ IConsoleLineTracker tracker = (IConsoleLineTracker) fListeners.get(i);
+ tracker.lineAppended(region);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ if(event.getProperty().equals(IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE)) {
+ fConsole.removePropertyChangeListener(this);
+ consoleClosed();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#getPattern()
+ */
+ public String getPattern() {
+ return ".*\\r(\\n?)|.*\\n"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#getCompilerFlags()
+ */
+ public int getCompilerFlags() {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#getLineQualifier()
+ */
+ public String getLineQualifier() {
+ return "\\n|\\r"; //$NON-NLS-1$
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleLineNotifier.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsolePage.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsolePage.java
(rev 0)
+++ trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsolePage.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,36 @@
+package org.jboss.tools.seam.forge.view;
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.ui.console.ConsoleColorProvider;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.console.TextConsoleViewer;
+import org.eclipse.ui.part.Page;
+import org.jboss.tools.seam.forge.runtime.Manager;
+
+public class ConsolePage extends Page {
+
+ private TextConsoleViewer viewer;
+ private Console console;
+
+ @Override
+ public void createControl(Composite parent) {
+ console = new Console(Manager.INSTANCE.getProcess(), new ConsoleColorProvider());
+ viewer = new TextConsoleViewer(parent, console);
+ console.initialize();
+ }
+
+ @Override
+ public Control getControl() {
+ return viewer == null ? null : viewer.getControl();
+ }
+
+ @Override
+ public void setFocus() {
+ }
+
+ public Console getConsole() {
+ return console;
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsolePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleView.java
===================================================================
--- trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleView.java
(rev 0)
+++ trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleView.java 2011-01-24
14:31:52 UTC (rev 28546)
@@ -0,0 +1,124 @@
+package org.jboss.tools.seam.forge.view;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.internal.ui.views.console.ProcessConsole;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.MessagePage;
+import org.eclipse.ui.part.PageBook;
+import org.eclipse.ui.part.PageSite;
+import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.seam.forge.runtime.Manager;
+
+public class ConsoleView extends ViewPart implements PropertyChangeListener {
+
+ private static ConsoleView INSTANCE;
+
+ private PageBook pageBook = null;
+ private Control notRunning;
+ private Control forgeIsStopping;
+ private Control waitWhileForgeIsStarting;
+ private Control forgeIsRunning;
+ private ConsolePage forgeIsRunningPage;
+
+ public ConsoleView() {
+ if (INSTANCE == null) {
+ INSTANCE = this;
+ Manager.INSTANCE.addPropertyChangeListener(this);
+ }
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ pageBook = new PageBook(parent, SWT.NONE);
+ createForgeNotRunningPage(parent);
+ createWaitWhileForgeIsStartingPage(parent);
+ createForgeIsStoppingPage(parent);
+ showAppropriatePage();
+ }
+
+ private void createForgeNotRunningPage(Composite parent) {
+ MessagePage page = new MessagePage();
+ page.createControl(pageBook);
+ page.init(new PageSite(getViewSite()));
+ page.setMessage("Forge is not running.");
+ notRunning = page.getControl();
+ }
+
+ private void createWaitWhileForgeIsStartingPage(Composite parent) {
+ MessagePage page = new MessagePage();
+ page.createControl(pageBook);
+ page.init(new PageSite(getViewSite()));
+ page.setMessage("Please wait while Forge is starting");
+ waitWhileForgeIsStarting = page.getControl();
+ }
+
+ private void createForgeIsStoppingPage(Composite parent) {
+ MessagePage page = new MessagePage();
+ page.createControl(pageBook);
+ page.init(new PageSite(getViewSite()));
+ page.setMessage("Please wait while Forge is stopping");
+ forgeIsStopping = page.getControl();
+ }
+
+ @Override
+ public void setFocus() {}
+
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ if (evt.getNewValue().equals(evt.getOldValue())) return;
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ showAppropriatePage();
+ }
+ });
+ }
+
+ private void showAppropriatePage() {
+ String runtimeState = Manager.INSTANCE.getRuntimeState();
+ if (Manager.STATE_NOT_RUNNING.equals(runtimeState)) {
+ pageBook.showPage(notRunning);
+ } else if (Manager.STATE_RUNNING.equals(runtimeState)) {
+ showForgeIsRunning();
+ } else if (Manager.STATE_STARTING.equals(runtimeState)) {
+ pageBook.showPage(waitWhileForgeIsStarting);
+ } else if (Manager.STATE_STOPPING.equals(runtimeState)) {
+ pageBook.showPage(forgeIsStopping);
+ }
+ }
+
+ private void showForgeIsRunning() {
+ Control oldForgeIsRunning = forgeIsRunning;
+ ConsolePage oldForgeIsRunningPage = forgeIsRunningPage;
+ forgeIsRunningPage = new ConsolePage();
+ forgeIsRunningPage.createControl(pageBook);
+ forgeIsRunningPage.init(new PageSite(getViewSite()));
+ forgeIsRunning = forgeIsRunningPage.getControl();
+ pageBook.showPage(forgeIsRunning);
+ if (oldForgeIsRunningPage != null) {
+ Console oldConsole = oldForgeIsRunningPage.getConsole();
+ if (oldConsole != null) {
+ DebugPlugin.getDefault().removeDebugEventListener(oldConsole);
+ oldConsole.dispose();
+ }
+ oldForgeIsRunningPage.dispose();
+ }
+ if (oldForgeIsRunning != null) {
+ oldForgeIsRunning.dispose();
+ }
+ }
+
+ public void dispose() {
+ Manager.INSTANCE.removePropertyChangeListener(this);
+ super.dispose();
+ }
+
+}
Property changes on:
trunk/forge/plugins/src/org/jboss/tools/seam/forge/view/ConsoleView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain