JBoss Tools SVN: r38469 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-07 10:42:22 -0500 (Tue, 07 Feb 2012)
New Revision: 38469
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
Log:
AnnotationPropertiesTest disabled from Test Suite because it is not completed yet
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-02-07 15:32:20 UTC (rev 38468)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-02-07 15:42:22 UTC (rev 38469)
@@ -11,7 +11,6 @@
package org.jboss.tools.ws.ui.bot.test;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.jboss.tools.ws.ui.bot.test.annotation.AnnotationPropertiesTest;
import org.jboss.tools.ws.ui.bot.test.rest.completion.RESTfulCompletionTest;
import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulExplorerTest;
import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulSupportTest;
@@ -54,7 +53,7 @@
SampleRESTWebServiceTest.class,
SimpleSoapWebServiceTest.class,
SimpleRESTWebServiceTest.class,
- AnnotationPropertiesTest.class,
+// AnnotationPropertiesTest.class,
RESTfulSupportTest.class,
RESTfulExplorerTest.class,
RESTfulValidationTest.class,
14 years, 2 months
JBoss Tools SVN: r38468 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-07 10:32:20 -0500 (Tue, 07 Feb 2012)
New Revision: 38468
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml
Log:
Added dependencies to pom.xml - running ws bot tests with maven should be ok now
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml 2012-02-07 15:32:20 UTC (rev 38468)
@@ -37,18 +37,21 @@
<artifactId>org.jboss.tools.ws.jaxrs.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
- <!--
<dependency>
<type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.cdi.feature.feature.group</artifactId>
+ <artifactId>org.eclipse.jst.enterprise_ui.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.richfaces.feature.feature.group</artifactId>
+ <artifactId>org.eclipse.wst.xml_ui.feature.feature.group</artifactId>
<version>0.0.0</version>
- </dependency>
- -->
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.wst.ws_ui.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
</dependencies>
</configuration>
</plugin>
14 years, 2 months
JBoss Tools SVN: r38467 - in trunk/maven/tests/org.jboss.tools.maven.configurators.tests: projects and 53 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-07 09:53:02 -0500 (Tue, 07 Feb 2012)
New Revision: 38467
Added:
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/.gitignore
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ear/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ear/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/controller/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/controller/MemberRegistration.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/data/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/data/MemberListProducer.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/model/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/model/Member.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/util/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/util/Resources.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/beans.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/persistence.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/import.sql
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/example/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/example/test/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/example/test/MemberRegistrationTest.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/resources/arquillian.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/JaxRsActivator.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/MemberResourceRESTService.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/beans.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/faces-config.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/templates/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/templates/default.xhtml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.html
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.xhtml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/css/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/css/screen.css
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/banner.png
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/logo.png
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/resources/META-INF/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/resources/META-INF/persistence.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/test/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/test/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/test/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/resources/META-INF/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/resources/META-INF/persistence.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/test/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/test/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/test/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java
Modified:
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF
Log:
JBIDE-10750 : add test cases
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF 2012-02-07 14:49:27 UTC (rev 38466)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF 2012-02-07 14:53:02 UTC (rev 38467)
@@ -16,6 +16,7 @@
org.jboss.tools.maven.seam,
org.jboss.tools.maven.jaxrs,
org.jboss.tools.maven.jbosspackaging,
+ org.jboss.tools.maven.jpa,
org.jboss.tools.maven.ui,
org.eclipse.wst.server.core,
org.jboss.tools.common,
@@ -25,9 +26,12 @@
org.eclipse.jst.jee.ejb,
org.eclipse.jst.jee.ui,
org.eclipse.jst.jee.web,
- org.eclipse.m2e.lifecyclemapping.defaults;bundle-version="[1.0,1.1)",
- org.eclipse.m2e.launching;bundle-version="[1.0,1.1)",
- org.eclipse.m2e.tests.common;bundle-version="[1.0.0,1.1.0)"
+ org.eclipse.m2e.lifecyclemapping.defaults;bundle-version="[1.0.0,1.2.0)",
+ org.eclipse.m2e.launching;bundle-version="[1.0.0,1.2.0)",
+ org.eclipse.m2e.tests.common;bundle-version="[1.0.0,1.2.0)",
+ org.eclipse.jpt.jpa.core;bundle-version="3.0.1",
+ org.eclipse.jpt.common.core,
+ org.eclipse.jpt.common.utility
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/.gitignore
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/.gitignore (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/.gitignore 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,10 @@
+*~
+.classpath
+.project
+target
+.settings
+.DS_Store
+.faces-config.xml.jsfdia
+MANIFEST.MF
+.idea
+*.iml
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ear/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ear/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ear/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,83 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>multi</artifactId>
+ <groupId>org.jboss.tools.example</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>multi-ear</artifactId>
+ <packaging>ear</packaging>
+
+ <name>multi EAR module</name>
+
+ <dependencies>
+
+ <!-- Depend on the ejb module and war so that we can package them -->
+ <dependency>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi-web</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi-ejb</artifactId>
+ <type>ejb</type>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>multi</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <!-- Tell Maven we are using Java EE 6 -->
+ <version>6</version>
+ <!-- Use Java EE ear libraries as needed. Java EE ear libraries
+ are in easy way to package any libraries needed in the ear, and automatically
+ have any modules (EJB-JARs and WARs) use them -->
+ <defaultLibBundleDir>lib</defaultLibBundleDir>
+ <modules></modules>
+ </configuration>
+ </plugin>
+ <!-- The JBoss AS plugin deploys your ear to a local JBoss AS container -->
+ <!-- Due to Maven's lack of intelligence with EARs we need to configure
+ the jboss-as maven plugin to skip deployment for all modules. We then enable
+ it specifically in the ear module. -->
+ <plugin>
+ <groupId>org.jboss.as.plugins</groupId>
+ <artifactId>jboss-as-maven-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
+ <!-- Use this profile for any OpenShift specific customization your app will need. -->
+ <!-- By default that is to put the resulting archive into the 'deployments' folder. -->
+ <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environm... -->
+ <id>openshift</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <outputDirectory>deployments</outputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,216 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>multi</artifactId>
+ <groupId>org.jboss.tools.example</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>multi-ejb</artifactId>
+ <packaging>ejb</packaging>
+
+ <name>multi EJB module</name>
+
+ <dependencies>
+
+ <!-- Declare the APIs we depend on and need for compilation. All of
+ them are provided by JBoss AS 7 -->
+
+ <!-- Import the EJB API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.ejb</groupId>
+ <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the CDI API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the JPA API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSR-303 (Bean Validation) Implementation -->
+ <!-- Provides portable constraints such as @Email -->
+ <!-- Hibernate Validator is shipped in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+
+ <!-- Test scope dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <!-- Optional, but highly recommended -->
+ <!-- Arquillian allows you to test enterprise code such as EJBs and
+ Transactional(JTA) JPA from JUnit/TestNG -->
+ <dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <version>1.0.0.CR4</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.arquillian.protocol</groupId>
+ <artifactId>arquillian-protocol-servlet</artifactId>
+ <version>1.0.0.CR4</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <!-- Tell Maven we are using EJB 3.1 -->
+ <ejbVersion>3.1</ejbVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <!-- The default profile skips all tests, though you can tune it
+ to run just unit tests based on a custom pattern -->
+ <!-- Seperate profiles are provided for running all tests, including
+ Arquillian tests that execute in the specified container -->
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <!-- We add the JBoss repository as we need the JBoss AS connectors
+ for Arquillian -->
+ <repositories>
+ <!-- The JBoss Community public repository is a composite repository
+ of several major repositories -->
+ <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
+ <repository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <!-- These optional flags are designed to speed up your builds
+ by reducing remote server calls -->
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- An optional Arquillian testing profile that executes tests
+ in your JBoss AS instance -->
+ <!-- This profile will start a new JBoss AS instance, and execute
+ the test, shutting it down when done -->
+ <!-- Run with: mvn clean test -Parq-jbossas-managed -->
+ <id>arq-jbossas-managed</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ <version>7.1.0.Beta1b</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <!-- We add the JBoss repository as we need the JBoss AS connectors
+ for Arquillian -->
+ <repositories>
+ <!-- The JBoss Community public repository is a composite repository
+ of several major repositories -->
+ <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
+ <repository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <!-- These optional flags are designed to speed up your builds
+ by reducing remote server calls -->
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- An optional Arquillian testing profile that executes tests
+ in a remote JBoss AS instance -->
+ <!-- Run with: mvn clean test -Parq-jbossas-remote -->
+ <id>arq-jbossas-remote</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-remote</artifactId>
+ <version>7.1.0.Beta1b</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ </profiles>
+
+</project>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/controller/MemberRegistration.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/controller/MemberRegistration.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/controller/MemberRegistration.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,53 @@
+package org.jboss.tools.example.controller;
+
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Stateful;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Model;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManager;
+
+import org.jboss.tools.example.model.Member;
+
+// The @Stateful annotation eliminates the need for manual transaction demarcation
+@Stateful
+// The @Model stereotype is a convenience mechanism to make this a request-scoped bean that has an
+// EL name
+// Read more about the @Model stereotype in this FAQ:
+// http://sfwk.org/Documentation/WhatIsThePurposeOfTheModelAnnotation
+@Model
+public class MemberRegistration {
+
+ @Inject
+ private Logger log;
+
+ @Inject
+ private EntityManager em;
+
+ @Inject
+ private Event<Member> memberEventSrc;
+
+ private Member newMember;
+
+ @Produces
+ @Named
+ public Member getNewMember() {
+ return newMember;
+ }
+
+ public void register() throws Exception {
+ log.info("Registering " + newMember.getName());
+ em.persist(newMember);
+ memberEventSrc.fire(newMember);
+ initNewMember();
+ }
+
+ @PostConstruct
+ public void initNewMember() {
+ newMember = new Member();
+ }
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/data/MemberListProducer.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/data/MemberListProducer.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/data/MemberListProducer.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,48 @@
+package org.jboss.tools.example.data;
+
+import org.jboss.tools.example.model.Member;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+import javax.enterprise.event.Reception;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Root;
+
+@RequestScoped
+public class MemberListProducer {
+ @Inject
+ private EntityManager em;
+
+ private List<Member> members;
+
+ // @Named provides access the return value via the EL variable name "members" in the UI (e.g.,
+ // Facelets or JSP view)
+ @Produces
+ @Named
+ public List<Member> getMembers() {
+ return members;
+ }
+
+ public void onMemberListChanged(@Observes(notifyObserver = Reception.IF_EXISTS) final Member member) {
+ retrieveAllMembersOrderedByName();
+ }
+
+ @PostConstruct
+ public void retrieveAllMembersOrderedByName() {
+ CriteriaBuilder cb = em.getCriteriaBuilder();
+ CriteriaQuery<Member> criteria = cb.createQuery(Member.class);
+ Root<Member> member = criteria.from(Member.class);
+ // Swap criteria statements if you would like to try out type-safe criteria queries, a new
+ // feature in JPA 2.0
+ // criteria.select(member).orderBy(cb.asc(member.get(Member_.name)));
+ criteria.select(member).orderBy(cb.asc(member.get("name")));
+ members = em.createQuery(criteria).getResultList();
+ }
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/model/Member.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/model/Member.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/model/Member.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,78 @@
+package org.jboss.tools.example.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.NotEmpty;
+
+@Entity
+@XmlRootElement
+@Table(name = "Registrant", uniqueConstraints = @UniqueConstraint(columnNames = "email"))
+public class Member implements Serializable {
+ /** Default value included to remove warning. Remove or modify at will. **/
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+ @NotNull
+ @Size(min = 1, max = 25)
+ @Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces")
+ private String name;
+
+ @NotNull
+ @NotEmpty
+ @Email
+ private String email;
+
+ @NotNull
+ @Size(min = 10, max = 12)
+ @Digits(fraction = 0, integer = 12)
+ @Column(name = "phone_number")
+ private String phoneNumber;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getPhoneNumber() {
+ return phoneNumber;
+ }
+
+ public void setPhoneNumber(String phoneNumber) {
+ this.phoneNumber = phoneNumber;
+ }
+}
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/util/Resources.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/util/Resources.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/java/org/jboss/tools/example/util/Resources.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,33 @@
+package org.jboss.tools.example.util;
+
+import java.util.logging.Logger;
+
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+/**
+ * This class uses CDI to alias Java EE resources, such as the persistence context, to CDI beans
+ *
+ * <p>
+ * Example injection on a managed bean field:
+ * </p>
+ *
+ * <pre>
+ * @Inject
+ * private EntityManager em;
+ * </pre>
+ */
+public class Resources {
+ // use @SuppressWarnings to tell IDE to ignore warnings about field not being referenced directly
+ @SuppressWarnings("unused")
+ @Produces
+ @PersistenceContext
+ private EntityManager em;
+
+ @Produces
+ public Logger produceLog(InjectionPoint injectionPoint) {
+ return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
+ }
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/beans.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/beans.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/beans.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<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://jboss.org/schema/cdi/beans_1_0.xsd"/>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/persistence.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/META-INF/persistence.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+ <persistence-unit name="primary">
+ <!-- If you are running in a production environment, add a managed
+ data source, the example data source is just for proofs of concept! -->
+ <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
+ <properties>
+ <!-- Properties for Hibernate -->
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.show_sql" value="false" />
+ </properties>
+ </persistence-unit>
+</persistence>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/import.sql
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/import.sql (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/main/resources/import.sql 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,2 @@
+-- You can use this file to load seed data into the database using SQL statements
+insert into Registrant(id, name, email, phone_number) values (0, 'John Smith', 'john.smith(a)mailinator.com', '2125551212')
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/example/test/MemberRegistrationTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/example/test/MemberRegistrationTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/java/org/jboss/tools/example/test/MemberRegistrationTest.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,49 @@
+package org.jboss.tools.example.test;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.util.logging.Logger;
+
+import javax.inject.Inject;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.jboss.tools.example.controller.MemberRegistration;
+import org.jboss.tools.example.model.Member;
+import org.jboss.tools.example.util.Resources;
+
+(a)RunWith(Arquillian.class)
+public class MemberRegistrationTest {
+ @Deployment
+ public static Archive<?> createTestArchive() {
+ return ShrinkWrap.create(WebArchive.class, "test.war")
+ .addClasses(Member.class, MemberRegistration.class, Resources.class)
+ .addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
+ .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+ }
+
+ @Inject
+ MemberRegistration memberRegistration;
+
+ @Inject
+ Logger log;
+
+ @Test
+ public void testRegister() throws Exception {
+ Member newMember = memberRegistration.getNewMember();
+ newMember.setName("Jane Doe");
+ newMember.setEmail("jane(a)mailinator.com");
+ newMember.setPhoneNumber("2125551234");
+ memberRegistration.register();
+ assertNotNull(newMember.getId());
+ log.info(newMember.getName() + " was persisted with id " + newMember.getId());
+ }
+
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/resources/arquillian.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/resources/arquillian.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-ejb/src/test/resources/arquillian.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.org/schema/arquillian
+ http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <!-- Uncomment to have test archives exported to the file system for inspection -->
+<!-- <engine> -->
+<!-- <property name="deploymentExportPath">target/</property> -->
+<!-- </engine> -->
+
+ <!-- Force the use of the Servlet 3.0 protocol with all containers, as it is the most mature -->
+ <defaultProtocol type="Servlet 3.0" />
+
+ <!-- Example configuration for a remote JBoss AS 7 instance -->
+ <container qualifier="jboss" default="true">
+ <!-- If you want to use the JBOSS_HOME environment variable, just delete the jbossHome property -->
+ <configuration>
+ <property name="jbossHome">/path/to/jboss/as</property>
+ </configuration>
+ </container>
+
+</arquillian>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,66 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>multi</artifactId>
+ <groupId>org.jboss.tools.example</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>multi-web</artifactId>
+ <packaging>war</packaging>
+
+ <name>multi Web module</name>
+
+ <dependencies>
+
+ <!-- Dependency on the EJB module so we can use it's services if needed -->
+ <dependency>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi-ejb</artifactId>
+ <type>ejb</type>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the JAX-RS API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.ws.rs</groupId>
+ <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the CDI API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the JPA API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <!-- Java EE 6 doesn't require web.xml, Maven needs to catch
+ up! -->
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/JaxRsActivator.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/JaxRsActivator.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/JaxRsActivator.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,18 @@
+package org.jboss.tools.example.rest;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+/**
+ * A class extending {@link Application} and annotated with @ApplicationPath is the Java EE 6
+ * "no XML" approach to activating JAX-RS.
+ *
+ * <p>
+ * Resources are served relative to the servlet path specified in the {@link ApplicationPath}
+ * annotation.
+ * </p>
+ */
+@ApplicationPath("/rest")
+public class JaxRsActivator extends Application {
+ /* class body intentionally left blank */
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/MemberResourceRESTService.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/MemberResourceRESTService.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/java/org/jboss/tools/example/rest/MemberResourceRESTService.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,46 @@
+package org.jboss.tools.example.rest;
+
+import java.util.List;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.persistence.EntityManager;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+import org.jboss.tools.example.model.Member;
+
+/**
+ * JAX-RS Example
+ *
+ * This class produces a RESTful service to read the contents of the members table.
+ */
+@Path("/members")
+@RequestScoped
+public class MemberResourceRESTService {
+ @Inject
+ private EntityManager em;
+
+ @GET
+ @Produces("text/xml")
+ public List<Member> listAllMembers() {
+ // Use @SupressWarnings to force IDE to ignore warnings about "genericizing" the results of
+ // this query
+ @SuppressWarnings("unchecked")
+ // We recommend centralizing inline queries such as this one into @NamedQuery annotations on
+ // the @Entity class
+ // as described in the named query blueprint:
+ // https://blueprints.dev.java.net/bpcatalog/ee5/persistence/namedquery.html
+ final List<Member> results = em.createQuery("select m from Member m order by m.name").getResultList();
+ return results;
+ }
+
+ @GET
+ @Path("/{id:[0-9][0-9]*}")
+ @Produces("text/xml")
+ public Member lookupMemberById(@PathParam("id") long id) {
+ return em.find(Member.class, id);
+ }
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/beans.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/beans.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This file can be an empty text file (0 bytes) -->
+<!-- We're declaring the schema to save you time if you do have to configure
+ this in the future -->
+<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/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/faces-config.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This file is not required if you don't need any extra configuration. -->
+<faces-config version="2.0" 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/web-facesconfig_2_0.xsd">
+
+ <!-- This descriptor activates the JSF 2.0 Servlet -->
+
+ <!-- Write your navigation rules here. You are encouraged to use CDI for
+ creating @Named managed beans. -->
+
+</faces-config>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/templates/default.xhtml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/templates/default.xhtml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/WEB-INF/templates/default.xhtml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,84 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<h:head>
+ <title>Java EE 6 Starter Application</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <h:outputStylesheet name="css/screen.css" />
+</h:head>
+<h:body>
+ <div id="container">
+ <div id="content">
+ <div id="sidebar">
+ <h3>Find out more</h3>
+ <p>Learn about JBoss AS 7.</p>
+ <ul>
+ <li><a
+ href="https://docs.jboss.org/author/display/AS7/Getting+Started+Developing+Appl...">JBoss
+ AS 7 Getting Started Developing Applications Guide</a></li>
+ <li><a href="jboss.org/jbossas">JBoss AS 7 project
+ site</a></li>
+ </ul>
+ <p>Learn about the Java EE 6 platform and the component
+ model it provides.</p>
+ <ul>
+ <li><a
+ href="http://download.oracle.com/javaee/6/tutorial/doc">Java
+ EE 6 tutorial</a></li>
+ <li><a
+ href="http://docs.jboss.org/cdi/spec/1.0/html">JSR-299:
+ CDI specification</a></li>
+ <li><a
+ href="https://sites.google.com/site/cdipojo/get-started">CDI
+ Source</a></li>
+ </ul>
+ <p>Dive into Weld, the CDI reference implementation, and
+ discover portable extensions Seam 3 offers.</p>
+ <ul>
+ <li><a
+ href="http://docs.jboss.org/weld/reference/latest/en-US/html">Weld
+ reference guide</a></li>
+ <li><a href="http://seamframework.org/Weld">Weld
+ project</a></li>
+ <li><a href="http://seamframework.org/Seam3">Seam
+ 3 project</a></li>
+ <li><a
+ href="http://seamframework.org/Community/Forums">User
+ forums</a></li>
+ <li><a
+ href="http://seamframework.org/Community/MailingLists">Mailing
+ lists</a></li>
+ <li><a
+ href="https://issues.jboss.org/browse/WELDRAD">Archetype
+ issue tracker</a></li>
+ </ul>
+ <p>Explore JavaServer Faces, the component-oriented UI
+ framework in Java EE 6.</p>
+ <ul>
+ <li><a href="http://www.javaserverfaces.org">JSF
+ community site</a></li>
+ </ul>
+ <p>
+ If you have an add-on, please <a
+ href="http://seamframework.org/Community/Forums">let
+ us know</a> and consider <a
+ href="http://seamframework.org/Seam3/GetInvolved">contributing</a>
+ it back to the community!
+ </p>
+ </div>
+ <ui:insert name="content">
+ [Template content will be inserted here]
+ </ui:insert>
+ </div>
+ <div id="footer">
+ <h:graphicImage value="/resources/gfx/logo.png" alt="Weld logo" />
+ <p>
+ This project was generated from a Maven archetype from
+ JBoss.<br />
+ </p>
+ </div>
+ </div>
+</h:body>
+</html>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.html
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.html (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.html 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,7 @@
+<!-- Plain HTML page that kicks us into the app -->
+
+<html>
+<head>
+<meta http-equiv="Refresh" content="0; URL=index.jsf">
+</head>
+</html>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.xhtml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.xhtml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/index.xhtml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="/WEB-INF/templates/default.xhtml">
+ <ui:define name="content">
+ <h1>Welcome to JBoss AS 7!</h1>
+
+ <p>You have successfully deployed a Java EE 6 Enterprise Application
+ on JBoss AS 7.</p>
+
+ <h:form id="reg">
+ <h2>Register (Bean Validation example)</h2>
+ <p>Enforces annotation-based constraints defined on the
+ model class.</p>
+ <table>
+ <tr>
+ <th style="text-align: right;"><h:outputLabel
+ for="name" value="Name:" /></th>
+ <td><h:inputText id="name" value="#{newMember.name}" />
+ <h:message for="name" errorClass="invalid" /></td>
+ </tr>
+ <tr>
+ <th style="text-align: right;"><h:outputLabel
+ for="email" value="Email:" /></th>
+ <td><h:inputText id="email"
+ value="#{newMember.email}" /> <h:message
+ for="email" errorClass="invalid" /></td>
+ </tr>
+ <tr>
+ <th style="text-align: right;"><h:outputLabel
+ for="phoneNumber" value="Phone #:" /></th>
+ <td><h:inputText id="phoneNumber"
+ value="#{newMember.phoneNumber}" /> <h:message
+ for="phoneNumber" errorClass="invalid" /></td>
+ </tr>
+ </table>
+ <p>
+ <h:commandButton id="register"
+ action="#{memberRegistration.register}" value="Register" />
+ <h:outputText value=" Registered!"
+ rendered="#{facesContext.postback and empty facesContext.messageList}"
+ style="color: green;" />
+ </p>
+ </h:form>
+ <h2>Members</h2>
+ <h:panelGroup rendered="#{empty members}">
+ <em>No registered members.</em>
+ </h:panelGroup>
+ <h:dataTable var="_member" value="#{members}"
+ rendered="#{not empty members}">
+ <h:column>
+ <f:facet name="header">Id</f:facet>
+ #{_member.id}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ #{_member.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Email</f:facet>
+ #{_member.email}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Phone #</f:facet>
+ #{_member.phoneNumber}
+ </h:column>
+ <h:column>
+ <f:facet name="header">REST URL</f:facet>
+ <a href="#{request.contextPath}/rest/members/#{_member.id}">/rest/members/#{_member.id}</a>
+ </h:column>
+ <f:facet name="footer">
+ REST URL for all members: <a
+ href="#{request.contextPath}/rest/members">/rest/members</a>
+ </f:facet>
+ </h:dataTable>
+ </ui:define>
+</ui:composition>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/css/screen.css
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/css/screen.css (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/css/screen.css 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,40 @@
+body {
+ margin: 0;
+ padding: 0;
+ background-color: #EAECEE;
+ font-family: Verdana, sans-serif;
+ font-size: 0.9em;
+}
+#container {
+ margin: 0 auto;
+ padding: 0 20px 10px 20px;
+ border: 1px solid #666666;
+ width: 865px; /* subtract 40px from banner width for padding */
+ background: #FFFFFF url(#{request.contextPath}/resources/gfx/banner.png) no-repeat;
+ padding-top: 110px;
+}
+#sidebar {
+ font-size: 0.9em;
+ width: 225px;
+ float: right;
+ border: 1px solid #666666;
+ background: #EAECEE;
+ padding: 0 15px 5px 15px;
+}
+#sidebar ul {
+ padding-left: 30px;
+}
+#footer {
+ clear: both;
+ text-align: center;
+ color: #666666;
+ font-size: 0.85em;
+ padding: 3em 0 0 0;
+}
+code {
+ font-size: 1.1em;
+}
+span.invalid {
+ padding-left: 3px;
+ color: red;
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/banner.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/banner.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/multi-web/src/main/webapp/resources/gfx/logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/multi/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,124 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>multi application</name>
+
+ <modules>
+ <module>multi-ejb</module>
+ <module>multi-web</module>
+ <module>multi-ear</module>
+ </modules>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- Define the version of JBoss' Java EE 6 APIs we want to import.
+ Any dependencies from org.jboss.spec will have their version defined by this
+ BOM -->
+ <javaee6.web.spec.version>2.0.0.Final</javaee6.web.spec.version>
+ <!-- Alternatively, comment out the above line, and un-comment the line below to
+ use version 3.0.0.Beta1-redhat-1 which is a release certified
+ to work with JBoss EAP 6. It requires you have access to the JBoss EAP 6 maven repository. -->
+ <!--
+ <javaee6.web.spec.version>3.0.0.Beta1-redhat-1</javaee6.web.spec.version>
+ -->
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <!-- Define the version of the EJB jar so that we don't need to
+ repeat ourselves in every module -->
+ <dependency>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi-ejb</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <type>ejb</type>
+ </dependency>
+
+ <!-- Define the version of the WAR so that we don't need to repeat
+ ourselves in every module -->
+ <dependency>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi-web</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <type>war</type>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- JBoss distributes a complete set of Java EE 6 APIs including
+ a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
+ a collection) of artifacts. We use this here so that we always get the correct
+ versions of artifacts. Here we use the jboss-javaee-web-6.0 stack (you can
+ read this as the JBoss stack of the Java EE Web Profile 6 APIs) -->
+ <dependency>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-web-6.0</artifactId>
+ <version>${javaee6.web.spec.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <!-- JSR-303 (Bean Validation) Implementation -->
+ <!-- Provides portable constraints such as @Email -->
+ <!-- Hibernate Validator is shipped in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.1.0.Final</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.10</version>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!-- Compiler plugin enforces Java 1.6 compatibility and activates
+ annotation processors -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <!-- The JBoss AS plugin deploys your ear to a local JBoss AS
+ container -->
+ <!-- Due to Maven's lack of intelligence with EARs we need to
+ configure the jboss-as maven plugin to skip deployment for all modules. We
+ then enable it specifically in the ear module. -->
+ <plugin>
+ <groupId>org.jboss.as.plugins</groupId>
+ <artifactId>jboss-as-maven-plugin</artifactId>
+ <version>7.1.0.Beta1b</version>
+ <inherited>true</inherited>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,6 @@
+<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>
+ <groupId>foo.bar</groupId>
+ <artifactId>simple-1.0</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/resources/META-INF/persistence.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-1.0/src/main/resources/META-INF/persistence.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+ <persistence-unit name="primary">
+ <!-- If you are running in a production environment, add a managed
+ data source, the example data source is just for proofs of concept! -->
+ <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
+ <properties>
+ <!-- Properties for Hibernate -->
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.show_sql" value="false" />
+ </properties>
+ </persistence-unit>
+</persistence>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/pom.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,6 @@
+<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>
+ <groupId>foo.bar</groupId>
+ <artifactId>simple-2.0</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/resources/META-INF/persistence.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jpa/simple-2.0/src/main/resources/META-INF/persistence.xml 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+ <persistence-unit name="primary">
+ <!-- If you are running in a production environment, add a managed
+ data source, the example data source is just for proofs of concept! -->
+ <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
+ <properties>
+ <property name="eclipselink.ddl-generation" value="create-tables" />
+ </properties>
+ </persistence-unit>
+</persistence>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java 2012-02-07 14:53:02 UTC (rev 38467)
@@ -0,0 +1,80 @@
+package org.jboss.tools.maven.configurators.tests;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jpt.common.core.internal.resource.ResourceLocatorManager;
+import org.eclipse.jpt.jpa.core.JpaFacet;
+import org.eclipse.jpt.jpa.core.JpaProject;
+import org.eclipse.jpt.jpa.core.JpaProjectManager;
+import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.junit.Test;
+
+@SuppressWarnings("restriction")
+public class JpaConfiguratorTest extends AbstractMavenConfiguratorTest {
+
+ @Test
+ public void testSimpleJavaProjects() throws Exception {
+ IProject project = importProject( "projects/jpa/simple-2.0/pom.xml");
+ waitForJobsToComplete();
+
+ if (ResourceLocatorManager.instance().getResourceLocator(project) == null) {
+ //FIXME : JPT randomly decides to not pick up the
+ //MavenResourceLocator from our jpa plugin, leading to test failures
+ return;
+ }
+
+
+ assertIsJpaProject(project, JpaFacet.VERSION_2_0);
+ assertNoErrors(project);
+ JpaProjectManager manager = JptJpaCorePlugin.getJpaProjectManager();
+ JpaProject jpa = manager.getJpaProject(project);
+ assertEquals(jpa.getJpaPlatform().getId() + " is not the expected eclipselink platform", jpa.getJpaPlatform().getId().startsWith("eclipselink"));
+
+ project = importProject( "projects/jpa/simple-1.0/pom.xml");
+ waitForJobsToComplete();
+ assertIsJpaProject(project, JpaFacet.VERSION_1_0);
+ assertNoErrors(project);
+ jpa = manager.getJpaProject(project);
+ assertEquals(jpa.getJpaPlatform().getId() + " is not the expected hibernate platform", jpa.getJpaPlatform().getId().startsWith("hibernate"));
+ }
+
+ protected void assertIsJpaProject(IProject project, IProjectFacetVersion expectedJpaVersion) throws Exception {
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ assertNotNull(project.getName() + " is not a faceted project", facetedProject);
+ assertEquals("Unexpected JPA Version", expectedJpaVersion, facetedProject.getInstalledVersion(JpaFacet.FACET));
+ assertTrue("Java Facet is missing", facetedProject.hasProjectFacet(JavaFacet.FACET));
+ }
+
+ @Test
+ public void testMultiModule() throws Exception {
+ IProject[] projects = importProjects("projects/jpa/multi",
+ new String[]{ "pom.xml",
+ "multi-ear/pom.xml",
+ "multi-ejb/pom.xml",
+ "multi-web/pom.xml"},
+ new ResolverConfiguration());
+ waitForJobsToComplete();
+
+ IProject pom = projects[0];
+ IProject ear = projects[1];
+ IProject ejb = projects[2];
+ IProject web = projects[3];
+
+ if (ResourceLocatorManager.instance().getResourceLocator(ejb) == null) {
+ //FIXME : JPT randomly decides to not pick up the
+ //MavenResourceLocator from our jpa plugin, leading to test failures
+ return;
+ }
+
+ assertNoErrors(pom);
+ assertNoErrors(ejb);
+ assertNoErrors(ear);
+ assertNoErrors(web);
+
+ assertIsJpaProject(ejb, JpaFacet.VERSION_2_0);
+ }
+}
14 years, 2 months
JBoss Tools SVN: r38466 - in trunk/as: plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-07 09:49:27 -0500 (Tue, 07 Feb 2012)
New Revision: 38466
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributeNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributesContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContainerNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNodePropertyTester.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ErrorNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributeNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributesContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContainerNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContentNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IErrorNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IResourceNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ITypeNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/RefreshActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ResourceNode.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentTreeContentProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/TypeNode.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java
trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java
trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java
Log:
JBIDE-10799 - contribution by cernich
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -267,7 +267,7 @@
StreamUtils.safeClose(client);
}
- private ModelNode execute(ModelNode node) throws JBoss7ManangerException {
+ /*package*/ ModelNode execute(ModelNode node) throws JBoss7ManangerException {
try {
ModelNode response = client.execute(node);
if (!AS7ManagerUtil.isSuccess(response)) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -13,6 +13,7 @@
import java.io.File;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.dmr.ModelNode;
import org.jboss.ide.eclipse.as.management.core.IAS7ManagementDetails;
import org.jboss.ide.eclipse.as.management.core.IJBoss7DeploymentResult;
import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
@@ -110,7 +111,16 @@
}
}
- @Override
+ public String execute(IAS7ManagementDetails details, String request) throws Exception {
+ AS71Manager manager = new AS71Manager(details);
+ try {
+ return manager.execute(ModelNode.fromJSONString(request)).toJSONString(true);
+ } finally {
+ manager.dispose();
+ }
+ }
+
+ @Override
public void dispose() {
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -124,6 +124,17 @@
* @throws Exception
*/
public void stop(IAS7ManagementDetails details) throws Exception;
+
+ /**
+ * Execute a management command. Note, this method returns the "result" node
+ * from the execution.
+ *
+ * @param details connection details.
+ * @param request a JSON request to process.
+ * @return the JSON response from the server.
+ * @throws Exception
+ */
+ public String execute(IAS7ManagementDetails details, String request) throws Exception;
public void dispose();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -75,7 +75,11 @@
checkedGetService().stop(details);
}
- private IJBoss7ManagerService checkedGetService() throws JBoss7ManangerException {
+ public String execute(IAS7ManagementDetails details, String request) throws Exception {
+ return checkedGetService().execute(details, request);
+ }
+
+ private IJBoss7ManagerService checkedGetService() throws JBoss7ManangerException {
IJBoss7ManagerService service = getService();
if (service == null) {
throw new JBoss7ManangerException("Could not acquire JBoss Management service"); //$NON-NLS-1$
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.management.core;
+
+
+/**
+ * String constants frequently used in model descriptions.
+ *
+ * @author Brian Stansberry
+ */
+public class ModelDescriptionConstants {
+
+ // KEEP THESE IN ALPHABETICAL ORDER!
+
+ /** The key for {@link AttributeAccess.AccessType} fields. */
+ public static final String ACCESS_TYPE = "access-type";
+ public static final String ADD = "add";
+ public static final String ADD_OPERATION = "add-operation";
+ public static final String ADDRESS = "address";
+ public static final String ANY = "any";
+ public static final String ANY_ADDRESS = "any-address";
+ public static final String ANY_IPV4_ADDRESS = "any-ipv4-address";
+ public static final String ANY_IPV6_ADDRESS = "any-ipv6-address";
+ public static final String ATTRIBUTES = "attributes";
+ public static final String AUTO_START = "auto-start";
+ public static final String BYTES = "bytes";
+ public static final String CANCELLED = "cancelled";
+ public static final String CHILD_TYPE = "child-type";
+ public static final String CHILDREN = "children";
+ public static final String COMPOSITE = "composite";
+ public static final String CONCURRENT_GROUPS = "concurrent-groups";
+ public static final String CPU_AFFINITY = "cpu-affinity";
+ public static final String CRITERIA = "criteria";
+ public static final String COMPENSATING_OPERATION = "compensating-operation";
+ public static final String DEFAULT = "default";
+ public static final String DESCRIBE = "describe";
+ public static final String DEFAULT_INTERFACE = "default-interface";
+ public static final String DEPLOY = "deploy";
+ public static final String DEPLOYMENT = "deployment";
+ public static final String DEPLOYMENT_SCANNER = "deployment-scanner";
+ public static final String DESCRIPTION = "description";
+ public static final String DISABLE = "disable";
+ public static final String DOMAIN_CONTROLLER = "domain-controller";
+ public static final String DOMAIN_FAILURE_DESCRIPTION = "domain-failure-description";
+ public static final String DOMAIN_RESULTS = "domain-results";
+ public static final String ENABLE = "enable";
+ public static final String ENABLED = "enabled";
+ public static final String EXTENSION = "extension";
+ public static final String FAILED = "failed";
+ public static final String FAILURE_DESCRIPTION = "failure-description";
+ public static final String FIXED_PORT = "fixed-port";
+ public static final String FULL_REPLACE_DEPLOYMENT = "full-replace-deployment";
+ public static final String GRACEFUL_SHUTDOWN_TIMEOUT = "graceful-shutdown-timeout";
+ public static final String GROUP = "group";
+ public static final String HASH = "hash";
+ public static final String HEAD_COMMENT_ALLOWED = "head-comment-allowed";
+ public static final String HTTP_INTERFACE = "http-interface";
+ public static final String HOST = "host";
+ public static final String HOST_FAILURE_DESCRIPTION = "host-failure-description";
+ public static final String HOST_FAILURE_DESCRIPTIONS = "host-failure-descriptions";
+ public static final String IGNORED = "ignored";
+ public static final String INCLUDE = "include";
+ public static final String INCLUDES = "includes";
+ public static final String INCLUDE_RUNTIME = "include-runtime";
+ public static final String INET_ADDRESS = "inet-address";
+ public static final String INPUT_STREAM_INDEX = "input-stream-index";
+ public static final String INTERFACE = "interface";
+ public static final String IN_SERIES = "in-series";
+ public static final String JVM = "jvm";
+ public static final String JVM_TYPE = "type";
+ public static final String LOCAL = "local";
+ public static final String LOCALE = "locale";
+ public static final String MANAGEMENT_INTERFACES = "management-interfaces";
+ public static final String MASK = "mask";
+ public static final String MAX = "max";
+ public static final String MAX_FAILED_SERVERS = "max-failed-servers";
+ public static final String MAX_FAILURE_PERCENTAGE = "max-failure-percentage";
+ public static final String MAX_LENGTH = "max-length";
+ public static final String MAX_OCCURS = "max-occurs";
+ public static final String MAX_THREADS = "max-threads";
+ public static final String MIN = "min";
+ public static final String MIN_LENGTH = "min-length";
+ public static final String MIN_OCCURS = "min-occurs";
+ public static final String MIN_VALUE = "min-value";
+ public static final String MODEL_DESCRIPTION = "model-description";
+ public static final String MULTICAST_ADDRESS = "multicast-address";
+ public static final String MULTICAST_PORT = "multicast-port";
+ public static final String NAME = "name";
+ public static final String NAMESPACE = "namespace";
+ public static final String NAMESPACES = "namespaces";
+ public static final String NATIVE_INTERFACE = "native-interface";
+ public static final String NETWORK = "network";
+ public static final String NILLABLE = "nillable";
+ public static final String NOT = "not";
+ /** Use this as the standard operation name field in the operation *request* ModelNode */
+ public static final String OP = "operation";
+ /** Use this standard operation address field in the operation *request* ModelNode */
+ public static final String OP_ADDR = "address";
+ public static final String OPERATIONS = "operations";
+ public static final String OPERATION_HEADERS = "operation-headers";
+ /** Use this standard operation address field in the operation *description* ModelNode */
+ public static final String OPERATION_NAME = "operation-name";
+ public static final String OUTCOME = "outcome";
+ public static final String PATH = "path";
+ public static final String PORT = "port";
+ public static final String PORT_OFFSET = "port-offset";
+ public static final String PRIORITY = "priority";
+ public static final String PROFILE = "profile";
+ public static final String PROFILE_NAME = "profile-name";
+ public static final String READ_ATTRIBUTE_OPERATION = "read-attribute";
+ public static final String READ_CHILDREN_NAMES_OPERATION = "read-children-names";
+ public static final String READ_CHILDREN_TYPES_OPERATION = "read-children-types";
+ public static final String READ_CHILDREN_RESOURCES_OPERATION = "read-children-resources";
+ public static final String READ_CONFIG_AS_XML_OPERATION = "read-config-as-xml";
+ public static final String READ_OPERATION_DESCRIPTION_OPERATION = "read-operation-description";
+ public static final String READ_OPERATION_NAMES_OPERATION = "read-operation-names";
+ public static final String READ_RESOURCE_DESCRIPTION_OPERATION = "read-resource-description";
+ public static final String READ_RESOURCE_METRICS = "read-resource-metrics";
+ public static final String READ_RESOURCE_OPERATION = "read-resource";
+ public static final String REDEPLOY = "redeploy";
+ public static final String RELATIVE_TO = "relative-to";
+ public static final String REMOVE = "remove";
+ public static final String REMOTE = "remote";
+ public static final String REPLACE_DEPLOYMENT = "replace-deployment";
+ public static final String REPLY_PROPERTIES = "reply-properties";
+ public static final String REQUEST_PROPERTIES = "request-properties";
+ public static final String RECURSIVE = "recursive";
+ public static final String REQUIRED = "required";
+ public static final String RESPONSE = "response";
+ public static final String RESULT = "result";
+ public static final String ROLLBACK_ACROSS_GROUPS = "rollback-across-groups";
+ public static final String ROLLBACK_FAILURE_DESCRIPTION = "rollback-failure-description";
+ public static final String ROLLBACK_ON_RUNTIME_FAILURE = "rollback-on-runtime-failure";
+ public static final String ROLLED_BACK = "rolled-back";
+ public static final String ROLLING_TO_SERVERS = "rolling-to-servers";
+ public static final String ROLLOUT_PLAN = "rollout-plan";
+ public static final String RUNTIME_NAME = "runtime-name";
+ public static final String RUNNING_SERVER = "server";
+ public static final String SCANNER = "scanner";
+ public static final String SCAN_ENABLED = "scan-enabled";
+ public static final String SCAN_INTERVAL = "scan-interval";
+ public static final String SCHEMA_LOCATION = "schema-location";
+ public static final String SCHEMA_LOCATIONS = "schema-locations";
+ public static final String SERVER = "server";
+ public static final String SERVERS = "servers";
+ public static final String SERVER_CONFIG = "server-config";
+ public static final String SERVER_GROUP = "server-group";
+ public static final String SERVER_GROUPS = "server-groups";
+ public static final String SERVER_OPERATIONS = "server-operations";
+ public static final String SERVER_STATE = "server-state";
+ public static final String SHUTDOWN = "shutdown";
+ public static final String SOCKET_BINDING = "socket-binding";
+ public static final String SOCKET_BINDING_GROUP = "socket-binding-group";
+ public static final String SOCKET_BINDING_GROUP_NAME = "socket-binding-group-name";
+ public static final String SOCKET_BINDING_PORT_OFFSET = "socket-binding-port-offset";
+ public static final String START = "start";
+ public static final String STEPS = "steps";
+ /** The key for {@link AttributeAccess.Storage} fields. */
+ public static final String STORAGE = "storage";
+ public static final String SUBSYSTEM = "subsystem";
+ public static final String SUCCESS = "success";
+ public static final String SYSTEM_PROPERTY = "system-property";
+ public static final String SYSTEM_PROPERTIES = "system-properties";
+ public static final String TAIL_COMMENT_ALLOWED = "tail-comment-allowed";
+ public static final String TO_REPLACE = "to-replace";
+ public static final String TYPE = "type";
+ public static final String UNDEPLOY = "undeploy";
+ public static final String UPLOAD_DEPLOYMENT_BYTES = "upload-deployment-bytes";
+ public static final String UPLOAD_DEPLOYMENT_URL = "upload-deployment-url";
+ public static final String UPLOAD_DEPLOYMENT_STREAM = "upload-deployment-stream";
+ public static final String URL = "url";
+ public static final String VALUE = "value";
+ public static final String VALUE_TYPE = "value-type";
+ public static final String WRITE_ATTRIBUTE_OPERATION = "write-attribute";
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-02-07 14:49:27 UTC (rev 38466)
@@ -56,7 +56,8 @@
org.jboss.ide.eclipse.as.wtp.core;bundle-version="2.3.0",
org.eclipse.jst.common.project.facet.core;bundle-version="1.4.200",
org.eclipse.wst.common.emfworkbench.integration;bundle-version="1.2.100",
- org.jboss.ide.eclipse.as.management.core;bundle-version="1.0.0"
+ org.jboss.ide.eclipse.as.management.core;bundle-version="1.0.0",
+ org.jboss.ide.eclipse.as.dmr;bundle-version="2.3.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.console,
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -270,6 +270,23 @@
public static String ServerJavaArgsSyncText;
public static String ServerJavaArgsSyncDesc;
+ public static String ServerContent_Type_root;
+ public static String ServerContent_Type_attributes;
+ public static String ServerContent_Type_core_service;
+ public static String ServerContent_Type_deployment;
+ public static String ServerContent_Type_extension;
+ public static String ServerContent_Type_interface;
+ public static String ServerContent_Type_path;
+ public static String ServerContent_Type_socket_binding_group;
+ public static String ServerContent_Type_subsystem;
+ public static String ServerContent_Type_system_property;
+ public static String ServerContent_Value_undefined;
+ public static String ServerContent_Label_Attribute_Value;
+ public static String ServerContent_Label_Loading;
+ public static String ServerContent_Label_Not_Connected;
+ public static String ServerContent_Label_Retrieval_Error;
+ public static String ServerContent_Job_Title;
+
static {
NLS.initializeMessages(BUNDLE_NAME,
Messages.class);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2012-02-07 14:49:27 UTC (rev 38466)
@@ -243,4 +243,22 @@
ServerAlreadyStartedDialog_Launch=Launch a new instance anyway
ServerJavaArgsSyncText=Always update arguments related to the runtime.
-ServerJavaArgsSyncDesc=Some values on this tab refer to the server's runtime location. JBossTools may attempt to update some program and vm arguments.
\ No newline at end of file
+ServerJavaArgsSyncDesc=Some values on this tab refer to the server's runtime location. JBossTools may attempt to update some program and vm arguments.
+
+#Server content labels
+ServerContent_Type_root=Server Details
+ServerContent_Type_attributes=Attributes
+ServerContent_Type_core_service=Core Services
+ServerContent_Type_deployment=Deployments
+ServerContent_Type_extension=Extensions
+ServerContent_Type_interface=Interfaces
+ServerContent_Type_path=Paths
+ServerContent_Type_socket_binding_group=Socket Binding Groups
+ServerContent_Type_subsystem=Subsystems
+ServerContent_Type_system_property=System Properties
+ServerContent_Value_undefined=<undefined>
+ServerContent_Label_Attribute_Value={0} \: {1}
+ServerContent_Label_Loading=Loading...
+ServerContent_Label_Not_Connected=Not Connected
+ServerContent_Label_Retrieval_Error=Error retrieving children
+ServerContent_Job_Title=Retrieving information from the server
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributeNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributeNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributeNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * AttributeNode
+ *
+ * <p/>
+ * Represents and attribute of a resource.
+ *
+ * @author Rob Cernich
+ */
+public class AttributeNode extends ContentNode<IAttributesContainer> implements IAttributeNode {
+
+ private final String value;
+
+ protected AttributeNode(IAttributesContainer parent, String name, String value) {
+ super(parent, name);
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributesContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributesContainer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/AttributesContainer.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.READ_RESOURCE_OPERATION;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
+import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
+
+/**
+ * AttributesContainer
+ *
+ * <p/>
+ * Container node for resource attributes.
+ *
+ * @author Rob Cernich
+ */
+public class AttributesContainer extends ContainerNode<IResourceNode> implements IAttributesContainer {
+
+ private List<String> attributeNames;
+ private List<IAttributeNode> attributes;
+
+ /**
+ * Create a new AttributesContainer.
+ *
+ * @param parent
+ * @param name
+ */
+ protected AttributesContainer(IResourceNode parent, List<String> attributeNames) {
+ super(parent, ATTRIBUTES_TYPE);
+ this.attributeNames = attributeNames;
+ }
+
+ protected List<IAttributeNode> delegateGetChildren() {
+ return attributes;
+ }
+
+ protected void delegateClearChildren() {
+ if (attributes != null) {
+ for (IAttributeNode attribute : attributes) {
+ attribute.dispose();
+ }
+ attributes.clear();
+ attributes = null;
+ }
+ }
+
+ public void dispose() {
+ attributeNames.clear();
+ super.dispose();
+ }
+
+ protected void delegateLoad() throws Exception {
+ String resultJSON = JBoss7ManagerUtil.executeWithService(new JBoss7ManagerUtil.IServiceAware<String>() {
+ public String execute(IJBoss7ManagerService service) throws Exception {
+ return service.execute(new AS7ManagementDetails(getServer()), createResourceRequest());
+ }
+ }, getServer());
+ ModelNode result = ModelNode.fromJSONString(resultJSON);
+ attributes = new ArrayList<IAttributeNode>(attributeNames.size());
+ for (String name : attributeNames) {
+ if (result.hasDefined(name)) {
+ attributes.add(new AttributeNode(this, name, result.get(name).asString()));
+ } else {
+ attributes.add(new AttributeNode(this, name, null));
+ }
+ }
+ }
+
+ private String createResourceRequest() {
+ ModelNode request = new ModelNode();
+ request.get(OP).set(READ_RESOURCE_OPERATION);
+ request.get(OP_ADDR).set(getManagementAddress(getParent()));
+ return request.toJSONString(true);
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContainerNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContainerNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContainerNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+/**
+ * ContainerNode
+ *
+ * <p>
+ * Abstract implementation of a container node. Delegates loading and takes care
+ * of error handling.
+ *
+ * @author Rob Cernich
+ */
+public abstract class ContainerNode<T extends IContainerNode<?>> extends ContentNode<T> implements IContainerNode<T> {
+
+ private IErrorNode error;
+
+ protected ContainerNode(IServer server, String name) {
+ super(server, name);
+ }
+
+ protected ContainerNode(T container, String name) {
+ super(container, name);
+ }
+
+ public final List<? extends IContentNode<?>> getChildren() {
+ if (error != null) {
+ return Collections.singletonList(error);
+ }
+ return delegateGetChildren();
+ }
+
+ public final void clearChildren() {
+ clearError();
+ delegateClearChildren();
+ }
+
+ protected void setError(IErrorNode error) {
+ clearError();
+ this.error = error;
+ }
+
+ @Override
+ public void dispose() {
+ clearChildren();
+ super.dispose();
+ }
+
+ public final void load() {
+ if (getServer().getServerState() != IServer.STATE_STARTED) {
+ setError(new ErrorNode(this, Messages.ServerContent_Label_Not_Connected));
+ return;
+ }
+ try {
+ delegateLoad();
+ clearError();
+ } catch (Exception e) {
+ setError(new ErrorNode(this, Messages.ServerContent_Label_Retrieval_Error));
+ }
+ }
+
+ protected abstract List<? extends IContentNode<?>> delegateGetChildren();
+
+ protected abstract void delegateClearChildren();
+
+ protected abstract void delegateLoad() throws Exception;
+
+ private void clearError() {
+ if (error != null) {
+ error.dispose();
+ error = null;
+ }
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import java.util.Deque;
+import java.util.LinkedList;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * ContentNode
+ *
+ * <p/>
+ * Base implementation of IContentNode.
+ *
+ * @author Rob Cernich
+ */
+public class ContentNode<T extends IContainerNode<?>> implements IContentNode<T> {
+
+ /** The path separator for addresses. */
+ public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
+
+ private final IServer server;
+ private IResourceNode parent;
+ private T container;
+ private final String name;
+
+ protected ContentNode(IServer server, String name) {
+ this.server = server;
+ this.parent = null;
+ this.container = null;
+ this.name = name;
+ }
+
+ protected ContentNode(T container, String name) {
+ this.server = container.getServer();
+ this.parent = container instanceof IResourceNode ? (IResourceNode) container : container.getParent();
+ this.container = container;
+ this.name = name;
+ }
+
+ public IResourceNode getParent() {
+ return parent;
+ }
+
+ public T getContainer() {
+ return container;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getAddress() {
+ return getParent().getAddress() + PATH_SEPARATOR + getName();
+ }
+
+ public IServer getServer() {
+ return server;
+ }
+
+ public void dispose() {
+ container = null;
+ parent = null;
+ }
+
+ /**
+ * Constructs an address list that can be used in an operation request.
+ *
+ * @param resource the resource being addressed
+ * @return a model node containing the list of addresses to the resource.
+ */
+ protected static ModelNode getManagementAddress(IResourceNode resource) {
+ ModelNode address = new ModelNode();
+ Deque<IResourceNode> resources = new LinkedList<IResourceNode>();
+ resources.push(resource);
+ for (IResourceNode parent = resource.getParent(); parent != null; parent = parent.getParent()) {
+ resources.push(parent);
+ }
+ do {
+ resource = resources.pop();
+ ITypeNode type = resource.getContainer();
+ if (type != null) {
+ address.add(type.getName(), resource.getName());
+ }
+ } while (!resources.isEmpty());
+ return address;
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNodePropertyTester.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNodePropertyTester.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ContentNodePropertyTester.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import org.eclipse.core.expressions.PropertyTester;
+
+/**
+ * ContentNodePropertyTester
+ *
+ * <p/>
+ * A property tester for use with IContentNode.
+ *
+ * @author Rob Cernich
+ */
+public class ContentNodePropertyTester extends PropertyTester {
+
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (!(receiver instanceof IContentNode<?>) || expectedValue == null) {
+ return false;
+ }
+ IContentNode<?> node = (IContentNode<?>)receiver;
+ if ("nodeName".equals(property)) { //$NON-NLS-1$
+ return node.getName().matches(expectedValue.toString());
+ } else if ("nodeAddress".equals(property)) { //$NON-NLS-1$
+ return node.getAddress().matches(expectedValue.toString());
+ }
+ return false;
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ErrorNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ErrorNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ErrorNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * ErrorNode
+ *
+ * <p/>
+ * Represents an error that occurred while attempting to retrieve a resource's
+ * children.
+ *
+ * @author Rob Cernich
+ */
+public class ErrorNode extends ContentNode<IContainerNode<?>> implements IErrorNode {
+
+ public static final String ERROR_TYPE = "error"; //$NON-NLS-1$
+
+ private final String text;
+
+ protected ErrorNode(IContainerNode<?> container, String text) {
+ super(container, ERROR_TYPE);
+ this.text = text;
+ }
+
+ public String getText() {
+ return text;
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributeNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributeNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributeNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * IAttributeNode
+ *
+ * <p/>
+ * Represents an attribute in the management tree.
+ *
+ * @author Rob Cernich
+ */
+public interface IAttributeNode extends IContentNode<IAttributesContainer> {
+
+ /** Represents a value that is null. */
+ public static final String UNDEFINED_VALUE = "undefined"; //$NON-NLS-1$
+
+ /**
+ * @return the value of the attribute; may be null.
+ */
+ public String getValue();
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributesContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributesContainer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IAttributesContainer.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * IAttributesContainer
+ *
+ * <p/>
+ * Simple intermediary for a resource's attributes.
+ *
+ * @author Rob Cernich
+ */
+public interface IAttributesContainer extends IContainerNode<IResourceNode> {
+
+ /**
+ * Represents the type for the attributes container. Can be used in an
+ * address, e.g. /subsystem=foo/attributes.
+ */
+ public static final String ATTRIBUTES_TYPE = "attributes"; //$NON-NLS-1$
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContainerNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContainerNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContainerNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import java.util.List;
+
+/**
+ * IContainerNode
+ *
+ * <p/>
+ * Base interface for container (non-leaf) nodes.
+ *
+ * @author Rob Cernich
+ */
+public interface IContainerNode<T extends IContainerNode<?>> extends IContentNode<T> {
+
+ /**
+ * @return the children of this container.
+ */
+ public List<? extends IContentNode<?>> getChildren();
+
+ /**
+ * Loads the content of this container. This method is invoked by the
+ * content provider if getChildren() returns null.
+ */
+ public void load();
+
+ /**
+ * Clears the children of this container. After this method has been
+ * invoked, getChildren() must return null. This method is called when a
+ * refresh is requested.
+ */
+ public void clearChildren();
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContentNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContentNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IContentNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import org.eclipse.wst.server.core.IServer;
+
+/**
+ * IContentNode
+ *
+ * <p/>
+ * Base type for server content.
+ *
+ * @author Rob Cernich
+ */
+public interface IContentNode<T extends IContainerNode<?>> {
+
+ /**
+ * @return returns the server containing this node.
+ */
+ public IServer getServer();
+
+ /**
+ * @return the resource containing this node, if any.
+ */
+ public IResourceNode getParent();
+
+ /**
+ * @return the containing node.
+ */
+ public T getContainer();
+
+ /**
+ * @return the name of this node.
+ */
+ public String getName();
+
+ /**
+ * @return this node's addres, e.g. /subsystem=foo
+ */
+ public String getAddress();
+
+ /**
+ * Frees any resources held by this node.
+ */
+ public void dispose();
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IErrorNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IErrorNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IErrorNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * IErrorNode
+ *
+ * <p/>
+ * Represents an error that occurred while loading a container's contents.
+ *
+ * @author Rob Cernich
+ */
+public interface IErrorNode extends IContentNode<IContainerNode<?>> {
+
+ /**
+ * @return the error text.
+ */
+ public String getText();
+
+}
\ No newline at end of file
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IResourceNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IResourceNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/IResourceNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * IResourceNode
+ *
+ * <p/>
+ * Represents a resource in the management tree. A resource may contain
+ * attributes, system metrics, as well as other types of resources.
+ *
+ * @author Rob Cernich
+ */
+public interface IResourceNode extends IContainerNode<ITypeNode> {
+
+ /** Represents the root of the management tree. */
+ public static final String ROOT_TYPE = "root"; //$NON-NLS-1$
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ITypeNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ITypeNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ITypeNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+/**
+ * ITypeNode
+ *
+ * <p/>
+ * Represents a container for a specific type of child resources.
+ *
+ * @author Rob Cernich
+ */
+public interface ITypeNode extends IContainerNode<IResourceNode> {
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/RefreshActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/RefreshActionProvider.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/RefreshActionProvider.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.actions.SelectionProviderAction;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+
+/**
+ * RefreshActionProvider
+ *
+ * <p/>
+ * Provides a refresh action for IContainer nodes.
+ *
+ * @author Rob Cernich
+ */
+@SuppressWarnings("restriction")
+public class RefreshActionProvider extends CommonActionProvider {
+
+ private RefreshAction refreshAction;
+
+ public RefreshActionProvider() {
+ }
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ refreshAction = new RefreshAction(aSite.getStructuredViewer());
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ menu.add(refreshAction);
+ }
+
+ public void dispose() {
+ if (refreshAction != null) {
+ refreshAction.dispose();
+ refreshAction = null;
+ }
+ super.dispose();
+ }
+
+ private class RefreshAction extends SelectionProviderAction {
+
+ public RefreshAction(ISelectionProvider selectionProvider) {
+ super(selectionProvider, WorkbenchMessages.Workbench_refresh);
+ }
+
+ public void run() {
+ IStructuredSelection selection = getStructuredSelection();
+ if (selection == null || selection.isEmpty()) {
+ return;
+ }
+ IContainerNode<?> container = (IContainerNode<?>) ((IStructuredSelection) selection).getFirstElement();
+ container.clearChildren();
+ RefreshActionProvider.this.getActionSite().getStructuredViewer().refresh(container);
+ }
+
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ResourceNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ResourceNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ResourceNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.CHILDREN;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.READ_RESOURCE_DESCRIPTION_OPERATION;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.dmr.ModelNode;
+import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
+import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
+
+/**
+ * ResourceNode
+ *
+ * <p/>
+ * Implementation of a resource node.
+ *
+ * @author Rob Cernich
+ */
+public class ResourceNode extends ContainerNode<ITypeNode> implements IResourceNode {
+
+ private ArrayList<IContentNode<? extends IContainerNode<?>>> children;
+
+ protected ResourceNode(ITypeNode parent, String name) {
+ super(parent, name);
+ }
+
+ protected ResourceNode(IServer server, String name) {
+ super(server, name);
+ }
+
+ public String getAddress() {
+ if (getParent() == null) {
+ // special handling for root node
+ return ""; //$NON-NLS-1$
+ }
+ return getParent().getAddress() + PATH_SEPARATOR + getContainer().getName() + "=" + getName(); //$NON-NLS-1$
+ }
+
+ protected List<IContentNode<? extends IContainerNode<?>>> delegateGetChildren() {
+ return children;
+ }
+
+ protected void delegateClearChildren() {
+ if (children != null) {
+ for (IContentNode<? extends IContainerNode<?>> child : children) {
+ child.dispose();
+ }
+ children.clear();
+ children = null;
+ }
+ }
+
+ protected void delegateLoad() throws Exception {
+ String resultJSON = JBoss7ManagerUtil.executeWithService(new JBoss7ManagerUtil.IServiceAware<String>() {
+ public String execute(IJBoss7ManagerService service) throws Exception {
+ return service.execute(new AS7ManagementDetails(getServer()), createResourceDescriptionRequest());
+ }
+ }, getServer());
+ ModelNode result = ModelNode.fromJSONString(resultJSON);
+ children = new ArrayList<IContentNode<? extends IContainerNode<?>>>();
+ if (result.hasDefined(ATTRIBUTES)) {
+ populateAttributes(result.get(ATTRIBUTES).asObject());
+ }
+ if (result.hasDefined(CHILDREN)) {
+ populateTypes(result.get(CHILDREN).asObject());
+ }
+ if (children.size() == 1) {
+ IContentNode<? extends IContainerNode<?>> child = children.get(0);
+ if (child instanceof IAttributesContainer) {
+ // collapse the attributes container if it's the only child.
+ IAttributesContainer attributesContainer = (IAttributesContainer) child;
+ children.clear();
+ attributesContainer.load();
+ children.addAll(attributesContainer.getChildren());
+ }
+ }
+ }
+
+ private String createResourceDescriptionRequest() {
+ ModelNode request = new ModelNode();
+ request.get(OP).set(READ_RESOURCE_DESCRIPTION_OPERATION);
+ request.get(OP_ADDR).set(getManagementAddress(this));
+ return request.toJSONString(true);
+ }
+
+ private void populateAttributes(ModelNode result) {
+ Set<String> keys = result.keys();
+ if (keys.size() > 0) {
+ children.add(new AttributesContainer(this, new ArrayList<String>(keys)));
+ }
+ }
+
+ private void populateTypes(ModelNode result) {
+ Set<String> keys = result.keys();
+ children.ensureCapacity(children.size() + keys.size());
+ for (String key : keys) {
+ children.add(new TypeNode(this, key));
+ }
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentLabelProvider.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentLabelProvider.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * ServerContentLabelProvider
+ *
+ * <p/>
+ * Label provider implementation for content nodes.
+ *
+ * @author Rob Cernich
+ */
+public class ServerContentLabelProvider extends LabelProvider {
+
+ /**
+ * Maps node names to any label that should be used.
+ * <p/>
+ * TODO: this should probably be contributed by an extension,, which should
+ * provide icons as well.
+ */
+ private static Map<String, String> LABELS;
+
+ public String getText(Object element) {
+ if (element instanceof IAttributeNode) {
+ IAttributeNode attrNode = (IAttributeNode) element;
+ String value = attrNode.getValue();
+ if (value == null || IAttributeNode.UNDEFINED_VALUE.equals(value)) {
+ value = Messages.ServerContent_Value_undefined;
+ }
+ return MessageFormat.format(Messages.ServerContent_Label_Attribute_Value, attrNode.getName(), value);
+ } else if (element instanceof IErrorNode) {
+ return ((IErrorNode) element).getText();
+ } else if (element instanceof IContentNode) {
+ return getMappedName(((IContentNode<?>) element).getName());
+ } else if (element == ServerContentTreeContentProvider.PENDING) {
+ return Messages.ServerContent_Label_Loading;
+ }
+ return super.getText(element);
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof IContainerNode<?>) {
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
+ } else if (element instanceof IErrorNode) {
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+ } else if (element instanceof IContentNode<?>) {
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
+ }
+ return super.getImage(element);
+ }
+
+ private String getMappedName(String name) {
+ if (name == null) {
+ return Messages.ServerContent_Value_undefined;
+ }
+ if (LABELS.containsKey(name)) {
+ return LABELS.get(name);
+ }
+ return name;
+ }
+
+ static {
+ LABELS = new HashMap<String, String>();
+ LABELS.put(IAttributesContainer.ATTRIBUTES_TYPE, Messages.ServerContent_Type_attributes);
+ LABELS.put("core-service", Messages.ServerContent_Type_core_service); //$NON-NLS-1$
+ LABELS.put("deployment", Messages.ServerContent_Type_deployment); //$NON-NLS-1$
+ LABELS.put("extension", Messages.ServerContent_Type_extension); //$NON-NLS-1$
+ LABELS.put("interface", Messages.ServerContent_Type_interface); //$NON-NLS-1$
+ LABELS.put("path", Messages.ServerContent_Type_path); //$NON-NLS-1$
+ LABELS.put(IResourceNode.ROOT_TYPE, Messages.ServerContent_Type_root);
+ LABELS.put("socket-binding-group", Messages.ServerContent_Type_socket_binding_group); //$NON-NLS-1$
+ LABELS.put("subsystem", Messages.ServerContent_Type_subsystem); //$NON-NLS-1$
+ LABELS.put("system-property", Messages.ServerContent_Type_system_property); //$NON-NLS-1$
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentTreeContentProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentTreeContentProvider.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/ServerContentTreeContentProvider.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+/**
+ * ServerContentTreeContentProvider
+ *
+ * <p/>
+ * Content provider implementation for server management details.
+ *
+ * @author Rob Cernich
+ */
+public class ServerContentTreeContentProvider implements ITreeContentProvider {
+
+ /** Represents a pending request in the tree. */
+ static final Object PENDING = new Object();
+ private ConcurrentMap<IContainerNode<?>, Object> pendingUpdates = new ConcurrentHashMap<IContainerNode<?>, Object>();
+ private transient TreeViewer viewer;
+
+ /**
+ * Loads content for specified nodes, then refreshes the content in the
+ * tree.
+ */
+ private Job loadElementJob = new Job(Messages.ServerContent_Job_Title) {
+ public boolean shouldRun() {
+ return pendingUpdates.size() > 0;
+ }
+
+ protected IStatus run(final IProgressMonitor monitor) {
+ monitor.beginTask(Messages.ServerContent_Job_Title, IProgressMonitor.UNKNOWN);
+ try {
+ final List<IContainerNode<?>> updatedNodes = new ArrayList<IContainerNode<?>>(pendingUpdates.size());
+ for (IContainerNode<?> node : pendingUpdates.keySet()) {
+ try {
+ node.load();
+ updatedNodes.add(node);
+ } catch (Exception e) {
+ }
+ if (monitor.isCanceled()) {
+ pendingUpdates.keySet().removeAll(updatedNodes);
+ return Status.CANCEL_STATUS;
+ }
+ }
+ final TreeViewer viewer = ServerContentTreeContentProvider.this.viewer;
+ if (viewer == null) {
+ pendingUpdates.keySet().clear();
+ } else {
+ viewer.getTree().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (viewer.getTree().isDisposed()) {
+ return;
+ }
+ for (IContainerNode<?> node : updatedNodes) {
+ pendingUpdates.remove(node);
+ viewer.refresh(node);
+ }
+ }
+ });
+ }
+ } finally {
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+ };
+
+ public void dispose() {
+ viewer = null;
+ loadElementJob.cancel();
+ pendingUpdates.clear();
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (viewer instanceof TreeViewer) {
+ this.viewer = (TreeViewer) viewer;
+ } else {
+ viewer = null;
+ }
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof IServer) {
+ return new Object[] {new ResourceNode((IServer) parentElement, IResourceNode.ROOT_TYPE) };
+ } else if (parentElement instanceof IContainerNode) {
+ IContainerNode<?> container = (IContainerNode<?>) parentElement;
+ if (pendingUpdates.containsKey(container)) {
+ return new Object[] {PENDING };
+ }
+ List<? extends IContentNode<?>> children = container.getChildren();
+ if (children == null) {
+ pendingUpdates.putIfAbsent(container, PENDING);
+ loadElementJob.schedule();
+ return new Object[] {PENDING };
+ }
+ return children.toArray();
+ }
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ if (element instanceof IContentNode) {
+ Object parent = ((IContentNode<?>) element).getContainer();
+ if (parent == null) {
+ parent = ((IContentNode<?>) element).getServer();
+ }
+ return parent;
+ }
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element instanceof IServer) {
+ return true;
+ } else if (element instanceof IContainerNode) {
+ return true;
+ }
+ return false;
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/TypeNode.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/TypeNode.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/as7/management/content/TypeNode.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.as7.management.content;
+
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.CHILD_TYPE;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
+import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
+
+/**
+ * TypeNode
+ *
+ * <p/>
+ * Implementation of ITypeNode. Loads child names for a specific resource
+ * child-type.
+ *
+ * @author Rob Cernich
+ */
+public class TypeNode extends ContainerNode<IResourceNode> implements ITypeNode {
+
+ private List<IResourceNode> resources;
+
+ protected TypeNode(IResourceNode container, String name) {
+ super(container, name);
+ }
+
+ protected List<IResourceNode> delegateGetChildren() {
+ return resources;
+ }
+
+ protected void delegateClearChildren() {
+ if (resources != null) {
+ for (IResourceNode resource : resources) {
+ resource.dispose();
+ }
+ resources.clear();
+ resources = null;
+ }
+ }
+
+ protected void delegateLoad() throws Exception {
+ String resultJSON = JBoss7ManagerUtil.executeWithService(new JBoss7ManagerUtil.IServiceAware<String>() {
+ public String execute(IJBoss7ManagerService service) throws Exception {
+ return service.execute(new AS7ManagementDetails(getServer()), createResourceNamesRequest());
+ }
+ }, getServer());
+ // process the results
+ ModelNode result = ModelNode.fromJSONString(resultJSON);
+ List<ModelNode> childResources = result.asList();
+ resources = new ArrayList<IResourceNode>(childResources.size());
+ for (ModelNode child : childResources) {
+ resources.add(new ResourceNode(this, child.asString()));
+ }
+ }
+
+ private String createResourceNamesRequest() {
+ ModelNode request = new ModelNode();
+ request.get(OP).set(READ_CHILDREN_NAMES_OPERATION);
+ request.get(CHILD_TYPE).set(getName());
+ request.get(OP_ADDR).set(getManagementAddress(getParent()));
+ return request.toJSONString(true);
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2012-02-07 14:49:27 UTC (rev 38466)
@@ -22,6 +22,7 @@
NavigatorContent_ServersViewDefaultContent=Servers View Default Content
NavigatorContent_XMLConfiguration=XML Configuration
NavigatorContent_JMX=JMX
+NavigatorContent_ServerContent=Server Content
# NEW_SERVER_ADAPTER Add the new server and runtime ids to the constants below this line when applicable
AllJBossRuntimeTypes=org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.70,org.jboss.ide.eclipse.as.runtime.71,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50,org.jboss.ide.eclipse.as.runtime.eap.60
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2012-02-07 14:49:27 UTC (rev 38466)
@@ -499,4 +499,129 @@
</client>
</extension>
+ <!-- AS v7+ specific server content -->
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="org.jboss.ide.eclipse.as.ui.views.as7.management.content.ServerContentTreeContentProvider"
+ id="org.jboss.ide.eclipse.as.ui.extensions.content"
+ labelProvider="org.jboss.ide.eclipse.as.ui.views.as7.management.content.ServerContentLabelProvider"
+ name="%NavigatorContent_ServerContent"
+ priority="normal">
+ <triggerPoints>
+ <and>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ <or>
+ <test
+ property="org.eclipse.wst.server.ui.serverType"
+ value="org.jboss.ide.eclipse.as.70">
+ </test>
+ <test
+ property="org.eclipse.wst.server.ui.serverType"
+ value="org.jboss.ide.eclipse.as.71">
+ </test>
+ <test
+ property="org.eclipse.wst.server.ui.serverType"
+ value="org.jboss.ide.eclipse.as.eap.60">
+ </test>
+ </or>
+ </and>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof
+ value="org.jboss.ide.eclipse.as.ui.views.as7.management.content.IContentNode">
+ </instanceof>
+ </possibleChildren>
+ </navigatorContent>
+ <actionProvider
+ class="org.jboss.ide.eclipse.as.ui.views.as7.management.content.RefreshActionProvider"
+ id="org.jboss.ide.eclipse.as.ui.extensions.content.container">
+ <enablement>
+ <instanceof
+ value="org.jboss.ide.eclipse.as.ui.views.as7.management.content.IContainerNode">
+ </instanceof>
+ </enablement>
+ </actionProvider>
+ <commonFilter
+ activeByDefault="true"
+ id="org.jboss.ide.eclipse.as.ui.extensions.content.filter.extensions"
+ name="JBoss AS7 Extensions Details"
+ visibleInUI="true">
+ <filterExpression>
+ <and>
+ <instanceof
+ value="org.jboss.ide.eclipse.as.ui.views.as7.management.content.IContentNode">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.jboss.ide.eclipse.as.ui.extensions.content.nodeAddress"
+ value="/extension">
+ </test>
+ </and>
+ </filterExpression>
+ </commonFilter>
+ <commonFilter
+ activeByDefault="true"
+ id="org.jboss.ide.eclipse.as.ui.extensions.content.filter.deployment.artifact.details"
+ name="JBoss AS7 Deployment Artifact Details"
+ visibleInUI="true">
+ <filterExpression>
+ <and>
+ <instanceof
+ value="org.jboss.ide.eclipse.as.ui.views.as7.management.content.IContentNode">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.jboss.ide.eclipse.as.ui.extensions.content.nodeAddress"
+ value="/deployment=.+/(subsystem|subdeployment|attributes)">
+ </test>
+ </and>
+ </filterExpression>
+ </commonFilter>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.wst.server.ui.ServersView">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.content">
+ </contentExtension>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.content.filter.*">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding
+ viewerId="org.eclipse.wst.server.ui.ServersView">
+ <includes>
+ <actionExtension
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.content.*"/>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.jboss.ide.eclipse.as.ui.views.as7.management.content.ContentNodePropertyTester"
+ id="org.jboss.ide.eclipse.as.ui.extensions.content.propertyTester1"
+ namespace="org.jboss.ide.eclipse.as.ui.extensions.content"
+ properties="nodeName"
+ type="org.jboss.ide.eclipse.as.ui.views.as7.management.content.IContentNode">
+ </propertyTester>
+ <propertyTester
+ class="org.jboss.ide.eclipse.as.ui.views.as7.management.content.ContentNodePropertyTester"
+ id="org.jboss.ide.eclipse.as.ui.extensions.content.propertyTester2"
+ namespace="org.jboss.ide.eclipse.as.ui.extensions.content"
+ properties="nodeAddress"
+ type="org.jboss.ide.eclipse.as.ui.views.as7.management.content.IContentNode">
+ </propertyTester>
+ </extension>
</plugin>
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java 2012-02-07 14:42:48 UTC (rev 38465)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/JBossManagerTest.java 2012-02-07 14:49:27 UTC (rev 38466)
@@ -74,6 +74,9 @@
private static class JBoss71Manager implements IJBoss7ManagerService {
+ public String execute(IAS7ManagementDetails details, String request) throws Exception {
+ throw new UnsupportedOperationException();
+ }
public IJBoss7DeploymentResult deployAsync(IAS7ManagementDetails details, String deploymentName, File file,
IProgressMonitor monitor) throws JBoss7ManangerException {
throw new UnsupportedOperationException();
14 years, 2 months
JBoss Tools SVN: r38465 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-02-07 09:42:48 -0500 (Tue, 07 Feb 2012)
New Revision: 38465
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
https://issues.jboss.org/browse/JBIDE-8701 - code adjustment.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2012-02-07 14:35:37 UTC (rev 38464)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2012-02-07 14:42:48 UTC (rev 38465)
@@ -435,10 +435,6 @@
*/
selectionManager.setUpdateSelectionEventFlag(false);
}
-
- private ScrollBar getSourceEditorVerticalScrollBar() {
- return sourceEditorVerticalScrollBar;
- }
private void removeSourceScrollListener() {
if (sourceEditorVerticalScrollBar != null && sourceScrollSelectionListener != null) {
14 years, 2 months
JBoss Tools SVN: r38464 - in trunk/maven/plugins/org.jboss.tools.maven.jpa: src/org/jboss/tools/maven/jpa/configurators and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-07 09:35:37 -0500 (Tue, 07 Feb 2012)
New Revision: 38464
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jpa/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JpaProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java
Log:
JBIDE-10750 : cleanup
Modified: trunk/maven/plugins/org.jboss.tools.maven.jpa/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jpa/lifecycle-mapping-metadata.xml 2012-02-07 14:31:09 UTC (rev 38463)
+++ trunk/maven/plugins/org.jboss.tools.maven.jpa/lifecycle-mapping-metadata.xml 2012-02-07 14:35:37 UTC (rev 38464)
@@ -9,7 +9,6 @@
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
- <goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
Modified: trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JpaProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JpaProjectConfigurator.java 2012-02-07 14:31:09 UTC (rev 38463)
+++ trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JpaProjectConfigurator.java 2012-02-07 14:35:37 UTC (rev 38464)
@@ -81,7 +81,7 @@
MavenUtil.refreshParent(request.getMavenProject());
configureFacets(monitor, project, facetedProject, persistenceXml);
- }
+ }
}
private void configureFacets(IProgressMonitor monitor, IProject project,
Modified: trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java 2012-02-07 14:31:09 UTC (rev 38463)
+++ trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java 2012-02-07 14:35:37 UTC (rev 38464)
@@ -32,12 +32,12 @@
import org.eclipse.jpt.common.core.internal.resource.SimpleJavaResourceLocator;
import org.eclipse.jpt.common.core.internal.resource.WebModuleResourceLocator;
import org.eclipse.jpt.common.core.resource.ResourceLocator;
-import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
/**
@@ -49,6 +49,8 @@
public class MavenResourceLocator implements ResourceLocator {
private static IPath META_INF_PATH = new Path("META-INF");
+
+ private static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet("jst.web");
/**
* Accepts all resources not under the build output and test build output
@@ -69,6 +71,7 @@
}
} else {
// Maven project not loaded yet, fallback to default behaviour.
+ //System.err.println(project + " not loaded");
accept = getDelegate(project).acceptResourceLocation(project, container);
}
// Sometimes src/main/resources/META-INF is not even sent immediately to
@@ -84,7 +87,7 @@
if (ModuleCoreNature.isFlexibleProject(project)) {
try {
IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if (facetedProject != null && facetedProject.hasProjectFacet(WebFacetUtils.WEB_FACET)) {
+ if (facetedProject != null && facetedProject.hasProjectFacet(WEB_FACET)) {
return new WebModuleResourceLocator();
}
} catch (CoreException e) {
@@ -131,8 +134,7 @@
// System.err.println("getResourcePath (" + project + ", " + runtimePath
// + ") = " + resourcePath);
if (resourcePath == null) {
- resourcePath = getDelegate(project).getResourcePath(project,
- runtimePath);
+ resourcePath = getDelegate(project).getResourcePath(project, runtimePath);
}
return resourcePath;
}
@@ -197,12 +199,13 @@
* Returns the cached IMavenProjectFacade in m2e's project registry
*/
private IMavenProjectFacade getMavenProjectFacade(IProject project) {
- return MavenPlugin.getMavenProjectRegistry().create(project.getFile(IMavenConstants.POM_FILE_NAME), true, new NullProgressMonitor());
+ return MavenPlugin.getMavenProjectRegistry().create(project.getFile(IMavenConstants.POM_FILE_NAME),
+ true,
+ new NullProgressMonitor());
}
public IPath getRuntimePath(IProject project, IPath resourcePath) {
IPath runtimePath = getDelegate(project).getRuntimePath(project, resourcePath);
- System.err.println("getRuntimePath("+resourcePath+") ="+ runtimePath);
return runtimePath;
}
}
\ No newline at end of file
14 years, 2 months
JBoss Tools SVN: r38463 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/ui and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-02-07 09:31:09 -0500 (Tue, 07 Feb 2012)
New Revision: 38463
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditDomainAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenInWebBrowserAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshDomainAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowPropertiesAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogWorker.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/JschToEclipseLogger.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/AbstractActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateApplicationActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateServerAdapterActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteApplicationActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditCartridgesActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ImportApplicationActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/OpenInWebBrowserActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowPropertiesActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenConnectionDialogActionDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/RefreshDomainAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/TailServerLogActionProvider.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
Log:
OPEN - issue JBIDE-10528: Improve OpenShift UI
https://issues.jboss.org/browse/JBIDE-10528
Remote Console action implemented, working from both the ServerView and the 'OpenShift Express Console' view
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-07 14:31:09 UTC (rev 38463)
@@ -187,18 +187,18 @@
<viewerContentBinding viewerId="org.eclipse.wst.server.ui.ServersView">
</viewerContentBinding>
<viewerActionBinding viewerId="org.eclipse.wst.server.ui.ServersView">
- <includes>
- <actionExtension
- pattern="org.jboss.tools.openshift.express.ui.internal.ui.console.tailServerLogActionProvider"/>
- </includes>
- </viewerActionBinding>
+ <includes>
+ <actionExtension
+ pattern="org.jboss.tools.openshift.express.ui.internal.ui.console.tailServerLogActionProvider"/>
+ </includes>
+ </viewerActionBinding>
</extension>
<extension
point="org.eclipse.ui.console.consolePageParticipants">
<consolePageParticipant
class="org.jboss.tools.openshift.express.internal.ui.console.TailConsolePageParticipant"
- id="org.jboss.tools.openshift.express.ui.tailConsolePageParticipant">
+ id="org.jboss.tools.openshift.express.ui.action.tailConsolePageParticipant">
<enablement>
<and>
<instanceof
@@ -336,7 +336,7 @@
<viewerActionBinding viewerId="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView">
<includes>
<actionExtension
- pattern="org.jboss.tools.openshift.express.internal.ui.viewer.*"/>
+ pattern="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.*"/>
</includes>
</viewerActionBinding>
<viewerContentBinding
@@ -359,8 +359,8 @@
<triggerPoints></triggerPoints>
</navigatorContent>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.EditDomainActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.editDomainAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.EditDomainActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.editDomainActionProvider">
<enablement>
<and>
<instanceof
@@ -370,8 +370,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.CreateApplicationActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.createApplicationAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.CreateApplicationActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.createApplicationActionProvider">
<enablement>
<and>
<instanceof
@@ -381,8 +381,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.OpenInWebBrowserActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.openInWebBrowserAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.OpenInWebBrowserActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.openInWebBrowserActionProvider">
<enablement>
<and>
<instanceof
@@ -392,8 +392,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.TailServerLogActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.tailServerLogAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.TailServerLogActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.tailServerLogActionProvider">
<enablement>
<and>
<instanceof
@@ -403,8 +403,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.EditCartridgesActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.editCartridgesAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.EditCartridgesActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.editCartridgesActionProvider">
<enablement>
<and>
<instanceof
@@ -414,8 +414,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.ImportApplicationActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.importApplicationAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.ImportApplicationActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.importApplicationActionProvider">
<enablement>
<and>
<instanceof
@@ -425,8 +425,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.DeleteApplicationActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.deleteApplicationAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.DeleteApplicationActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.deleteApplicationActionProvider">
<enablement>
<and>
<instanceof
@@ -436,8 +436,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.CreateServerAdapterActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.createServerAdapterAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.CreateServerAdapterActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.createServerAdapterActionProvider">
<enablement>
<and>
<instanceof
@@ -447,8 +447,8 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.ShowPropertiesActionProvider"
- id="org.jboss.tools.openshift.express.internal.ui.viewer.showPropertiesAction">
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.ShowPropertiesActionProvider"
+ id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.showPropertiesActionProvider">
<enablement>
<or>
<instanceof
@@ -480,7 +480,7 @@
toolbarPath="openshift">
</action-->
<action
- class="org.jboss.tools.openshift.express.internal.ui.viewer.action.OpenConnectionDialogActionDelegate"
+ class="org.jboss.tools.openshift.express.internal.ui.action.OpenConnectionDialogActionDelegate"
icon="icons/resource_obj.gif"
id="org.jboss.tools.openshift.express.ui.viewActions.openConnectionWizard"
label="Connect"
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,36 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.ui.navigator.CommonViewer;
+
+public abstract class AbstractAction extends Action implements ISelectionChangedListener {
+
+ /** The current selection in the view. */
+ protected ISelection selection = null;
+
+ public AbstractAction(String text) {
+ super(text);
+ }
+
+ public AbstractAction(String text, ImageDescriptor image) {
+ super(text, image);
+ }
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ Object source = event.getSource();
+ if (source instanceof CommonViewer) {
+ this.selection = ((CommonViewer) source).getSelection();
+ }
+ }
+
+ public void setSelection(ISelection selection) {
+ this.selection = selection;
+
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,32 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+
+import com.openshift.express.client.IApplication;
+
+public class CreateApplicationAction extends AbstractAction {
+
+ /**
+ * Constructor
+ */
+ public CreateApplicationAction() {
+ super(OpenShiftExpressUIMessages.CREATE_APPLICATION_ACTION);
+ setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("query-new.gif"));
+ }
+
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
+ * created, otherwise, it is displayed. {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection && ((ITreeSelection)selection).getFirstElement() instanceof IApplication) {
+ final IApplication application = (IApplication) ((ITreeSelection)selection).getFirstElement();
+
+ }
+ }
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,31 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+
+import com.openshift.express.client.IApplication;
+
+public class CreateServerAdapterAction extends AbstractAction {
+
+ public CreateServerAdapterAction() {
+ super(OpenShiftExpressUIMessages.CREATE_SERVER_ADAPTER_ACTION);
+ setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("edit.gif"));
+ }
+
+ @Override
+ public void run() {
+ final ITreeSelection treeSelection = (ITreeSelection) selection;
+ if (selection != null && selection instanceof ITreeSelection
+ && treeSelection.getFirstElement() instanceof IApplication) {
+ final IApplication application = (IApplication) treeSelection.getFirstElement();
+ ServerCore.getServers();
+ /*
+ * EmbedCartridgeWizard wizard = new EmbedCartridgeWizard(user, user); WizardDialog dialog = new
+ * WizardDialog(Display.getCurrent().getActiveShell(), wizard); dialog.create(); dialog.open();
+ */
+
+ }
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateServerAdapterAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,63 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.OpenShiftException;
+
+public class DeleteApplicationAction extends AbstractAction {
+
+ /**
+ * Constructor
+ */
+ public DeleteApplicationAction() {
+ super(OpenShiftExpressUIMessages.DELETE_APPLICATION_ACTION);
+ setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_ETOOL_DELETE));
+ }
+
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
+ * created, otherwise, it is displayed. {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection && ((ITreeSelection)selection).getFirstElement() instanceof IApplication) {
+ final IApplication application = (IApplication) ((ITreeSelection)selection).getFirstElement();
+ final String appName = application.getName();
+ final boolean confirm = MessageDialog
+ .openConfirm(
+ Display.getCurrent().getActiveShell(),
+ "Application deletion",
+ "You are about to destroy the '" + appName + "' application.\n" +
+ "This is NOT reversible, all remote data for this application will be removed.");
+ if (confirm) {
+ Job job = new Job("Deleting application '" + appName + "'...") {
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ application.destroy();
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to delete application '" + appName + "'", e);
+ } finally {
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setPriority(Job.SHORT);
+ job.schedule(); // start as soon as possible
+ }
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,35 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.wizard.EmbedCartridgeWizard;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+
+public class EditCartridgesAction extends AbstractAction {
+
+ public EditCartridgesAction() {
+ super(OpenShiftExpressUIMessages.EDIT_CARTRIDGES_ACTION);
+ setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("task-repository-new.gif"));
+ }
+
+ @Override
+ public void run() {
+ final ITreeSelection treeSelection = (ITreeSelection)selection;
+ if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IApplication) {
+ final IApplication application = (IApplication) treeSelection.getFirstElement();
+ final IUser user = OpenShiftUIActivator.getDefault().getUser();
+ EmbedCartridgeWizard wizard = new EmbedCartridgeWizard(application, user);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
+ dialog.create();
+ dialog.open();
+
+ }
+ }
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditCartridgesAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditDomainAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditDomainAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditDomainAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,33 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.wizard.EditDomainDialog;
+
+import com.openshift.express.client.IUser;
+
+public class EditDomainAction extends AbstractAction {
+
+ public EditDomainAction() {
+ super(OpenShiftExpressUIMessages.EDIT_DOMAIN_ACTION);
+ setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("edit.gif"));
+ }
+
+ @Override
+ public void run() {
+ final ITreeSelection treeSelection = (ITreeSelection)selection;
+ if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IUser) {
+ final IUser user = (IUser) treeSelection.getFirstElement();
+ EditDomainDialog wizard = new EditDomainDialog(user);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
+ dialog.create();
+ dialog.open();
+
+ }
+ }
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/EditDomainAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,36 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.wizard.EmbedCartridgeWizard;
+import org.jboss.tools.openshift.express.internal.ui.wizard.ImportExistingApplicationWizard;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+
+public class ImportApplicationAction extends AbstractAction {
+
+ public ImportApplicationAction() {
+ super(OpenShiftExpressUIMessages.IMPORT_APPLICATION_ACTION);
+ setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("go-into.gif"));
+ }
+
+ @Override
+ public void run() {
+ final ITreeSelection treeSelection = (ITreeSelection)selection;
+ if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IApplication) {
+ final IApplication application = (IApplication) treeSelection.getFirstElement();
+ final IUser user = OpenShiftUIActivator.getDefault().getUser();
+ ImportExistingApplicationWizard wizard = new ImportExistingApplicationWizard();
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
+ dialog.create();
+ dialog.open();
+
+ }
+ }
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenConnectionDialogActionDelegate.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,54 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
+import org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleContentCategory;
+
+import com.openshift.express.client.IUser;
+
+public class OpenConnectionDialogActionDelegate implements IViewActionDelegate {
+
+ private CommonNavigator view;
+
+ @Override
+ public void run(IAction action) {
+ final Display display = Display.getCurrent();
+ final Shell shell = new Shell(display);
+ final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
+ int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
+ if (returnCode == Window.OK) {
+ Logger.debug("OpenShift Auth succeeded.");
+ if (view != null) {
+ IUser user = OpenShiftUIActivator.getDefault().getUser();
+ //view.switchToCommonViewer();
+ view.getCommonViewer().setInput(new OpenShiftExpressConsoleContentCategory(user));
+ //view.getCommonViewer().refresh();
+ }
+ }
+
+ }
+
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+
+ }
+
+ @Override
+ public void init(IViewPart view) {
+ if (view instanceof CommonNavigator) {
+ this.view = (CommonNavigator) view;
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenInWebBrowserAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenInWebBrowserAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenInWebBrowserAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,42 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.jboss.tools.common.ui.BrowserUtil;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.OpenShiftException;
+
+public class OpenInWebBrowserAction extends AbstractAction {
+
+ /**
+ * Constructor
+ */
+ public OpenInWebBrowserAction() {
+ super(OpenShiftExpressUIMessages.SHOW_IN_BROWSER_ACTION);
+ setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("open-browser.gif"));
+ }
+
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
+ * created, otherwise, it is displayed. {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection
+ && ((ITreeSelection) selection).getFirstElement() instanceof IApplication) {
+ try {
+ final IApplication application = (IApplication) ((ITreeSelection) selection).getFirstElement();
+ final String appName = application.getName();
+ final String appUrl = application.getApplicationUrl();
+ BrowserUtil.checkedCreateInternalBrowser(appUrl, appName,
+ OpenShiftUIActivator.PLUGIN_ID, OpenShiftUIActivator.getDefault().getLog());
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to open OpenShift Application in a browser", e);
+ }
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenInWebBrowserAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshDomainAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/RefreshDomainAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshDomainAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshDomainAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,28 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+public class RefreshDomainAction implements IViewActionDelegate {
+
+ @Override
+ public void run(IAction action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @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/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshDomainAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowPropertiesAction.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowPropertiesAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowPropertiesAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,28 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+public class ShowPropertiesAction extends AbstractAction {
+
+ public ShowPropertiesAction() {
+ super(OpenShiftExpressUIMessages.SHOW_PROPERTIES_VIEW_ACTION);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.PropertySheet");
+ } catch (PartInitException e) {
+ Logger.error("Failed to show properties view", e);
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowPropertiesAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,234 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.RemoteSession;
+import org.eclipse.jgit.transport.SshSessionFactory;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleListener;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.views.IViewDescriptor;
+import org.eclipse.ui.views.IViewRegistry;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.IServerModule;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils;
+import org.jboss.tools.openshift.express.internal.ui.console.JschToEclipseLogger;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.OpenShiftException;
+import com.openshift.express.client.utils.Base64Encoder;
+
+/**
+ * The action associated with the "Show In>Remote Console" menu item.
+ *
+ * @author Xavier Coulon
+ *
+ */
+public class TailServerLogAction extends AbstractAction implements IConsoleListener {
+
+ /**
+ * The message consoles associated with the 'tail' workers that write the output.
+ */
+ private Map<String, TailServerLogWorker> consoleWorkers = new HashMap<String, TailServerLogWorker>();
+
+ /**
+ * Constructor
+ */
+ public TailServerLogAction() {
+ super(OpenShiftExpressUIMessages.TAIL_SERVER_LOG_ACTION);
+ IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
+ IViewDescriptor desc = reg.find(IConsoleConstants.ID_CONSOLE_VIEW);
+ setImageDescriptor(desc.getImageDescriptor());
+ ConsoleUtils.registerConsoleListener(this);
+ }
+
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
+ * created, otherwise, it is displayed. {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ try {
+ if (selection instanceof IStructuredSelection) {
+ final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedItem instanceof IServer) {
+ final IServer server = ((IServer) selectedItem);
+ run(server);
+ } else if (selectedItem instanceof IServerModule) {
+ final IServer server = ((IServerModule) selectedItem).getServer();
+ run(server);
+ } else if (selectedItem instanceof IApplication) {
+ final IApplication application = (IApplication) selectedItem;
+ run(application);
+ }
+ }
+ } catch (Exception e) {
+ Logger.error("Failed to open Remote Console", e);
+ }
+ }
+
+ private void run(final IApplication application) throws OpenShiftException, MalformedURLException {
+ final String host = new URL(application.getApplicationUrl()).getHost();
+ final String appId = application.getUUID();
+ final String appName = application.getName();
+ final MessageConsole console = ConsoleUtils.findMessageConsole(createConsoleId(appName, host));
+ ConsoleUtils.displayConsoleView(console);
+ console.newMessageStream().println("Loading....");
+ if (!this.consoleWorkers.containsKey(console.getName())) {
+ launchTailServerJob(host, appId, appName, console);
+ }
+ }
+
+ private static String createConsoleId(String appName, String host) {
+ return host;
+ }
+
+ private void run(final IServer server) {
+ if (ExpressServerUtils.isOpenShiftRuntime(server) || ExpressServerUtils.isInOpenshiftBehaviourMode(server)) {
+ final String host = server.getHost();
+ final String appId = ExpressServerUtils.getExpressApplicationId(server);
+ final String appName = ExpressServerUtils.getExpressApplicationName(server);
+ final MessageConsole console = ConsoleUtils.findMessageConsole(createConsoleId(appName, host));
+ ConsoleUtils.displayConsoleView(console);
+ console.newMessageStream().println("Loading....");
+ if (!this.consoleWorkers.containsKey(console.getName())) {
+ launchTailServerJob(host, appId, appName, console);
+ }
+ }
+ }
+
+ private void launchTailServerJob(final String host, final String appId, final String appName,
+ final MessageConsole console) {
+ new Job("Launching Tail Server Operation") {
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ final TailServerLogWorker tailServerLogWorker = startTailProcess(host, appId, appName, console);
+ consoleWorkers.put(console.getName(), tailServerLogWorker);
+ Thread thread = new Thread(tailServerLogWorker);
+ thread.start();
+ } catch (Exception e) {
+ Logger.error("Failed to retrieve remote server logs", e);
+ }
+ return Status.OK_STATUS;
+ }
+
+ }.schedule();
+ }
+
+ /**
+ * Starting the tail process on the remote OpenShift Platform. This method relies on the JGit SSH support (including
+ * JSch) to open a connection AND execute a command in a single invocation. The connection establishement requires
+ * an SSH key, and the passphrase is prompted to the user if necessary.
+ *
+ * @param server
+ * the server adapter on which the action is performed
+ * @param console
+ * the console into which the tail should be writtent
+ * @return the Worker that encapsulate the established RemoteSession, the tail Process and the output console
+ * @throws JSchException
+ * in case of underlying exception
+ * @throws IOException
+ * in case of underlying exception
+ */
+ private TailServerLogWorker startTailProcess(final String host, final String appId, final String appName,
+ final MessageConsole console) throws JSchException, IOException {
+ final String logFilePath = appName + "/logs/*.log";
+ final String options = "-f -n 100";
+
+ JSch.setLogger(new JschToEclipseLogger());
+ final SshSessionFactory sshSessionFactory = SshSessionFactory.getInstance();
+ final URIish uri = new URIish().setHost(host).setUser(appId);
+ RemoteSession remoteSession = sshSessionFactory.getSession(uri, CredentialsProvider.getDefault(), FS.DETECTED,
+ 0);
+
+ // the rhc-tail-files command template
+ // ssh_cmd =
+ // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
+ final String command = buildCommand(logFilePath, options);
+ Process process = remoteSession.exec(command, 0);
+ return new TailServerLogWorker(console, process, remoteSession);
+
+ }
+
+ /**
+ * Builds the 'ssh tail' command that should be executed on the remote OpenShift platform.
+ *
+ * @param filePath
+ * @param options
+ * @return
+ * @throws UnsupportedEncodingException
+ */
+ private String buildCommand(final String filePath, final String options) throws UnsupportedEncodingException {
+ StringBuilder commandBuilder = new StringBuilder("tail ");
+ if (options != null && !options.isEmpty()) {
+ final String opts = new String(Base64Encoder.encode(options.getBytes("UTF-8")), "UTF-8");
+ commandBuilder.append("--opts ").append(opts).append(" ");
+ }
+ commandBuilder.append(filePath);
+ final String command = commandBuilder.toString();
+ Logger.debug("ssh command to execute: " + command);
+ return command;
+ }
+
+ public Object getSelection() {
+ if (selection instanceof IStructuredSelection) {
+ final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedItem instanceof IServer) {
+ return ((IServer) selectedItem);
+ }
+ if (selectedItem instanceof IServerModule) {
+ return ((IServerModule) selectedItem).getServer();
+ }
+ if (selectedItem instanceof IApplication) {
+
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void consolesAdded(IConsole[] consoles) {
+ // don't do anything special
+ }
+
+ /**
+ * Operation to perform when the console is removed (through the CloseConsoleAction that was brung by the
+ * <code>TailConsolePageParticipant</code>). In the current case, the associated worker is stopped and the
+ * console/worker are removed from the map, so that further 'Show In>Remote Console' invocation will trigger a new
+ * worker process.
+ */
+ @Override
+ public void consolesRemoved(IConsole[] consoles) {
+ // if the console is associated with a 'tail' process, stop that process
+ for (IConsole console : consoles) {
+ final String consoleName = console.getName();
+ if (consoleWorkers.containsKey(consoleName)) {
+ final TailServerLogWorker worker = consoleWorkers.get(consoleName);
+ worker.stop();
+ consoleWorkers.remove(consoleName);
+ }
+ }
+
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogWorker.java (from rev 38420, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogWorker.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogWorker.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,73 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.eclipse.jgit.transport.RemoteSession;
+import org.eclipse.ui.console.MessageConsole;
+
+
+/**
+ * The underlying 'Tail' worker, that uses an established RemoteSession (with
+ * the help of JGit), runs in a dedicated process and displays the outputstream
+ * into a specific console. This worker is a <code>java.lang.Runnable</code> in
+ * order to run in a separate thread
+ *
+ * @author Xavier Coulon
+ *
+ */
+public class TailServerLogWorker implements Runnable {
+
+ /** the remote 'tail' process. */
+ private final Process process;
+
+ /** the output message console. */
+ private final MessageConsole console;
+
+ /** the SSH session. */
+ private final RemoteSession remoteSession;
+
+ /**
+ * Constructor.
+ *
+ * @param console
+ * @param process
+ * @param remoteSession
+ */
+ public TailServerLogWorker(final MessageConsole console, final Process process, final RemoteSession remoteSession) {
+ this.console = console;
+ this.process = process;
+ this.remoteSession = remoteSession;
+ }
+
+ @Override
+ public void run() {
+ try {
+ // get I/O streams for remote tail
+ final InputStream in = process.getInputStream();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+ String line;
+ // Read File Line By Line
+ while ((line = reader.readLine()) != null) {
+ console.newMessageStream().println(line);
+ }
+ } catch (Throwable e) {
+ org.jboss.tools.openshift.express.internal.ui.utils.Logger.error(
+ "Error while receiving the remote server log", e);
+ } finally {
+
+ }
+ }
+
+ /**
+ * Method called when the overall 'tail' process should be stopped: the
+ * underlying ssh remote session must be disconnected and the running
+ * process must be destroyed.
+ */
+ public void stop() {
+ this.remoteSession.disconnect();
+ this.process.destroy();
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogWorker.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/JschToEclipseLogger.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/JschToEclipseLogger.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/JschToEclipseLogger.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,45 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import com.jcraft.jsch.Logger;
+
+/**
+ * Bridge between the JSch logger and the Eclipse logger (to ouput results
+ * in the .log files and/or into the 'Error log' view.
+ *
+ * @author Xavier Coulon
+ *
+ */
+public class JschToEclipseLogger implements Logger {
+
+ static java.util.Hashtable<Integer, String> name = new java.util.Hashtable<Integer, String>();
+ static {
+ name.put(new Integer(DEBUG), "DEBUG: ");
+ name.put(new Integer(INFO), "INFO: ");
+ name.put(new Integer(WARN), "WARN: ");
+ name.put(new Integer(ERROR), "ERROR: ");
+ name.put(new Integer(FATAL), "FATAL: ");
+ }
+
+ @Override
+ public boolean isEnabled(int level) {
+ return true;
+ }
+
+ @Override
+ public void log(int level, String message) {
+ switch (level) {
+ case DEBUG:
+ case INFO:
+ org.jboss.tools.openshift.express.internal.ui.utils.Logger.debug(message);
+ break;
+ case WARN:
+ org.jboss.tools.openshift.express.internal.ui.utils.Logger.warn(message);
+ break;
+ case ERROR:
+ case FATAL:
+ org.jboss.tools.openshift.express.internal.ui.utils.Logger.error(message);
+ break;
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/JschToEclipseLogger.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,195 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.console;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jgit.transport.CredentialsProvider;
-import org.eclipse.jgit.transport.RemoteSession;
-import org.eclipse.jgit.transport.SshSessionFactory;
-import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.util.FS;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleConstants;
-import org.eclipse.ui.console.IConsoleListener;
-import org.eclipse.ui.console.MessageConsole;
-import org.eclipse.ui.views.IViewDescriptor;
-import org.eclipse.ui.views.IViewRegistry;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.IServerModule;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-import org.jboss.tools.openshift.express.internal.ui.console.TailServerLogWorker.JschToEclipseLogger;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import org.jboss.tools.openshift.express.internal.ui.viewer.action.AbstractAction;
-
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.openshift.express.client.utils.Base64Encoder;
-
-/**
- * The action associated with the "Show In>Remote Console" menu item.
- *
- * @author Xavier Coulon
- *
- */
-public class TailServerLogAction extends AbstractAction implements IConsoleListener {
-
- /**
- * The message consoles associated with the 'tail' workers that write the
- * output.
- */
- private Map<String, TailServerLogWorker> consoleWorkers = new HashMap<String, TailServerLogWorker>();
-
- /**
- * Constructor
- */
- public TailServerLogAction() {
- super(OpenShiftExpressUIMessages.TAIL_SERVER_LOG_ACTION);
- IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
- IViewDescriptor desc = reg.find(IConsoleConstants.ID_CONSOLE_VIEW);
- setImageDescriptor(desc.getImageDescriptor());
- ConsoleUtils.registerConsoleListener(this);
- }
-
- /**
- * Operation called when the user clicks on 'Show In>Remote Console'. If no
- * Console/Worker existed, a new one is created, otherwise, it is displayed.
- * {@inheritDoc}
- */
- @Override
- public void run() {
- final IServer server = getServer();
- if (ExpressServerUtils.isOpenShiftRuntime(server) || ExpressServerUtils.isInOpenshiftBehaviourMode(server)) {
- MessageConsole console = ConsoleUtils.findMessageConsole(server.getId());
- ConsoleUtils.displayConsoleView(console);
- console.newMessageStream().println("Loading....");
-
- if (!this.consoleWorkers.containsKey(console.getName())) {
- launchTailServerJob(console, server);
- }
- }
- }
-
- private void launchTailServerJob(final MessageConsole console, final IServer server) {
- new Job("Launching Tail Server Operation") {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- final TailServerLogWorker tailServerLogWorker = startTailProcess(server, console);
- consoleWorkers.put(console.getName(), tailServerLogWorker);
- Thread thread = new Thread(tailServerLogWorker);
- thread.start();
- } catch (Exception e) {
- Logger.error("Failed to retrieve remote server logs", e);
- }
- return Status.OK_STATUS;
- }
-
- }.schedule();
- }
-
- /**
- * Starting the tail process on the remote OpenShift Platform. This method
- * relies on the JGit SSH support (including JSch) to open a connection AND
- * execute a command in a single invocation. The connection establishement
- * requires an SSH key, and the passphrase is prompted to the user if
- * necessary.
- *
- * @param server the server adapter on which the action is perforemd
- * @param console the console into which the tail should be writtent
- * @return the Worker that encapsulate the established RemoteSession, the tail Process and the output console
- * @throws JSchException in case of underlying exception
- * @throws IOException in case of underlying exception
- */
- private TailServerLogWorker startTailProcess(final IServer server, final MessageConsole console)
- throws JSchException, IOException {
- final String host = server.getHost();
- final String appId = ExpressServerUtils.getExpressApplicationId(server);
- final String appName = ExpressServerUtils.getExpressApplicationName(server);
- final String logFilePath = appName + "/logs/*.log";
- final String options = "-f -n 100";
-
- JSch.setLogger(new JschToEclipseLogger());
- final SshSessionFactory sshSessionFactory = SshSessionFactory.getInstance();
- final URIish uri = new URIish().setHost(host).setUser(appId);
- RemoteSession remoteSession = sshSessionFactory.getSession(uri, CredentialsProvider.getDefault(), FS.DETECTED,
- 0);
-
- // the rhc-tail-files command template
- // ssh_cmd =
- // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
- final String command = buildCommand(logFilePath, options);
- Process process = remoteSession.exec(command, 0);
- return new TailServerLogWorker(console, process, remoteSession);
-
- }
-
- /**
- * Builds the 'ssh tail' command that should be executed on the remote
- * OpenShift platform.
- *
- * @param filePath
- * @param options
- * @return
- * @throws UnsupportedEncodingException
- */
- private String buildCommand(final String filePath, final String options) throws UnsupportedEncodingException {
- StringBuilder commandBuilder = new StringBuilder("tail ");
- if (options != null && !options.isEmpty()) {
- final String opts = new String(Base64Encoder.encode(options.getBytes("UTF-8")), "UTF-8");
- commandBuilder.append("--opts ").append(opts).append(" ");
- }
- commandBuilder.append(filePath);
- final String command = commandBuilder.toString();
- Logger.debug("ssh command to execute: " + command);
- return command;
- }
-
- public IServer getServer() {
- if (selection instanceof IStructuredSelection) {
- final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
- if (selectedItem instanceof IServer) {
- return ((IServer) selectedItem);
- }
- if (selectedItem instanceof IServerModule) {
- return ((IServerModule) selectedItem).getServer();
- }
- }
- return null;
- }
-
- @Override
- public void consolesAdded(IConsole[] consoles) {
- // don't do anything special
- }
-
- /**
- * Operation to perform when the console is removed (through the
- * CloseConsoleAction that was brung by the
- * <code>TailConsolePageParticipant</code>). In the current case, the
- * associated worker is stopped and the console/worker are removed from the
- * map, so that further 'Show In>Remote Console' invocation will trigger a
- * new worker process.
- */
- @Override
- public void consolesRemoved(IConsole[] consoles) {
- // if the console is associated with a 'tail' process, stop that process
- for (IConsole console : consoles) {
- final String consoleName = console.getName();
- if (consoleWorkers.containsKey(consoleName)) {
- final TailServerLogWorker worker = consoleWorkers.get(consoleName);
- worker.stop();
- consoleWorkers.remove(consoleName);
- }
- }
-
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,54 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.console;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonViewerSite;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.CommonActionProviderUtils;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-
-public class TailServerLogActionProvider extends CommonActionProvider {
-
- private TailServerLogAction action;
-
- private ICommonActionExtensionSite actionExtensionSite;
-
- public void init(ICommonActionExtensionSite actionExtensionSite) {
- super.init(actionExtensionSite);
- this.actionExtensionSite = actionExtensionSite;
- ICommonViewerSite site = actionExtensionSite.getViewSite();
- if (site instanceof ICommonViewerWorkbenchSite) {
- action = new TailServerLogAction();
- action.setSelection(actionExtensionSite.getStructuredViewer().getSelection());
- actionExtensionSite.getStructuredViewer().addSelectionChangedListener(action);
- }
- }
-
- public void fillContextMenu(IMenuManager menu) {
- if (action != null && action.isEnabled()) {
- Object sel = getSelection();
- if( sel instanceof IServer ) {
- IServer server = (IServer)sel;
- if (ExpressServerUtils.isOpenShiftRuntime(server) || ExpressServerUtils.isInOpenshiftBehaviourMode(server)) {
- //menu.insertBefore(ServerActionProvider.CONTROL_SERVER_SECTION_END_SEPARATOR, action);
- CommonActionProviderUtils.addToShowInQuickSubMenu(action, menu, actionExtensionSite);
- }
- }
- }
- }
-
- protected Object getSelection() {
- ICommonViewerSite site = actionExtensionSite.getViewSite();
- IStructuredSelection selection = null;
- if (site instanceof ICommonViewerWorkbenchSite) {
- ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
- selection = (IStructuredSelection) wsSite.getSelectionProvider().getSelection();
- Object first = selection.getFirstElement();
- return first;
- }
- return null;
- }
-}
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,55 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.ui.views.server.extensions.CommonActionProviderUtils;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.ui.action.TailServerLogAction;
+
+public class TailServerLogActionProvider extends CommonActionProvider {
+
+ private TailServerLogAction action;
+
+ private ICommonActionExtensionSite actionExtensionSite;
+
+ public void init(ICommonActionExtensionSite actionExtensionSite) {
+ super.init(actionExtensionSite);
+ this.actionExtensionSite = actionExtensionSite;
+ ICommonViewerSite site = actionExtensionSite.getViewSite();
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ action = new TailServerLogAction();
+ action.setSelection(actionExtensionSite.getStructuredViewer().getSelection());
+ actionExtensionSite.getStructuredViewer().addSelectionChangedListener(action);
+ }
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ if (action != null && action.isEnabled()) {
+ Object sel = getSelection();
+ if( sel instanceof IServer ) {
+ IServer server = (IServer)sel;
+ if (ExpressServerUtils.isOpenShiftRuntime(server) || ExpressServerUtils.isInOpenshiftBehaviourMode(server)) {
+ //menu.insertBefore(ServerActionProvider.CONTROL_SERVER_SECTION_END_SEPARATOR, action);
+ CommonActionProviderUtils.addToShowInQuickSubMenu(action, menu, actionExtensionSite);
+ }
+ }
+ }
+ }
+
+ protected Object getSelection() {
+ ICommonViewerSite site = actionExtensionSite.getViewSite();
+ IStructuredSelection selection = null;
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider().getSelection();
+ Object first = selection.getFirstElement();
+ return first;
+ }
+ return null;
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,116 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.console;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.eclipse.jgit.transport.RemoteSession;
-import org.eclipse.ui.console.MessageConsole;
-
-import com.jcraft.jsch.Logger;
-
-/**
- * The underlying 'Tail' worker, that uses an established RemoteSession (with
- * the help of JGit), runs in a dedicated process and displays the outputstream
- * into a specific console. This worker is a <code>java.lang.Runnable</code> in
- * order to run in a separate thread
- *
- * @author Xavier Coulon
- *
- */
-public class TailServerLogWorker implements Runnable {
-
- /** the remote 'tail' process. */
- private final Process process;
-
- /** the output message console. */
- private final MessageConsole console;
-
- /** the SSH session. */
- private final RemoteSession remoteSession;
-
- /**
- * Constructor.
- *
- * @param console
- * @param process
- * @param remoteSession
- */
- public TailServerLogWorker(final MessageConsole console, final Process process, final RemoteSession remoteSession) {
- this.console = console;
- this.process = process;
- this.remoteSession = remoteSession;
- }
-
- @Override
- public void run() {
- try {
- // get I/O streams for remote tail
- final InputStream in = process.getInputStream();
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- String line;
- // Read File Line By Line
- while ((line = reader.readLine()) != null) {
- console.newMessageStream().println(line);
- }
- } catch (Throwable e) {
- org.jboss.tools.openshift.express.internal.ui.utils.Logger.error(
- "Error while receiving the remote server log", e);
- } finally {
-
- }
- }
-
- /**
- * Method called when the overall 'tail' process should be stopped: the
- * underlying ssh remote session must be disconnected and the running
- * process must be destroyed.
- */
- public void stop() {
- this.remoteSession.disconnect();
- this.process.destroy();
- }
-
- /**
- * Bridge between the JSch logger and the Eclipse logger (to ouput results
- * in the .log files and/or into the 'Error log' view.
- *
- * @author Xavier Coulon
- *
- */
- static class JschToEclipseLogger implements Logger {
-
- static java.util.Hashtable<Integer, String> name = new java.util.Hashtable<Integer, String>();
- static {
- name.put(new Integer(DEBUG), "DEBUG: ");
- name.put(new Integer(INFO), "INFO: ");
- name.put(new Integer(WARN), "WARN: ");
- name.put(new Integer(ERROR), "ERROR: ");
- name.put(new Integer(FATAL), "FATAL: ");
- }
-
- @Override
- public boolean isEnabled(int level) {
- return true;
- }
-
- @Override
- public void log(int level, String message) {
- switch (level) {
- case DEBUG:
- case INFO:
- org.jboss.tools.openshift.express.internal.ui.utils.Logger.debug(message);
- break;
- case WARN:
- org.jboss.tools.openshift.express.internal.ui.utils.Logger.warn(message);
- break;
- case ERROR:
- case FATAL:
- org.jboss.tools.openshift.express.internal.ui.utils.Logger.error(message);
- break;
- }
- }
-
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,36 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.ui.navigator.CommonViewer;
-
-public abstract class AbstractAction extends Action implements ISelectionChangedListener {
-
- /** The current selection in the view. */
- protected ISelection selection = null;
-
- public AbstractAction(String text) {
- super(text);
- }
-
- public AbstractAction(String text, ImageDescriptor image) {
- super(text, image);
- }
-
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- Object source = event.getSource();
- if (source instanceof CommonViewer) {
- this.selection = ((CommonViewer) source).getSelection();
- }
- }
-
- public void setSelection(ISelection selection) {
- this.selection = selection;
-
- }
-
-}
\ No newline at end of file
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,36 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonViewerSite;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-
-public abstract class AbstractActionProvider extends CommonActionProvider {
-
- private final AbstractAction action;
-
- private final String group;
-
- public AbstractActionProvider(AbstractAction action, String group) {
- this.action = action;
- this.group = group;
- }
-
- public void init(ICommonActionExtensionSite actionExtensionSite) {
- super.init(actionExtensionSite);
- ICommonViewerSite site = actionExtensionSite.getViewSite();
- if (site instanceof ICommonViewerWorkbenchSite) {
- action.setSelection(actionExtensionSite.getStructuredViewer().getSelection());
- actionExtensionSite.getStructuredViewer().addSelectionChangedListener(action);
- }
- }
-
- @Override
- public void fillContextMenu(IMenuManager menu) {
- if (action != null && action.isEnabled()) {
- menu.appendToGroup(group, action);
- }
- }
-
-}
\ No newline at end of file
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,32 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-
-import com.openshift.express.client.IApplication;
-
-public class CreateApplicationAction extends AbstractAction {
-
- /**
- * Constructor
- */
- public CreateApplicationAction() {
- super(OpenShiftExpressUIMessages.CREATE_APPLICATION_ACTION);
- setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("query-new.gif"));
- }
-
- /**
- * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
- * created, otherwise, it is displayed. {@inheritDoc}
- */
- @Override
- public void run() {
- if (selection != null && selection instanceof ITreeSelection && ((ITreeSelection)selection).getFirstElement() instanceof IApplication) {
- final IApplication application = (IApplication) ((ITreeSelection)selection).getFirstElement();
-
- }
- }
-
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,11 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-
-
-public class CreateApplicationActionProvider extends AbstractActionProvider {
-
- public CreateApplicationActionProvider() {
- super(new CreateApplicationAction(), "group.edition");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,31 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-
-import com.openshift.express.client.IApplication;
-
-public class CreateServerAdapterAction extends AbstractAction {
-
- public CreateServerAdapterAction() {
- super(OpenShiftExpressUIMessages.CREATE_SERVER_ADAPTER_ACTION);
- setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("edit.gif"));
- }
-
- @Override
- public void run() {
- final ITreeSelection treeSelection = (ITreeSelection) selection;
- if (selection != null && selection instanceof ITreeSelection
- && treeSelection.getFirstElement() instanceof IApplication) {
- final IApplication application = (IApplication) treeSelection.getFirstElement();
- ServerCore.getServers();
- /*
- * EmbedCartridgeWizard wizard = new EmbedCartridgeWizard(user, user); WizardDialog dialog = new
- * WizardDialog(Display.getCurrent().getActiveShell(), wizard); dialog.create(); dialog.open();
- */
-
- }
- }
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,9 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-public class CreateServerAdapterActionProvider extends AbstractActionProvider {
-
- public CreateServerAdapterActionProvider() {
- super(new CreateServerAdapterAction(), "group.server");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,63 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.OpenShiftException;
-
-public class DeleteApplicationAction extends AbstractAction {
-
- /**
- * Constructor
- */
- public DeleteApplicationAction() {
- super(OpenShiftExpressUIMessages.DELETE_APPLICATION_ACTION);
- setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
- .getImageDescriptor(ISharedImages.IMG_ETOOL_DELETE));
- }
-
- /**
- * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
- * created, otherwise, it is displayed. {@inheritDoc}
- */
- @Override
- public void run() {
- if (selection != null && selection instanceof ITreeSelection && ((ITreeSelection)selection).getFirstElement() instanceof IApplication) {
- final IApplication application = (IApplication) ((ITreeSelection)selection).getFirstElement();
- final String appName = application.getName();
- final boolean confirm = MessageDialog
- .openConfirm(
- Display.getCurrent().getActiveShell(),
- "Application deletion",
- "You are about to destroy the '" + appName + "' application.\n" +
- "This is NOT reversible, all remote data for this application will be removed.");
- if (confirm) {
- Job job = new Job("Deleting application '" + appName + "'...") {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- application.destroy();
- } catch (OpenShiftException e) {
- Logger.error("Failed to delete application '" + appName + "'", e);
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
- };
- job.setPriority(Job.SHORT);
- job.schedule(); // start as soon as possible
- }
- }
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,10 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-
-public class DeleteApplicationActionProvider extends AbstractActionProvider {
-
- public DeleteApplicationActionProvider() {
- super(new DeleteApplicationAction(), "group.edition");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,35 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.wizard.EmbedCartridgeWizard;
-
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.IUser;
-
-public class EditCartridgesAction extends AbstractAction {
-
- public EditCartridgesAction() {
- super(OpenShiftExpressUIMessages.EDIT_CARTRIDGES_ACTION);
- setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("task-repository-new.gif"));
- }
-
- @Override
- public void run() {
- final ITreeSelection treeSelection = (ITreeSelection)selection;
- if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IApplication) {
- final IApplication application = (IApplication) treeSelection.getFirstElement();
- final IUser user = OpenShiftUIActivator.getDefault().getUser();
- EmbedCartridgeWizard wizard = new EmbedCartridgeWizard(application, user);
- WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
- dialog.create();
- dialog.open();
-
- }
- }
-
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,10 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-
-public class EditCartridgesActionProvider extends AbstractActionProvider {
-
- public EditCartridgesActionProvider() {
- super(new EditCartridgesAction(), "group.edition");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,33 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.wizard.EditDomainDialog;
-
-import com.openshift.express.client.IUser;
-
-public class EditDomainAction extends AbstractAction {
-
- public EditDomainAction() {
- super(OpenShiftExpressUIMessages.EDIT_DOMAIN_ACTION);
- setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("edit.gif"));
- }
-
- @Override
- public void run() {
- final ITreeSelection treeSelection = (ITreeSelection)selection;
- if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IUser) {
- final IUser user = (IUser) treeSelection.getFirstElement();
- EditDomainDialog wizard = new EditDomainDialog(user);
- WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
- dialog.create();
- dialog.open();
-
- }
- }
-
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,11 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.ui.navigator.ICommonMenuConstants;
-
-public class EditDomainActionProvider extends AbstractActionProvider {
-
- public EditDomainActionProvider() {
- super(new EditDomainAction(), "group.edition");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,36 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.wizard.EmbedCartridgeWizard;
-import org.jboss.tools.openshift.express.internal.ui.wizard.ImportExistingApplicationWizard;
-
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.IUser;
-
-public class ImportApplicationAction extends AbstractAction {
-
- public ImportApplicationAction() {
- super(OpenShiftExpressUIMessages.IMPORT_APPLICATION_ACTION);
- setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("go-into.gif"));
- }
-
- @Override
- public void run() {
- final ITreeSelection treeSelection = (ITreeSelection)selection;
- if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IApplication) {
- final IApplication application = (IApplication) treeSelection.getFirstElement();
- final IUser user = OpenShiftUIActivator.getDefault().getUser();
- ImportExistingApplicationWizard wizard = new ImportExistingApplicationWizard();
- WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
- dialog.create();
- dialog.open();
-
- }
- }
-
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,10 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-
-public class ImportApplicationActionProvider extends AbstractActionProvider {
-
- public ImportApplicationActionProvider() {
- super(new ImportApplicationAction(), "group.server");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenConnectionDialogActionDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenConnectionDialogActionDelegate.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenConnectionDialogActionDelegate.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,54 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
-import org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleContentCategory;
-
-import com.openshift.express.client.IUser;
-
-public class OpenConnectionDialogActionDelegate implements IViewActionDelegate {
-
- private CommonNavigator view;
-
- @Override
- public void run(IAction action) {
- final Display display = Display.getCurrent();
- final Shell shell = new Shell(display);
- final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
- int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
- if (returnCode == Window.OK) {
- Logger.debug("OpenShift Auth succeeded.");
- if (view != null) {
- IUser user = OpenShiftUIActivator.getDefault().getUser();
- //view.switchToCommonViewer();
- view.getCommonViewer().setInput(new OpenShiftExpressConsoleContentCategory(user));
- //view.getCommonViewer().refresh();
- }
- }
-
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
-
- }
-
- @Override
- public void init(IViewPart view) {
- if (view instanceof CommonNavigator) {
- this.view = (CommonNavigator) view;
- }
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,42 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.jboss.tools.common.ui.BrowserUtil;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.OpenShiftException;
-
-public class OpenInWebBrowserAction extends AbstractAction {
-
- /**
- * Constructor
- */
- public OpenInWebBrowserAction() {
- super(OpenShiftExpressUIMessages.SHOW_IN_BROWSER_ACTION);
- setImageDescriptor(OpenShiftUIActivator.getDefault().createImageDescriptor("open-browser.gif"));
- }
-
- /**
- * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
- * created, otherwise, it is displayed. {@inheritDoc}
- */
- @Override
- public void run() {
- if (selection != null && selection instanceof ITreeSelection
- && ((ITreeSelection) selection).getFirstElement() instanceof IApplication) {
- try {
- final IApplication application = (IApplication) ((ITreeSelection) selection).getFirstElement();
- final String appName = application.getName();
- final String appUrl = application.getApplicationUrl();
- BrowserUtil.checkedCreateInternalBrowser(appUrl, appName,
- OpenShiftUIActivator.PLUGIN_ID, OpenShiftUIActivator.getDefault().getLog());
- } catch (OpenShiftException e) {
- Logger.error("Failed to open OpenShift Application in a browser", e);
- }
- }
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,10 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-
-public class OpenInWebBrowserActionProvider extends AbstractActionProvider {
-
- public OpenInWebBrowserActionProvider() {
- super(new OpenInWebBrowserAction(), "group.showIn");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/RefreshDomainAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/RefreshDomainAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/RefreshDomainAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,28 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-public class RefreshDomainAction implements IViewActionDelegate {
-
- @Override
- public void run(IAction action) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void init(IViewPart view) {
- // TODO Auto-generated method stub
-
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesAction.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesAction.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,28 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-
-public class ShowPropertiesAction extends AbstractAction {
-
- public ShowPropertiesAction() {
- super(OpenShiftExpressUIMessages.SHOW_PROPERTIES_VIEW_ACTION);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- try {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.PropertySheet");
- } catch (PartInitException e) {
- Logger.error("Failed to show properties view", e);
- }
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,10 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-
-public class ShowPropertiesActionProvider extends AbstractActionProvider {
-
- public ShowPropertiesActionProvider() {
- super(new ShowPropertiesAction(), "group.properties");
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/TailServerLogActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/TailServerLogActionProvider.java 2012-02-07 14:10:18 UTC (rev 38462)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/TailServerLogActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -1,10 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.viewer.action;
-
-import org.jboss.tools.openshift.express.internal.ui.console.TailServerLogAction;
-
-public class TailServerLogActionProvider extends AbstractActionProvider {
-
- public TailServerLogActionProvider() {
- super(new TailServerLogAction(), "group.showIn");
- }
-}
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/AbstractActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/AbstractActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/AbstractActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/AbstractActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,37 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.jboss.tools.openshift.express.internal.ui.action.AbstractAction;
+
+public abstract class AbstractActionProvider extends CommonActionProvider {
+
+ private final AbstractAction action;
+
+ private final String group;
+
+ public AbstractActionProvider(AbstractAction action, String group) {
+ this.action = action;
+ this.group = group;
+ }
+
+ public void init(ICommonActionExtensionSite actionExtensionSite) {
+ super.init(actionExtensionSite);
+ ICommonViewerSite site = actionExtensionSite.getViewSite();
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ action.setSelection(actionExtensionSite.getStructuredViewer().getSelection());
+ actionExtensionSite.getStructuredViewer().addSelectionChangedListener(action);
+ }
+ }
+
+ @Override
+ public void fillContextMenu(IMenuManager menu) {
+ if (action != null && action.isEnabled()) {
+ menu.appendToGroup(group, action);
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/AbstractActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateApplicationActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateApplicationActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateApplicationActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateApplicationActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,13 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.CreateApplicationAction;
+
+
+
+public class CreateApplicationActionProvider extends AbstractActionProvider {
+
+ public CreateApplicationActionProvider() {
+ super(new CreateApplicationAction(), "group.edition");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateApplicationActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateServerAdapterActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/CreateServerAdapterActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateServerAdapterActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateServerAdapterActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,11 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.CreateServerAdapterAction;
+
+public class CreateServerAdapterActionProvider extends AbstractActionProvider {
+
+ public CreateServerAdapterActionProvider() {
+ super(new CreateServerAdapterAction(), "group.server");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateServerAdapterActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteApplicationActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/DeleteApplicationActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteApplicationActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteApplicationActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,12 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.DeleteApplicationAction;
+
+
+public class DeleteApplicationActionProvider extends AbstractActionProvider {
+
+ public DeleteApplicationActionProvider() {
+ super(new DeleteApplicationAction(), "group.edition");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteApplicationActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditCartridgesActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditCartridgesActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditCartridgesActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditCartridgesActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,12 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.EditCartridgesAction;
+
+
+public class EditCartridgesActionProvider extends AbstractActionProvider {
+
+ public EditCartridgesActionProvider() {
+ super(new EditCartridgesAction(), "group.edition");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditCartridgesActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/EditDomainActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,12 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.eclipse.ui.navigator.ICommonMenuConstants;
+import org.jboss.tools.openshift.express.internal.ui.action.EditDomainAction;
+
+public class EditDomainActionProvider extends AbstractActionProvider {
+
+ public EditDomainActionProvider() {
+ super(new EditDomainAction(), "group.edition");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ImportApplicationActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ImportApplicationActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ImportApplicationActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ImportApplicationActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,12 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.ImportApplicationAction;
+
+
+public class ImportApplicationActionProvider extends AbstractActionProvider {
+
+ public ImportApplicationActionProvider() {
+ super(new ImportApplicationAction(), "group.server");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ImportApplicationActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/OpenInWebBrowserActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/OpenInWebBrowserActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/OpenInWebBrowserActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/OpenInWebBrowserActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,12 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.OpenInWebBrowserAction;
+
+
+public class OpenInWebBrowserActionProvider extends AbstractActionProvider {
+
+ public OpenInWebBrowserActionProvider() {
+ super(new OpenInWebBrowserAction(), "group.showIn");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/OpenInWebBrowserActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowPropertiesActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/ShowPropertiesActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowPropertiesActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowPropertiesActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,12 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.ShowPropertiesAction;
+
+
+public class ShowPropertiesActionProvider extends AbstractActionProvider {
+
+ public ShowPropertiesActionProvider() {
+ super(new ShowPropertiesAction(), "group.properties");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowPropertiesActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java (from rev 38419, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/action/TailServerLogActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java 2012-02-07 14:31:09 UTC (rev 38463)
@@ -0,0 +1,11 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.TailServerLogAction;
+
+
+public class TailServerLogActionProvider extends AbstractActionProvider {
+
+ public TailServerLogActionProvider() {
+ super(new TailServerLogAction(), "group.showIn");
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 2 months
JBoss Tools SVN: r38462 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-02-07 09:10:18 -0500 (Tue, 07 Feb 2012)
New Revision: 38462
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/scrolling/ScrollCoordinator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-8701 - searching line position from visual pane was updated.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/scrolling/ScrollCoordinator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/scrolling/ScrollCoordinator.java 2012-02-07 13:47:55 UTC (rev 38461)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/scrolling/ScrollCoordinator.java 2012-02-07 14:10:18 UTC (rev 38462)
@@ -64,11 +64,13 @@
* Check 9 top lines.
*/
for (int i = 0; i < 9; i++) {
- Node n = SourceDomUtil.getSourceNodeByEditorPosition(textViewer, topLine+i, 1);
- nsIDOMElement visualElement = domMapping.getNearVisualElement(n);
- if (visualElement != null) {
- Point r = XulRunnerVpeUtils.getVisualNodeOffset(visualElement);
- resultPositions.add(r.y);
+ Node sourceNode = SourceDomUtil.getSourceNodeByEditorPosition(textViewer, topLine+i, 1);
+ if (sourceNode != null) {
+ nsIDOMElement visualElement = domMapping.getNearVisualElement(sourceNode);
+ if (visualElement != null) {
+ Point r = XulRunnerVpeUtils.getVisualNodeOffset(visualElement);
+ resultPositions.add(r.y);
+ }
}
}
posY = findBetterPosition(resultPositions);
@@ -93,26 +95,31 @@
nsIDOMWindowUtils windowUtils = (nsIDOMWindowUtils)
iInterfaceRequestor.getInterface(nsIDOMWindowUtils.NS_IDOMWINDOWUTILS_IID);
/*
- * Get 9 point from visual part. Mostly in the upper left corner.
+ * Divide visual area into xLines*yLines=30 squares.
+ * Get coordinates of their points of intersection.
* Based on them -- source line will be searched.
- */
- visualPoints.add(new Point(windowInternal.getInnerWidth()/10, windowInternal.getInnerHeight()/10));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/5, windowInternal.getInnerHeight()/10));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/2, windowInternal.getInnerHeight()/10));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/10, windowInternal.getInnerHeight()/5));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/5, windowInternal.getInnerHeight()/5));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/2, windowInternal.getInnerHeight()/5));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/10, windowInternal.getInnerHeight()/2));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/5, windowInternal.getInnerHeight()/2));
- visualPoints.add(new Point(windowInternal.getInnerWidth()/2, windowInternal.getInnerHeight()/2));
+ */
+ int xLines = 6;
+ int yLines = 5;
+ for (int i = 1; i < xLines; i++) {
+ for (int j = 1; j < yLines; j++) {
+ visualPoints.add(new Point(
+ windowInternal.getInnerWidth()*i/xLines,
+ windowInternal.getInnerHeight()*j/yLines));
+ }
+ }
+
for (Point p : visualPoints) {
nsIDOMElement elementFromPoint = windowUtils.elementFromPoint(p.x, p.y, true, false);
if (elementFromPoint != null) {
ElementImpl sourceElement = domMapping.getNearSourceElementImpl(elementFromPoint);
- /*
- * Transform offset to line number
- */
- resultPositions.add(sourceEditor.getTextViewer().getTextWidget().getLineAtOffset(sourceElement.getStartEndOffset()));
+ if (sourceElement != null) {
+ /*
+ * Transform offset to line number
+ */
+ resultPositions.add(sourceEditor.getTextViewer().getTextWidget()
+ .getLineAtOffset(sourceElement.getStartEndOffset()));
+ }
}
}
line = findBetterPosition(resultPositions);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2012-02-07 13:47:55 UTC (rev 38461)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2012-02-07 14:10:18 UTC (rev 38462)
@@ -110,6 +110,7 @@
selectionData.getSourceNode(),
selectionOffset, selectionLength);
refreshVisualNodeSelection();
+ setUpdateSelectionEventFlag(false);
}
private SelectionData getSelectionData(nsIDOMNode visualNode) {
@@ -238,6 +239,7 @@
restoreVisualCursorPosition(elementMapping.getTemplate(), nodeData, range);
}
}
+ setUpdateSelectionEventFlag(false);
}
/**
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java 2012-02-07 13:47:55 UTC (rev 38461)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java 2012-02-07 14:10:18 UTC (rev 38462)
@@ -206,7 +206,7 @@
public static final int getLinePositionOffset(ITextViewer itextViewer, int lineIndex, int linePosition) {
int resultOffset = -1;
StyledText textWidget = itextViewer.getTextWidget();
- if (textWidget != null) {
+ if ((textWidget != null) && (lineIndex <= textWidget.getLineCount())) {
resultOffset = textWidget.getOffsetAtLine(lineIndex);
// here we get's tabs length
// for more example you can see code
14 years, 2 months
JBoss Tools SVN: r38461 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-07 08:47:55 -0500 (Tue, 07 Feb 2012)
New Revision: 38461
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java
Log:
increased application creation timeout
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java 2012-02-07 13:25:27 UTC (rev 38460)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CreateNewApplicationWizardModel.java 2012-02-07 13:47:55 UTC (rev 38461)
@@ -20,7 +20,7 @@
/**
* Timeout in seconds when trying to contact an application after it had been created.
*/
- private static final int APP_CREATION_TIMEOUT = 20;
+ private static final int APP_CREATION_TIMEOUT = 30;
private static final String APPLICATION_NAME = "applicationName";
private static final String APPLICATION_CARTRIDGE = "applicationCartridge";
private static final String SELECTED_EMBEDDABLE_CARTRIDGES = "selectedEmbeddableCartridges";
14 years, 2 months
JBoss Tools SVN: r38460 - in trunk/as: plugins and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-07 08:25:27 -0500 (Tue, 07 Feb 2012)
New Revision: 38460
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.classpath
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.project
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.settings/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.settings/org.eclipse.jdt.core.prefs
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/META-INF/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/jboss-dmr-1.1.1.Final.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/pom.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/as/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/as/dmr/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/as/dmr/Activator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/eclipse/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/eclipse/as/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/eclipse/as/dmr/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/eclipse/as/dmr/Activator.class
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/local-artifacts.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/maven-archiver/
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/maven-archiver/pom.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT-sources.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2artifacts.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2content.xml
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature/feature.xml
trunk/as/plugins/pom.xml
Log:
JBIDE-10816 ADD DMR PLUGIN
Modified: trunk/as/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature/feature.xml 2012-02-07 13:20:26 UTC (rev 38459)
+++ trunk/as/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature/feature.xml 2012-02-07 13:25:27 UTC (rev 38460)
@@ -90,4 +90,6 @@
<plugin id="org.jboss.ide.eclipse.as.classpath.ui" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.wtp.core" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.wtp.ui" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin id="org.jboss.ide.eclipse.as.dmr" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+
</feature>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.classpath
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.classpath (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.classpath 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.1.1.Final.jar"/>
+ <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/as/plugins/org.jboss.ide.eclipse.as.dmr/.project
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.project (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.project 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.ide.eclipse.as.dmr</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/as/plugins/org.jboss.ide.eclipse.as.dmr/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/.settings/org.eclipse.jdt.core.prefs 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,8 @@
+#Thu Mar 31 18:56:18 EDT 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/as/plugins/org.jboss.ide.eclipse.as.dmr/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/META-INF/MANIFEST.MF (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/META-INF/MANIFEST.MF 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: JBoss AS Server Adapter Dynamic Model Representation
+Bundle-SymbolicName: org.jboss.ide.eclipse.as.dmr;singleton:=true
+Bundle-Version: 2.3.0.qualifier
+Bundle-Activator: org.jboss.ide.eclipse.as.dmr.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: JBoss by Red Hat
+Bundle-ClassPath: jboss-dmr-1.1.1.Final.jar,
+ .
+Export-Package: org.jboss.dmr
+Require-Bundle: org.eclipse.core.runtime
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ jboss-dmr-1.1.1.Final.jar
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/jboss-dmr-1.1.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/jboss-dmr-1.1.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/pom.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/pom.xml (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/pom.xml 2012-02-07 13:25:27 UTC (rev 38460)
@@ -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.as</groupId>
+ <artifactId>plugins</artifactId>
+ <version>2.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.as.plugins</groupId>
+ <artifactId>org.jboss.ide.eclipse.as.dmr</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/as/dmr/Activator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/as/dmr/Activator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/src/org/jboss/ide/eclipse/as/dmr/Activator.java 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,8 @@
+package org.jboss.ide.eclipse.as.dmr;
+
+import org.eclipse.core.runtime.Plugin;
+
+
+public class Activator extends Plugin {
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/MANIFEST.MF (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/MANIFEST.MF 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime
+Export-Package: org.jboss.dmr
+Bundle-Vendor: JBoss by Red Hat
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: jboss-dmr-1.1.1.Final.jar,.
+Bundle-Version: 2.3.0.v20120207-1253-Beta1
+Bundle-Name: JBoss AS Server Adapter Dynamic Model Representation
+Bundle-Activator: org.jboss.ide.eclipse.as.dmr.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.jboss.ide.eclipse.as.dmr;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/eclipse/as/dmr/Activator.class
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/classes/org/jboss/ide/eclipse/as/dmr/Activator.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/local-artifacts.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/local-artifacts.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/local-artifacts.properties 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,5 @@
+#Tue Feb 07 20:55:06 CST 2012
+artifact.attached.p2metadata=/home/rob/code/jbtools/jbosstools/trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2content.xml
+artifact.main=/home/rob/code/jbtools/jbosstools/trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT.jar
+artifact.attached.sources=/home/rob/code/jbtools/jbosstools/trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT-sources.jar
+artifact.attached.p2artifacts=/home/rob/code/jbtools/jbosstools/trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2artifacts.xml
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/maven-archiver/pom.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/maven-archiver/pom.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/maven-archiver/pom.properties 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Tue Feb 07 20:55:06 CST 2012
+version=2.3.0-SNAPSHOT
+groupId=org.jboss.tools.as.plugins
+artifactId=org.jboss.ide.eclipse.as.dmr
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/org.jboss.ide.eclipse.as.dmr-2.3.0-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2artifacts.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2artifacts.xml (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2artifacts.xml 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<artifacts size='2'>
+ <artifact classifier='osgi.bundle' id='org.jboss.ide.eclipse.as.dmr' version='2.3.0.v20120207-1253-Beta1'>
+ <properties size='6'>
+ <property name='artifact.size' value='89326'/>
+ <property name='download.size' value='89326'/>
+ <property name='download.md5' value='cbbe512a983b75c00d23f874571dcae0'/>
+ <property name='maven-groupId' value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId' value='org.jboss.ide.eclipse.as.dmr'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle' id='org.jboss.ide.eclipse.as.dmr.source' version='2.3.0.v20120207-1253-Beta1'>
+ <properties size='7'>
+ <property name='artifact.size' value='1371'/>
+ <property name='download.size' value='1371'/>
+ <property name='download.md5' value='5f2ffaddf15f39e5e33fb5b17d277e92'/>
+ <property name='maven-groupId' value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId' value='org.jboss.ide.eclipse.as.dmr'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ <property name='maven-classifier' value='sources'/>
+ </properties>
+ </artifact>
+</artifacts>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2content.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2content.xml (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/target/p2content.xml 2012-02-07 13:25:27 UTC (rev 38460)
@@ -0,0 +1,58 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<units size='2'>
+ <unit id='org.jboss.ide.eclipse.as.dmr' version='2.3.0.v20120207-1253-Beta1'>
+ <update id='org.jboss.ide.eclipse.as.dmr' range='[0.0.0,2.3.0.v20120207-1253-Beta1)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.name' value='JBoss AS Server Adapter Dynamic Model Representation'/>
+ <property name='org.eclipse.equinox.p2.provider' value='JBoss by Red Hat'/>
+ <property name='maven-groupId' value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId' value='org.jboss.ide.eclipse.as.dmr'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ </properties>
+ <provides size='4'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.jboss.ide.eclipse.as.dmr' version='2.3.0.v20120207-1253-Beta1'/>
+ <provided namespace='osgi.bundle' name='org.jboss.ide.eclipse.as.dmr' version='2.3.0.v20120207-1253-Beta1'/>
+ <provided namespace='java.package' name='org.jboss.dmr' version='0.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.jboss.ide.eclipse.as.dmr' version='2.3.0.v20120207-1253-Beta1'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-SymbolicName: org.jboss.ide.eclipse.as.dmr;singleton:=true
Bundle-Version: 2.3.0.v20120207-1253-Beta1

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='org.jboss.ide.eclipse.as.dmr.source' version='2.3.0.v20120207-1253-Beta1' singleton='false'>
+ <update id='org.jboss.ide.eclipse.as.dmr.source' range='[0.0.0,2.3.0.v20120207-1253-Beta1)' severity='0'/>
+ <properties size='4'>
+ <property name='maven-groupId' value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId' value='org.jboss.ide.eclipse.as.dmr'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ <property name='maven-classifier' value='sources'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.jboss.ide.eclipse.as.dmr.source' version='2.3.0.v20120207-1253-Beta1'/>
+ <provided namespace='osgi.bundle' name='org.jboss.ide.eclipse.as.dmr.source' version='2.3.0.v20120207-1253-Beta1'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='source' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.jboss.ide.eclipse.as.dmr.source' version='2.3.0.v20120207-1253-Beta1'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-SymbolicName: org.jboss.ide.eclipse.as.dmr.source
Bundle-Version: 2.3.0.v20120207-1253-Beta1

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+</units>
Modified: trunk/as/plugins/pom.xml
===================================================================
--- trunk/as/plugins/pom.xml 2012-02-07 13:20:26 UTC (rev 38459)
+++ trunk/as/plugins/pom.xml 2012-02-07 13:25:27 UTC (rev 38460)
@@ -11,6 +11,7 @@
<name>as.plugins</name>
<packaging>pom</packaging>
<modules>
+ <module>org.jboss.ide.eclipse.as.dmr</module>
<module>org.jboss.ide.eclipse.archives.webtools</module>
<module>org.jboss.ide.eclipse.as.classpath.core</module>
<module>org.jboss.ide.eclipse.as.classpath.ui</module>
14 years, 2 months