Author: koen.aers(a)jboss.com
Date: 2011-07-18 06:51:27 -0400 (Mon, 18 Jul 2011)
New Revision: 33000
Added:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.project
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.settings/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.settings/org.eclipse.jdt.core.prefs
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/pom.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/HiddenPlugin.java
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/
Log:
initial implementation of an extension mechanism allowing to talk to the forge runtime
Property changes on: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext
___________________________________________________________________
Added: svn:ignore
+ bin
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
(rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath 2011-07-18 10:51:27
UTC (rev 33000)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.project
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.project
(rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.project 2011-07-18 10:51:27 UTC
(rev 33000)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.forge.runtime.ext</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.settings/org.eclipse.jdt.core.prefs 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1,8 @@
+#Mon Jul 11 18:25:11 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Plugin
+Bundle-SymbolicName: org.jboss.tools.forge.runtime.ext
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.jboss.tools.forge.runtime;bundle-version="1.0.0"
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties
(rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/pom.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/pom.xml
(rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/pom.xml 2011-07-18 10:51:27 UTC
(rev 33000)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.forge</groupId>
+ <artifactId>plugins</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.forge.plugins</groupId>
+ <artifactId>org.jboss.tools.forge.plugin</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml
(rev 0)
+++
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/beans.xml 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1,6 @@
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+
http://java.sun.com/xml/ns/javaee
+
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+</beans>
Added: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml
(rev 0)
+++
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/META-INF/forge.xml 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1 @@
+<forge/>
\ No newline at end of file
Added:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
(rev 0)
+++
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1,27 @@
+package org.jboss.tools.forge.runtime.ext;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.inject.Inject;
+
+import org.jboss.forge.shell.Shell;
+import org.jboss.forge.shell.events.PostStartup;
+
+@ApplicationScoped
+public class EventHandler {
+
+ private final static String ESCAPE_START = new String(new char[] { 27, '[',
'%'});
+ private final static String ESCAPE_END = "%";
+
+ @Inject
+ Shell shell;
+
+ public void handlePostStartup(@Observes PostStartup event) {
+// sendEscapedSequence("PostStartup");
+ }
+
+ private void sendEscapedSequence(String sequence) {
+ shell.print(ESCAPE_START + sequence + ESCAPE_END);
+ }
+
+}
Added:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/HiddenPlugin.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/HiddenPlugin.java
(rev 0)
+++
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/HiddenPlugin.java 2011-07-18
10:51:27 UTC (rev 33000)
@@ -0,0 +1,28 @@
+package org.jboss.tools.forge.runtime.ext;
+
+import javax.inject.Inject;
+
+import org.jboss.forge.shell.Shell;
+import org.jboss.forge.shell.plugins.Alias;
+import org.jboss.forge.shell.plugins.DefaultCommand;
+import org.jboss.forge.shell.plugins.Plugin;
+
+
+public class HiddenPlugin implements Plugin {
+
+ private final static String ESCAPE_START = new String(new char[] { 27, '[',
'%'});
+ private final static String ESCAPE_END = "%";
+
+ @Inject
+ Shell shell;
+
+ @DefaultCommand
+ public void run() {
+ sendEscapedSequence("blah!");
+ }
+
+ private void sendEscapedSequence(String sequence) {
+ shell.print(ESCAPE_START + sequence + ESCAPE_END);
+ }
+
+}