JBoss Tools SVN: r44320 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates: jsf-2.1 and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-10-04 18:55:26 -0400 (Thu, 04 Oct 2012)
New Revision: 44320
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/javax.faces-2.1.13.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/demo/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/demo/User.java
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/resources.properties
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/index.html
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/resources/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/resources/demo/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/templates/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
Log:
JBIDE-12781
https://issues.jboss.org/browse/JBIDE-12781
Templates for JSF 2.1 project.
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2012-10-04 21:36:49 UTC (rev 44319)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -22,4 +22,9 @@
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-2.0" />
</version>
+ <version displayName="JSF 2.1" servlet-version="3.0" min-servlet-version="2.5">
+ <lib type="core" location="../lib/ApacheCommon2.3" />
+ <refLib type="servlet" location="../servlet" />
+ <projectTempl location="./jsf-2.1" />
+ </version>
</versions>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.preprocessing 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1 @@
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
+ <file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
+ location="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../JavaSource" NAME="src"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/lib" NAME="lib"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/classes" NAME="classes"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../ant" NAME="build"/>
+ <WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</file-systems>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ 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_1.xsd"
+ version="2.1">
+
+</faces-config>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/javax.faces-2.1.13.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/javax.faces-2.1.13.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+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-app_2_5.xsd">
+#elseif ($servlet_version == "3.0")
+<web-app version="3.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-app_3_0.xsd">
+#else
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+#end
+
+ <display-name>${project.name}</display-name>
+<!--
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+-->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.faces</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.preprocessing 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1 @@
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
+ <file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
+ location="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../JavaSource" NAME="src"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/lib" NAME="lib"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/classes" NAME="classes"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../ant" NAME="build"/>
+ <WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</file-systems>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ 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_1.xsd"
+ version="2.1">
+
+</faces-config>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+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-app_2_5.xsd">
+#elseif ($servlet_version == "3.0")
+<web-app version="3.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-app_3_0.xsd">
+#else
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+#end
+
+ <display-name>${project.name}</display-name>
+<!--
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+-->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.faces</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.preprocessing 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1 @@
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
+ <file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
+ location="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../JavaSource" NAME="src"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/lib" NAME="lib"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/classes" NAME="classes"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../ant" NAME="build"/>
+ <WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</file-systems>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/demo/User.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/demo/User.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/demo/User.java 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+/**
+ * Created by JBoss Tools
+ */
+@ManagedBean(name="user")
+@SessionScoped
+public class User {
+ private String name;
+
+ public User() {
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String sayHello() {
+ return "greeting";
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/demo/User.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/resources.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/resources.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/resources.properties 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/JavaSource/resources.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess">
+ <PROCESS-ITEM NAME="rules:#pages#greeting.xhtml"
+ PATH="/pages/greeting.xhtml" SHAPE="240,33,0,0" model-entity="JSFProcessGroup"/>
+ <PROCESS-ITEM NAME="rules:#pages#inputname.xhtml"
+ PATH="/pages/inputname.xhtml" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
+ <PROCESS-ITEM ID="rules:#pages#inputname.xhtml:0" NAME="item"
+ PATH="/pages/inputname.xhtml" model-entity="JSFProcessItem">
+ <PROCESS-ITEM-OUTPUT ID="greeting::#pages#greeting.xhtml"
+ NAME="output" PATH="/pages/greeting.xhtml"
+ TARGET="rules:#pages#greeting.xhtml" TITLE="greeting" model-entity="JSFProcessItemOutput"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+</PROCESS>
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ 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_1.xsd"
+ version="2.1">
+
+ <navigation-rule>
+ <from-view-id>/pages/inputname.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <application>
+ <resource-bundle>
+ <base-name>resources</base-name>
+ <var>msgs</var>
+ </resource-bundle>
+ </application>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+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-app_2_5.xsd">
+#elseif ($servlet_version == "3.0")
+<web-app version="3.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-app_3_0.xsd">
+#else
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+#end
+
+ <display-name>${project.name}</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.faces</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/index.html
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/index.html (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/index.html 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Refresh" content="0; URL=pages/inputname.jsf"/></head></html>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/index.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="/templates/common.xhtml">
+ <ui:define name="pageTitle">Greeting to User</ui:define>
+ <ui:define name="pageHeader">Greeting Page</ui:define>
+ <ui:define name="body">
+ #{msgs.greeting} #{user.name}!
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ez="http://java.sun.com/jsf/composite/demo">
+
+ <ui:composition template="/templates/common.xhtml">
+
+ <ui:define name="pageTitle">Input User Name</ui:define>
+
+ <ui:define name="pageHeader">JSF 2 Hello Application</ui:define>
+
+ <ui:define name="body">
+ <h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="inputname" />
+ <ez:input id="inputname" label="#{msgs.prompt}" value="#{user.name}" action="#{user.sayHello}" submitlabel="Say Hello"/>
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:composite="http://java.sun.com/jsf/composite">
+
+ <composite:interface>
+ <composite:attribute name="label"/>
+ <composite:attribute name="value" required="true"/>
+ <composite:attribute name="action" required="true" method-signature="java.lang.String f()"/>
+ <composite:attribute name="submitlabel"/>
+ </composite:interface>
+
+ <composite:implementation>
+ <h:form>
+ <h:outputText value="#{cc.attrs.label}" />
+ <h:inputText value="#{cc.attrs.value}" />
+ <h:commandButton action="#{cc.attrs.action}" value="#{cc.attrs.submitlabel}" />
+ </h:form>
+ </composite:implementation>
+</html>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.1/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml 2012-10-04 22:55:26 UTC (rev 44320)
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <head>
+ <title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ }
+ .header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ }
+ .bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+ }
+ </style>
+ </head>
+
+<body bgcolor="#ffffff">
+<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
+<tbody>
+
+ <tr>
+ <td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
+ <ui:insert name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%" valign="middle">
+
+ <ui:insert name="body">Page Body</ui:insert>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+</tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
12 years, 3 months
JBoss Tools SVN: r44319 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-10-04 17:36:49 -0400 (Thu, 04 Oct 2012)
New Revision: 44319
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java
Log:
Removed System.out
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java 2012-10-04 21:25:07 UTC (rev 44318)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java 2012-10-04 21:36:49 UTC (rev 44319)
@@ -155,7 +155,6 @@
try {
IFile f = null;
while((f = nextFile()) != null) {
- System.out.println("Reloading " + f);
reload(f);
}
} finally {
12 years, 3 months
JBoss Tools SVN: r44318 - trunk/maven/plugins/org.jboss.tools.maven.conversion.ui/src/org/jboss/tools/maven/conversion/ui/dialog.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-10-04 17:25:07 -0400 (Thu, 04 Oct 2012)
New Revision: 44318
Modified:
trunk/maven/plugins/org.jboss.tools.maven.conversion.ui/src/org/jboss/tools/maven/conversion/ui/dialog/IdentifyMavenDependencyPage.java
Log:
JBIDE-12529 fix dependencies not being properly seen as resolved
Modified: trunk/maven/plugins/org.jboss.tools.maven.conversion.ui/src/org/jboss/tools/maven/conversion/ui/dialog/IdentifyMavenDependencyPage.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.conversion.ui/src/org/jboss/tools/maven/conversion/ui/dialog/IdentifyMavenDependencyPage.java 2012-10-04 21:19:47 UTC (rev 44317)
+++ trunk/maven/plugins/org.jboss.tools.maven.conversion.ui/src/org/jboss/tools/maven/conversion/ui/dialog/IdentifyMavenDependencyPage.java 2012-10-04 21:25:07 UTC (rev 44318)
@@ -20,6 +20,7 @@
import java.util.concurrent.ConcurrentHashMap;
import org.apache.maven.model.Dependency;
+import org.codehaus.plexus.util.StringUtils;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -89,7 +90,7 @@
private List<ProjectDependency> initialEntries;
- private Map<Dependency, Boolean> dependencyResolution = new ConcurrentHashMap<Dependency, Boolean>();
+ private Map<String, Boolean> dependencyResolution = new ConcurrentHashMap<String, Boolean>();
private IProject project;
@@ -348,22 +349,13 @@
if(editDependencyDialog.open() == Window.OK) {
Dependency newDep = editDependencyDialog.getDependency();
dependencyMap.put(projectDep,newDep);
- if (!eq(newDep,d)) {
+ if (!getKey(newDep).equals(getKey(d))) {
resolve(projectDep, newDep);
}
}
}
}
- private boolean eq(Dependency newDep, Dependency d) {
- if (newDep == d) {
- return true;
- }
- if (d == null) {
- return false;
- }
- return newDep.toString().equals(d.toString());
- }
});
@@ -476,7 +468,7 @@
private void displayWarning() {
for (Dependency d : getDependencies()) {
- if (Boolean.FALSE.equals(dependencyResolution.get(d))) {
+ if (!isResolved(d)) {
setVisible(warningImg, true);
setVisible(warningLink, true);
return;
@@ -507,18 +499,6 @@
}
}
- private static String toString(Dependency d) {
- if (d == null) {
- return "Unidentified dependency";
- }
- StringBuilder text = new StringBuilder(d.getGroupId())
- .append(":")
- .append(d.getArtifactId())
- .append(":")
- .append(d.getVersion());
- return text.toString();
- }
-
private void initJobs() {
if (identificationJobs == null) {
identificationJobs = new HashMap<ProjectDependency, IdentificationJob>(dependencyMap.size());
@@ -567,7 +547,7 @@
Dependency d = job.getDependency();
dependencyMap.put(projectDep, d);
if (d != null) {
- dependencyResolution.put(d, job.isResolvable());
+ dependencyResolution.put(getKey(d), job.isResolvable());
}
refreshUI();
}
@@ -599,6 +579,17 @@
}
}
+ protected static String getKey(Dependency d) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(StringUtils.defaultString(d.getGroupId())).append(":");
+ sb.append(StringUtils.defaultString(d.getArtifactId())).append(":");
+ sb.append(StringUtils.defaultString(d.getVersion()));
+ if (StringUtils.isNotEmpty(d.getClassifier())) {
+ sb.append(":").append(d.getClassifier());
+ }
+ return sb.toString();
+ }
+
private synchronized void refresh(ProjectDependency key) {
if (dependenciesViewer == null || dependenciesViewer.getTable().isDisposed()) {
return;
@@ -660,7 +651,7 @@
if (d == null) {
return false;
}
- Boolean resolved = dependencyResolution.get(d);
+ Boolean resolved = dependencyResolution.get(getKey(d));
return resolved == null? false:resolved.booleanValue();
}
@@ -677,7 +668,10 @@
}
}
Dependency d = dependencyMap.get(projectDep);
- return IdentifyMavenDependencyPage.toString(d);
+ if (d == null) {
+ return "Unidentified dependency";
+ }
+ return IdentifyMavenDependencyPage.getKey(d);
}
@Override
12 years, 3 months
JBoss Tools SVN: r44317 - trunk/build/aggregate.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-10-04 17:19:47 -0400 (Thu, 04 Oct 2012)
New Revision: 44317
Modified:
trunk/build/aggregate/build.xml
Log:
add add.repo.properties task to all aggregate site builds; add cleanup (JBIDE-12432)
Modified: trunk/build/aggregate/build.xml
===================================================================
--- trunk/build/aggregate/build.xml 2012-10-04 21:19:41 UTC (rev 44316)
+++ trunk/build/aggregate/build.xml 2012-10-04 21:19:47 UTC (rev 44317)
@@ -18,6 +18,14 @@
</condition>
<mkdir dir="${COMMON_TOOLS}" />
+ <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <mkdir dir="${WORKINGDIR}" />
+
+ <tempfile property="tmpdir" destDir="${java.io.tmpdir}" prefix="aggregate-site-build"/>
+ <mkdir dir="${tmpdir}" />
+
<property name="update.site.source.dir" value="${output.dir}/target/site" />
<!-- load properties from file -->
@@ -53,27 +61,27 @@
<antcall target="get.saxon" />
</target>
- <target name="basic.build" description="JBT aggregate update site extra processing steps" depends="init,check.target,unpack.content.jar,remove.references,add.associate.sites,remove.uncategorized.category,add.web.content,pack.content.jar,pack.zip" />
- <target name="custom.build" description="JBT aggregate update site extra processing steps" depends="basic.build,collect.zips,collect.metadata,create.summary.file" />
+ <target name="basic.build" description="JBT aggregate update site extra processing steps" depends="init,check.target,add.repo.properties,unpack.content.jar,remove.references,add.associate.sites,remove.uncategorized.category,add.web.content,pack.content.jar,pack.zip,cleanup" />
+ <target name="custom.build" description="JBT aggregate update site extra processing steps" depends="basic.build,collect.zips,collect.metadata,create.summary.file,cleanup" />
<target name="get.ant-contrib" unless="ant-contrib.jar.exists">
<property name="ANTCONTRIB_MIRROR" value="http://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib..." />
<get usetimestamp="true" dest="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" src="${ANTCONTRIB_MIRROR}/ant-contrib-1.0b2-bin.zip" />
<touch file="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" />
- <mkdir dir="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" />
- <unzip src="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" dest="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" overwrite="true" />
- <copy file="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_/ant-contrib/lib/ant-contrib.jar" tofile="${COMMON_TOOLS}/ant-contrib.jar" failonerror="true" />
- <delete dir="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" includeemptydirs="true" quiet="true" />
+ <mkdir dir="${tmpdir}/ant-contrib-1.0b2-bin.zip_" />
+ <unzip src="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" dest="${tmpdir}/ant-contrib-1.0b2-bin.zip_" overwrite="true" />
+ <copy file="${tmpdir}/ant-contrib-1.0b2-bin.zip_/ant-contrib/lib/ant-contrib.jar" tofile="${COMMON_TOOLS}/ant-contrib.jar" failonerror="true" />
+ <delete dir="${tmpdir}/ant-contrib-1.0b2-bin.zip_" includeemptydirs="true" quiet="true" />
</target>
<target name="get.saxon" unless="saxon.jar.exists">
<!-- or use http://downloads.sourceforge.net/saxon/saxonhe9-3-0-4j.zip ? -->
<property name="SAXON_MIRROR" value="http://downloads.sourceforge.net/project/saxon/Saxon-HE/9.3/saxonhe9-3-0-..." />
<get usetimestamp="true" dest="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip" src="${SAXON_MIRROR}" />
- <mkdir dir="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" />
- <unzip src="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip" dest="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" overwrite="true" />
- <copy file="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_/saxon9he.jar" tofile="${COMMON_TOOLS}/saxon.jar" failonerror="true" />
- <delete dir="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" includeemptydirs="true" quiet="true" />
+ <mkdir dir="${tmpdir}/saxonhe9-3-0-4j.zip_" />
+ <unzip src="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip" dest="${tmpdir}/saxonhe9-3-0-4j.zip_" overwrite="true" />
+ <copy file="${tmpdir}/saxonhe9-3-0-4j.zip_/saxon9he.jar" tofile="${COMMON_TOOLS}/saxon.jar" failonerror="true" />
+ <delete dir="${tmpdir}/saxonhe9-3-0-4j.zip_" includeemptydirs="true" quiet="true" />
</target>
<!-- = = = = = = = = = = = = = = = = =
@@ -500,6 +508,62 @@
</if>
</target>
+ <target name="get.eclipse">
+ <ant antfile="../target-platforms/scripts/build.xml" target="get.eclipse">
+ <property name="getArch" value="${output.dir}/../../target-platforms/scripts/getArch.sh"/>
+ <property name="eclipse.version" value="4.2.1" />
+ <property name="eclipse.type" value="platform" />
+ <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..."/>
+ <property name="downloadDir" value="${WORKINGDIR}"/>
+ <property name="unpackDir" value="${tmpdir}"/>
+ </ant>
+ <var name="eclipseDir" value="${tmpdir}/eclipse"/>
+ </target>
+
+ <target name="install.releng.tools" depends="get.eclipse">
+ <!-- install releng tools; want more verbose output? use -consolelog -debug -console -->
+ <exec executable="${eclipseDir}/eclipse" failonerror="true" dir="${eclipseDir}" timeout="300000" taskname="p2">
+ <arg line=" -application org.eclipse.equinox.p2.director -nosplash -installIUs org.eclipse.wtp.releng.tools.feature.feature.group" />
+ <arg line=" -repository http://download.eclipse.org/webtools/releng/repository/" />
+ </exec>
+ </target>
+
+ <!-- adds download.stats properties to specified features and
+ <property name='p2.statsURI' value='https://devstudio.jboss.com/usage/juno/4.0.0.Beta1/'/>
+ -->
+ <target name="add.repo.properties" depends="install.releng.tools" description="use org.eclipse.wtp.releng.tools.addRepoProperties to add p2.statsURI and download.stats properties for a list of features">
+ <var name="SOURCE_REPO" value="${update.site.source.dir}"/>
+
+ <!-- TODO: externalize these to maven vars / Jenkins vars -->
+ <var name="TARGET_PLATFORM" value="juno"/>
+ <var name="TARGET_FOLDER" value="4.0.0.Beta1"/>
+
+ <var name="install" value=""/>
+ <for param="featureJar">
+ <path>
+ <fileset dir="${SOURCE_REPO}/features" includes="*.jar" />
+ </path>
+ <sequential>
+ <var name="feature.jarfile" unset="true" />
+ <var name="feature.id" unset="true" />
+ <propertyregex property="feature.jarfile" defaultvalue="@{featureJar}" input="@{featureJar}" regexp=".+/features/([^/]+\.jar)" replace="\1" override="true" />
+ <propertyregex property="feature.id" defaultvalue="${feature.jarfile}" input="${feature.jarfile}" regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar" replace="\1" override="true" />
+ <propertyregex property="feature.id" defaultvalue="${feature.id}" input="${feature.id}" regexp="([^_]+)_(\d+\.\d+\.\d+)\.jar" replace="\1" override="true" />
+ <var name="install" value="${install},${feature.id}" />
+ <var name="feature.jarfile" unset="true" />
+ <var name="feature.id" unset="true" />
+ </sequential>
+ </for>
+ <!-- trim prefix "," -->
+ <propertyregex property="install" input="${install}" defaultvalue="${install}" regexp=",(.+)" replace="\1" override="true" />
+ <echo level="debug">Features to track: ${install}</echo>
+ <var name="vmargs" value=" -DartifactRepoDirectory=${SOURCE_REPO} -DmetadataRepoDirectory=${SOURCE_REPO} -Dp2StatsURI=https://devstudio.jboss.com/usage/${TARGET_PLATFORM}/${TARGET_FOLDER}/ -DstatsArtifactsSuffix= -DstatsTrackedArtifacts=${install}"/>
+ <!-- run releng tools; want more verbose output? use -consolelog -debug -console -->
+ <exec executable="${eclipseDir}/eclipse" failonerror="true" dir="${eclipseDir}" timeout="300000" taskname="add">
+ <arg line=" -application org.eclipse.wtp.releng.tools.addRepoProperties -nosplash -data ${tmpdir}/workspace -consolelog --launcher.suppressErrors -vmargs ${vmargs}" />
+ </exec>
+ </target>
+
<target name="add.web.content">
<!--
Properties calculated here
@@ -878,4 +942,8 @@
</antcall>
</target>
+ <target name="cleanup">
+ <delete dir="${tmpdir}" quiet="true" includeemptydirs="true" />
+ </target>
+
</project>
12 years, 3 months
JBoss Tools SVN: r44316 - trunk/build/aggregate.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-10-04 17:19:41 -0400 (Thu, 04 Oct 2012)
New Revision: 44316
Modified:
trunk/build/aggregate/p2stats.sh
Log:
cleanup temp folder when done; list more features to tweak
Modified: trunk/build/aggregate/p2stats.sh
===================================================================
--- trunk/build/aggregate/p2stats.sh 2012-10-04 21:19:34 UTC (rev 44315)
+++ trunk/build/aggregate/p2stats.sh 2012-10-04 21:19:41 UTC (rev 44316)
@@ -26,11 +26,22 @@
# set up script params; '&' should NOT be unescaped; p2 api (or underlying xml) will escape it.
# to add p2MirrorsURL, use something like "-Dp2MirrorsURL=http://www.eclipse.org/downloads/download.php?format=xml&file=/project/releases/repository/"
-devArgs=" "
-devArgs="${devArgs} -DartifactRepoDirectory=${SOURCE_REPO} -DmetadataRepoDirectory=${SOURCE_REPO} "
-devArgs="${devArgs} -Dp2StatsURI=https://devstudio.jboss.com/usage/${TARGET_PLATFORM}/${TARGET_FOLDER}/ -DstatsArtifactsSuffix= "
-devArgs="${devArgs} -DstatsTrackedArtifacts=org.jboss.tools.jmx.feature,org.jboss.ide.eclipse.archives.feature,org.jboss.ide.eclipse.as.serverAdapter.wtp.feature,org.jboss.ide.eclipse.as.feature"
+features=""
+features="${features}org.hibernate.eclipse.feature,org.jboss.ide.eclipse.archives.feature,org.jboss.ide.eclipse.as.feature,org.jboss.ide.eclipse.freemarker.feature,"
+features="${features}org.jboss.tools.cdi.deltaspike.feature,org.jboss.tools.cdi.feature,org.jboss.tools.cdi.seam.feature,org.jboss.tools.common.jdt.feature,"
+features="${features}org.jboss.tools.common.mylyn.feature,org.jboss.tools.community.central.feature,org.jboss.tools.community.project.examples.feature,org.jboss.tools.forge.feature,"
+features="${features}org.jboss.tools.jmx.feature,org.jboss.tools.jsf.feature,org.jboss.tools.jst.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.feature,"
+features="${features}org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature,org.jboss.tools.maven.jbosspackaging.feature,org.jboss.tools.maven.jdt.feature,"
+features="${features}org.jboss.tools.maven.jpa.feature,org.jboss.tools.maven.jsf.feature,org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.profiles.feature,"
+features="${features}org.jboss.tools.maven.project.examples.feature,org.jboss.tools.maven.seam.feature,org.jboss.tools.maven.sourcelookup.feature,"
+features="${features}org.jboss.tools.openshift.egit.integration.feature,org.jboss.tools.openshift.express.feature,org.jboss.tools.portlet.feature,"
+features="${features}org.jboss.tools.project.examples.feature,org.jboss.tools.richfaces.feature,org.jboss.tools.runtime.core.feature,org.jboss.tools.runtime.seam.detector.feature,"
+features="${features}org.jboss.tools.seam.feature,org.jboss.tools.usage.feature,org.jboss.tools.vpe.browsersim.feature,org.jboss.tools.vpe.feature,org.jboss.tools.ws.feature,"
+features="${features}org.jboss.tools.ws.jaxrs.feature"
+#features="org.jboss.tools.jmx.feature,org.jboss.ide.eclipse.archives.feature,org.jboss.ide.eclipse.as.serverAdapter.wtp.feature,org.jboss.ide.eclipse.as.feature"
+devArgs=" -DartifactRepoDirectory=${SOURCE_REPO} -DmetadataRepoDirectory=${SOURCE_REPO} -Dp2StatsURI=https://devstudio.jboss.com/usage/${TARGET_PLATFORM}/${TARGET_FOLDER}/ -DstatsArtifactsSuffix= -DstatsTrackedArtifacts=${features}"
+
JAVA_6_HOME=/opt/jdk1.6.0
devJRE=${JAVA_6_HOME}/bin/java
APP_NAME=org.eclipse.wtp.releng.tools.addRepoProperties
@@ -50,4 +61,6 @@
# more debug output with -consolelog -debug -console
${eclipse} -nosplash -data $devworkspace --launcher.suppressErrors -application ${APP_NAME} -vm $devJRE -vmargs $devArgs
-echo "Repo in ${SOURCE_REPO} processed."
\ No newline at end of file
+rm -fr ${BUILD_HOME}
+
+echo "Repo in ${SOURCE_REPO} processed."
12 years, 3 months
JBoss Tools SVN: r44315 - trunk/build/target-platforms/scripts.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-10-04 17:19:34 -0400 (Thu, 04 Oct 2012)
New Revision: 44315
Modified:
trunk/build/target-platforms/scripts/build.xml
Log:
improvements to target-platforms/scripts/build.xml in support of JBIDE-12432
Modified: trunk/build/target-platforms/scripts/build.xml
===================================================================
--- trunk/build/target-platforms/scripts/build.xml 2012-10-04 21:11:23 UTC (rev 44314)
+++ trunk/build/target-platforms/scripts/build.xml 2012-10-04 21:19:34 UTC (rev 44315)
@@ -5,7 +5,8 @@
if useLatest = false, include versions and fetch specific versions requested. -->
<property name="useLatest" value="false" />
- <property name="tmpdir" value="${java.io.tmpdir}/target-platform-build" />
+ <tempfile property="tmpdir" destDir="${java.io.tmpdir}" prefix="target-platform-build"/>
+ <mkdir dir="${tmpdir}" />
<condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}">
<available file="/home/hudson/static_build_env/jbds" type="dir" />
@@ -62,7 +63,7 @@
<!-- to install from the target platform repo, first build the repo, then install using p2.director -->
<target name="install" depends="build.local.target.platform.repo, install.local.target.platform.repo" />
- <target name="build.local.target.platform.repo" depends="init, get.arch, get.eclipse, gen.p2mirror.script, run.p2mirror.script, cleanup" />
+ <target name="build.local.target.platform.repo" depends="init, get.eclipse, gen.p2mirror.script, run.p2mirror.script, cleanup" />
<!-- ********************************************************************************** -->
@@ -81,10 +82,10 @@
<property name="ANTCONTRIB_MIRROR" value="http://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib..." />
<get usetimestamp="true" dest="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" src="${ANTCONTRIB_MIRROR}/ant-contrib-1.0b2-bin.zip/download" />
<touch file="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" />
- <mkdir dir="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" />
- <unzip src="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" dest="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" overwrite="true" />
- <copy file="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_/ant-contrib/lib/ant-contrib.jar" tofile="${COMMON_TOOLS}/ant-contrib.jar" failonerror="true" />
- <delete dir="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" includeemptydirs="true" quiet="true" />
+ <mkdir dir="${tmpdir}/ant-contrib-1.0b2-bin.zip_" />
+ <unzip src="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" dest="${tmpdir}/ant-contrib-1.0b2-bin.zip_" overwrite="true" />
+ <copy file="${tmpdir}/ant-contrib-1.0b2-bin.zip_/ant-contrib/lib/ant-contrib.jar" tofile="${COMMON_TOOLS}/ant-contrib.jar" failonerror="true" />
+ <delete dir="${tmpdir}/ant-contrib-1.0b2-bin.zip_" includeemptydirs="true" quiet="true" />
</target>
<target name="get.arch">
@@ -125,24 +126,25 @@
</target>
<!-- should work on osx-cocoa32, win32, lin32, lin64 -->
- <target name="get.eclipse">
+ <target name="get.eclipse" depends="get.arch">
<!-- NOTE: must use same platform (50M) or SDK (103M - 168M) version as feature version on target platform, or will get install/update conflicts -->
<!-- don't forget to increment these files when moving up a version:
build.xml, *.target*, publish.sh, target2p2mirror.xml -->
<!-- also jbds/trunk/releng/org.jboss.ide.eclipse.releng/requirements/jbds-target-platform/build.properties
also all devstudio-5.0_*.updatesite jobs (4) need to be pointed at the new Target Platform URL
-->
- <!-- http://download.eclipse.org/eclipse/downloads/drops/M20120201-1336/downlo... -->
+ <!-- http://download.eclipse.org/eclipse/downloads/drops4/M20120201-1336/downl... -->
<!-- http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.2-... -->
<!-- eclipse-platform-3.8M6-linux-gtk-x86_64.tar.gz -->
<!-- eclipse-platform-3.7.2-linux-gtk-x86_64.tar.gz -->
- <!-- <property name="eclipse.version" value="4.2" />
+ <property name="eclipse.version" value="4.2.1" />
<property name="eclipse.type" value="platform" />
- <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..."/> -->
- <property name="eclipse.version" value="M20120829-1000" />
+ <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..."/>
+ <property name="downloadDir" value="${WORKINGDIR}"/>
+ <property name="unpackDir" value="${WORKINGDIR}/eclipse-${eclipse.version}"/>
+ <!-- <property name="eclipse.version" value="M20120829-1000" />
<property name="eclipse.type" value="platform" />
- <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..."/>
-
+ <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..."/> -->
<if>
<equals arg1="${arch}" arg2="x86" />
<then>
@@ -155,34 +157,20 @@
<if>
<not>
- <available file="${WORKINGDIR}/${eclipse.file}" type="file" />
+ <available file="${downloadDir}/${eclipse.file}" type="file" />
</not>
<then>
- <get src="${eclipse.URL}/${eclipse.file}" dest="${WORKINGDIR}/${eclipse.file}" ignoreerrors="false"/>
+ <get src="${eclipse.URL}/${eclipse.file}" dest="${downloadDir}/${eclipse.file}" ignoreerrors="false"/>
</then>
</if>
<!-- purge previous eclipse install to avoid conflicts w/ Eclipse feature versions -->
- <delete dir="${WORKINGDIR}/eclipse-${eclipse.version}" includeemptydirs="true" quiet="true" />
+ <delete dir="${unpackDir}" includeemptydirs="true" quiet="true" />
- <untar compression="gzip" dest="${WORKINGDIR}/eclipse-${eclipse.version}" src="${WORKINGDIR}/${eclipse.file}" overwrite="true" />
+ <untar compression="gzip" dest="${unpackDir}" src="${downloadDir}/${eclipse.file}" overwrite="true" />
- <!-- add 70M delta pack, eg. http://download.eclipse.org/eclipse/downloads/drops/M20101006-0936/downlo... -->
- <!-- ONLY need deltapack if using -Dtycho.targetPlatform, which is now depredated
- <property name="deltapack.file" value="eclipse-${eclipse.version}-delta-pack.zip"/>
- <if>
- <not>
- <available file="${WORKINGDIR}/${deltapack.file}" type="file" />
- </not>
- <then>
- <get src="${eclipse.URL}/${deltapack.file}" dest="${WORKINGDIR}/${deltapack.file}" />
- </then>
- </if>
- <unzip src="${WORKINGDIR}/${deltapack.file}" dest="${WORKINGDIR}" overwrite="true"/>
- -->
-
<!-- make eclipse executable -->
- <chmod perm="+x" file="${WORKINGDIR}/eclipse-${eclipse.version}/eclipse/eclipse" />
+ <chmod perm="+x" file="${unpackDir}/eclipse/eclipse" />
</target>
@@ -246,7 +234,7 @@
Source Repo(s): ${p2.director.input.repo}
Install Path: ${p2.director.install.path}
Feature(s) or Plugin(s) to Install:
-${install}
+${p2.director.installIU}
</echo>
<mkdir dir="${p2.director.install.path}" />
@@ -258,11 +246,11 @@
<arg line=" -consoleLog" />
<arg line=" -flavor tooling" />
<arg line=" -roaming" />
- <arg line=" -profile SDKProfile" />
+ <arg line=" -profile PlatformProfile" />
<arg line=" -destination ${p2.director.install.path}" />
<arg line=" -bundlepool ${p2.director.install.path}" />
<arg line=" -installIU ${p2.director.installIU}" />
- <arg line=" -metadataRepository ${p2.director.input.repo},file://${p2.director.install.path}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" />
+ <arg line=" -metadataRepository ${p2.director.input.repo},file://${p2.director.install.path}/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile" />
<arg line=" -artifactRepository ${p2.director.input.repo},file://${p2.director.install.path}" />
<arg line=" -profileProperties org.eclipse.update.install.features=true" />
<arg line=" -vmargs" />
12 years, 3 months
JBoss Tools SVN: r44314 - in trunk/common/plugins/org.jboss.tools.common.ui: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-10-04 17:11:23 -0400 (Thu, 04 Oct 2012)
New Revision: 44314
Added:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceDialog.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceHandler.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterServiceUtil.java
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceCreationWizard.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceWizardPage.java
Log:
JBIDE-12793
https://issues.jboss.org/browse/JBIDE-12793
Action and dialog 'Register As Service' are implemented.
Modified: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2012-10-04 20:27:48 UTC (rev 44313)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2012-10-04 21:11:23 UTC (rev 44314)
@@ -32,6 +32,7 @@
org.eclipse.ltk.ui.refactoring;bundle-version="3.6.0",
org.eclipse.wst.server.ui;bundle-version="1.3.0",
org.eclipse.jdt.junit;bundle-version="3.7.0",
+ org.eclipse.core.expressions,
org.jboss.tools.common.text.xml
Export-Package: org.jboss.tools.common.ui,
org.jboss.tools.common.ui.databinding,
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2012-10-04 20:27:48 UTC (rev 44313)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2012-10-04 21:11:23 UTC (rev 44314)
@@ -77,4 +77,39 @@
</extension>
+ <extension point="org.eclipse.ui.commands">
+ <command
+ name="Register As Service"
+ defaultHandler="org.jboss.tools.common.ui.wizard.service.RegisterAsServiceHandler"
+ id="org.jboss.tools.common.ui.RegisterAsService">
+ </command>
+
+ </extension>
+
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <command
+ commandId="org.jboss.tools.common.ui.RegisterAsService"
+ label="Register As Service...">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ <!--visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="1" />
+ <or>
+ <iterate>
+ <adapt type="org.eclipse.jdt.core.IType" />
+ </iterate>
+ <iterate>
+ <adapt type="org.eclipse.jdt.core.ICompilationUnit" />
+ </iterate>
+ </or>
+ </with>
+ </visibleWhen-->
+ </command>
+ </menuContribution>
+ </extension>
</plugin>
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java 2012-10-04 20:27:48 UTC (rev 44313)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java 2012-10-04 21:11:23 UTC (rev 44314)
@@ -94,6 +94,14 @@
public static String NEW_SERVICE_WIZARD_SERVICE_TYPE_CONCRETE;
public static String NEW_SERVICE_WIZARD_SELECT_SERVICE_TYPE_TITLE;
+ public static String REGISTER_AS_SERVICE_TITLE;
+ public static String REGISTER_AS_SERVICE_SUB_TITLE;
+ public static String REGISTER_AS_SERVICE_MESSAGE;
+ public static String REGISTER_AS_SERVICE_NO_TYPES_MESSAGE;
+ public static String REGISTER_AS_SERVICE_TYPE_LABEL;
+ public static String REGISTER_AS_SERVICE_NON_ABSTRACT_MESSAGE;
+ public static String REGISTER_AS_SERVICE_ALREADY_REGISTERED_MESSAGE;
+
static {
NLS.initializeMessages(BUNDLE_NAME, CommonUIMessages.class);
}
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2012-10-04 20:27:48 UTC (rev 44313)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2012-10-04 21:11:23 UTC (rev 44314)
@@ -50,6 +50,12 @@
NEW_SERVICE_WIZARD_SERVICE_TYPE_EMPTY=Please select service type.
NEW_SERVICE_WIZARD_SERVICE_TYPE_NOT_EXISTS=Type {0} does not exist.
NEW_SERVICE_WIZARD_SERVICE_TYPE_FINAL=Service type cannot be final.
-NEW_SERVICE_WIZARD_SERVICE_TYPE_CONCRETE=Non-abstract service type is discouraged.
+NEW_SERVICE_WIZARD_SERVICE_TYPE_CONCRETE=Non-abstract service type is discouraged.Service Provider
NEW_SERVICE_WIZARD_SELECT_SERVICE_TYPE_TITLE=Select Service Type
-
+REGISTER_AS_SERVICE_TITLE=Register As Service
+REGISTER_AS_SERVICE_SUB_TITLE=Service Provider {0}
+REGISTER_AS_SERVICE_MESSAGE=Select Service Type
+REGISTER_AS_SERVICE_NO_TYPES_MESSAGE=This type does not implement any service type.
+REGISTER_AS_SERVICE_TYPE_LABEL=Service Type:
+REGISTER_AS_SERVICE_NON_ABSTRACT_MESSAGE=The use of a non-abstract type as a service type is discouraged.
+REGISTER_AS_SERVICE_ALREADY_REGISTERED_MESSAGE=This type is already registered for the selected service type.
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceCreationWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceCreationWizard.java 2012-10-04 20:27:48 UTC (rev 44313)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceCreationWizard.java 2012-10-04 21:11:23 UTC (rev 44314)
@@ -11,25 +11,17 @@
package org.jboss.tools.common.ui.wizard.service;
-import java.io.ByteArrayInputStream;
-
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
import org.eclipse.jdt.ui.wizards.NewClassWizardPage;
import org.eclipse.jdt.ui.wizards.NewTypeWizardPage;
-import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.ui.CommonUIMessages;
import org.jboss.tools.common.ui.CommonUIPlugin;
-import org.jboss.tools.common.util.FileUtil;
/**
*
@@ -56,7 +48,6 @@
if (fPage == null) {
fPage = new NewServiceWizardPage();
((NewClassWizardPage)fPage).init(getSelection());
- //init page
}
addPage(fPage);
}
@@ -88,55 +79,12 @@
}
private void registerService() throws CoreException {
+ IProject project = fPage.getCreatedType().getResource().getProject();
String typeName = fPage.getCreatedType().getFullyQualifiedName();
String serviceType = ((NewServiceWizardPage)fPage).getServiceRawType();
- IContainer f = getServiceFolder();
- if(f != null) {
- IFile file = f.getFile(new Path(serviceType));
- if(file.exists()) {
- String content = FileUtil.readStream(file);
- if(content.length() > 0 && !content.endsWith("\n")) { //$NON-NLS-1$
- content += "\n"; //$NON-NLS-1$
- }
- content += typeName;
- file.setContents(new ByteArrayInputStream(content.getBytes()), true, true, new NullProgressMonitor());
- } else {
- String content = typeName;
- file.create(new ByteArrayInputStream(content.getBytes()), true, new NullProgressMonitor());
- }
- }
+ RegisterServiceUtil.registerService(project, typeName, serviceType);
}
- static final String META_INF_FOLDER_NAME = "META-INF"; //$NON-NLS-1$
- static final String SERVICES_FOLDER_NAME = "services"; //$NON-NLS-1$
-
- private IFolder getServiceFolder() throws CoreException {
- IContainer m = getMetaInf();
- if(m != null) {
- IFolder ss = m.getFolder(new Path(SERVICES_FOLDER_NAME));
- if(!ss.exists()) {
- ss.create(true, true, new NullProgressMonitor());
- }
- return ss;
- }
- return null;
- }
-
- private IContainer getMetaInf() throws CoreException {
- IProject project = fPage.getCreatedType().getResource().getProject();
- IResource[] rs = EclipseUtil.getJavaSourceRoots(project);
- if(rs == null || rs.length == 0) {
- return null;
- }
- for (IResource r: rs) {
- IFolder f = ((IContainer)r).getFolder(new Path(META_INF_FOLDER_NAME));
- if(f.exists()) return f;
- }
- IFolder f = ((IContainer)rs[0]).getFolder(new Path(META_INF_FOLDER_NAME));
- f.create(true, true, new NullProgressMonitor());
- return f;
- }
-
@Override
protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
fPage.createType(monitor); // use the full progress monitor
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceWizardPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceWizardPage.java 2012-10-04 20:27:48 UTC (rev 44313)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/NewServiceWizardPage.java 2012-10-04 21:11:23 UTC (rev 44314)
@@ -221,6 +221,10 @@
return null;
}
});
+ List<String> s = getSuperInterfaces();
+ if(!s.isEmpty()) {
+ setServiceType(s.get(0));
+ }
interfaceField.doFillIntoGrid(composite);
interfaceField.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceDialog.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceDialog.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceDialog.java 2012-10-04 21:11:23 UTC (rev 44314)
@@ -0,0 +1,160 @@
+package org.jboss.tools.common.ui.wizard.service;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.common.java.IParametedType;
+import org.jboss.tools.common.ui.CommonUIMessages;
+import org.jboss.tools.common.ui.CommonUIPlugin;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditorFactory;
+
+public class RegisterAsServiceDialog extends TitleAreaDialog {
+ IType type;
+ Map<String, IParametedType> types;
+ IFieldEditor serviceTypeSelector;
+ String result;
+
+ public RegisterAsServiceDialog(Shell parentShell, IType type, Map<String, IParametedType> types) {
+ super(parentShell);
+ this.type = type;
+ this.types = types;
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ List<String> serviceTypeNames = new ArrayList<String>(types.keySet());
+ String defaultValue = serviceTypeNames.isEmpty() ? "" : serviceTypeNames.get(0);
+ serviceTypeSelector = IFieldEditorFactory.INSTANCE.createComboEditor("serviceType", //$NON-NLS-1$
+ CommonUIMessages.REGISTER_AS_SERVICE_TYPE_LABEL, serviceTypeNames, defaultValue);
+ }
+
+ private final int DIALOG_WIDTH = 400;
+ private final int DIALOG_HEIGHT = 60;
+
+ protected Control createDialogArea(Composite parent) {
+ getShell().setText(CommonUIMessages.REGISTER_AS_SERVICE_TITLE);
+ setTitle(NLS.bind(CommonUIMessages.REGISTER_AS_SERVICE_SUB_TITLE, type.getFullyQualifiedName()));
+// setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT)); // image is managed by registry
+ setMessage(CommonUIMessages.REGISTER_AS_SERVICE_MESSAGE);
+ if(types.isEmpty()) {
+ setErrorMessage(CommonUIMessages.REGISTER_AS_SERVICE_NO_TYPES_MESSAGE);
+ }
+
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ gridLayout.marginHeight = 5;
+ gridLayout.marginWidth = 5;
+ gridLayout.horizontalSpacing = 10;
+ gridLayout.verticalSpacing = 0;
+ composite.setLayout(gridLayout);
+
+ Label dialogAreaSeparator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ dialogAreaSeparator.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+
+ Control pageArea = createField(composite);
+ GridData gd = new GridData(SWT.FILL, SWT.BEGINNING, true, true);
+ pageArea.setLayoutData(gd);
+
+ dialogAreaSeparator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ dialogAreaSeparator.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd.widthHint = DIALOG_WIDTH;
+ gd.heightHint = DIALOG_HEIGHT;
+ composite.setLayoutData(gd);
+
+ return composite;
+ }
+
+ Control createField(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(2, false);
+ gridLayout.marginHeight = 10;
+ gridLayout.marginWidth = 0;
+ gridLayout.horizontalSpacing = 10;
+ gridLayout.verticalSpacing = 10;
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ composite.setLayoutData(gd);
+ composite.setLayout(gridLayout);
+ serviceTypeSelector.doFillIntoGrid(composite);
+ Object[] os = serviceTypeSelector.getEditorControls();
+ if(os.length == 2 && os[1] instanceof Combo) {
+ ((Combo)os[1]).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ }
+ serviceTypeSelector.addPropertyChangeListener(new PropertyChangeListener() {
+
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ validate();
+ }
+ });
+ return composite;
+ }
+
+ void validate() {
+ String serviceType = serviceTypeSelector.getValueAsString();
+ if(serviceType == null || serviceType.length() == 0) {
+ return;
+ }
+ IParametedType type = types.get(serviceType);
+ String warning = null;
+ if(type != null) {
+ IType t = type.getType();
+ try {
+ if(!t.isInterface() && !Flags.isAbstract(t.getFlags())) {
+ warning = CommonUIMessages.REGISTER_AS_SERVICE_NON_ABSTRACT_MESSAGE;
+ }
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ }
+ String typeName = this.type.getFullyQualifiedName();
+ if(RegisterServiceUtil.isServiceRegistered(type.getType().getJavaProject().getProject(), typeName, serviceType)) {
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ setMessage(CommonUIMessages.REGISTER_AS_SERVICE_ALREADY_REGISTERED_MESSAGE, IMessageProvider.ERROR);
+ } else {
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ if(warning != null) {
+ setMessage(warning, IMessageProvider.WARNING);
+ } else {
+ setMessage(CommonUIMessages.REGISTER_AS_SERVICE_MESSAGE);
+ }
+ }
+ }
+
+ protected Control createContents(Composite parent) {
+ Control c = super.createContents(parent);
+ if(types.isEmpty()) {
+ Button ok = getButton(IDialogConstants.OK_ID);
+ ok.setEnabled(false);
+ }
+ validate();
+ return c;
+ }
+
+ protected void okPressed() {
+ result = serviceTypeSelector.getValueAsString();
+ super.okPressed();
+ }
+
+ public String getResult() {
+ return result;
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceDialog.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceHandler.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceHandler.java 2012-10-04 21:11:23 UTC (rev 44314)
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui.wizard.service;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.common.java.IParametedType;
+import org.jboss.tools.common.java.ParametedType;
+import org.jboss.tools.common.java.ParametedTypeFactory;
+import org.jboss.tools.common.ui.CommonUIPlugin;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class RegisterAsServiceHandler extends AbstractHandler {
+
+ public RegisterAsServiceHandler() {
+ }
+
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ setBaseEnabled(computeEnabled(evaluationContext));
+ }
+
+ private boolean computeEnabled(Object evaluationContext) {
+ if(evaluationContext instanceof IEvaluationContext) {
+ IEvaluationContext c = (IEvaluationContext)evaluationContext;
+ ISelection selection = (ISelection)c.getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
+ return getSelectedType(selection) != null;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the first IType from selection which is a concrete class.
+ * @param selection
+ * @return
+ */
+ private IType getSelectedType(ISelection selection) {
+ if(selection != null && !selection.isEmpty() && (selection instanceof IStructuredSelection)) {
+ for (Object selected: ((IStructuredSelection)selection).toList()) {
+ try {
+ if(selected instanceof ICompilationUnit) {
+ ICompilationUnit u = (ICompilationUnit)selected;
+ for(IType type: u.getTypes()) {
+ if(accept(type)) {
+ return type;
+ }
+ }
+ } else if(selected instanceof IType) {
+ IType type = (IType)selected;
+ if(accept(type)) {
+ return type;
+ }
+ }
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ }
+ }
+ return null;
+ }
+
+ private boolean accept(IType type) throws CoreException {
+ return !type.isInterface() && !type.isAnnotation() && !Flags.isAbstract(type.getFlags());
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
+ ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event).getSelectionService().getSelection();
+ IType type = getSelectedType(selection);
+ if(type == null) {
+ return null;
+ }
+ try {
+ ParametedType parametedType = new ParametedTypeFactory().newParametedType(type);
+ Collection<IParametedType> ts = parametedType.getAllTypes();
+ Map<String, IParametedType> types = new TreeMap<String, IParametedType>();
+ for (IParametedType t: ts) {
+ if(t.getType() != null) {
+ String q = t.getType().getFullyQualifiedName();
+ types.put(q, t);
+ }
+ }
+ types.remove("java.lang.Object"); //$NON-NLS-1$
+ types.remove(type.getFullyQualifiedName());
+
+ RegisterAsServiceDialog dialog = new RegisterAsServiceDialog(HandlerUtil.getActiveShell(event), type, types);
+ dialog.create();
+
+ int i = dialog.open();
+ if(i == IDialogConstants.OK_ID) {
+ IProject project = type.getJavaProject().getProject();
+ String typeName = type.getFullyQualifiedName();
+ String serviceType = dialog.getResult();
+ RegisterServiceUtil.registerService(project, typeName, serviceType);
+ }
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterAsServiceHandler.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterServiceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterServiceUtil.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterServiceUtil.java 2012-10-04 21:11:23 UTC (rev 44314)
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui.wizard.service;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.ui.CommonUIPlugin;
+import org.jboss.tools.common.util.FileUtil;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class RegisterServiceUtil {
+ static final String META_INF_FOLDER_NAME = "META-INF"; //$NON-NLS-1$
+ static final String SERVICES_FOLDER_NAME = "services"; //$NON-NLS-1$
+
+ /**
+ * Returns true if class %typeName% is listed in existing file
+ * META-INF/services/%serviceType% in a Java source folder of the project.
+ *
+ * @param project
+ * @param typeName
+ * @param serviceType
+ * @return
+ * @throws CoreException
+ */
+ public static boolean isServiceRegistered(IProject project, String typeName, String serviceType) {
+ try {
+ IContainer f = getServiceFolder(project, false);
+ if(f == null || !f.exists()) {
+ return false;
+ }
+ IFile file = f.getFile(new Path(serviceType));
+ return file.exists() && contains(FileUtil.readStream(file), typeName);
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if %content% contains %typeName% separated from other text by whitespaces.
+ *
+ * @param content
+ * @param typeName
+ * @return
+ */
+ private static boolean contains(String content, String typeName) {
+ int p = content.indexOf(typeName);
+ while(p >= 0) {
+ int p0 = p;
+ p += typeName.length();
+ if((p == content.length() || Character.isWhitespace(content.charAt(p)))
+ && (p0 == 0 || Character.isWhitespace(content.charAt(p0 - 1))) ) {
+ //registered already
+ return true;
+ }
+ p = content.indexOf(typeName, p);
+ }
+ return false;
+ }
+
+ /**
+ * Includes class %typeName% into file META-INF/services/%serviceType%
+ * in a Java source folder of the project, if it is not registered yet.
+ * If the file does not exist, it is created in the first Java source folder.
+ * Existence of a Java source folder is evident by clients of this method:
+ * (1) Service creation wizard that creates a new Java class in existing Java source;
+ * (2) Service registration context action, that is run on selected IType or ICompilationUnit in existing Java source. *
+ *
+ * @param project
+ * @param typeName
+ * @param serviceType
+ * @throws CoreException
+ */
+ public static void registerService(IProject project, String typeName, String serviceType) throws CoreException {
+ IContainer f = getServiceFolder(project, true);
+ if(f != null) {
+ IFile file = f.getFile(new Path(serviceType));
+ if(file.exists()) {
+ String content = FileUtil.readStream(file);
+ if(contains(content, typeName)) {
+ return;
+ }
+ if(content.length() > 0 && !content.endsWith("\n")) { //$NON-NLS-1$
+ content += "\n"; //$NON-NLS-1$
+ }
+ content += typeName;
+ file.setContents(new ByteArrayInputStream(content.getBytes()), true, true, new NullProgressMonitor());
+ } else {
+ String content = typeName;
+ file.create(new ByteArrayInputStream(content.getBytes()), true, new NullProgressMonitor());
+ }
+ }
+ }
+
+ /**
+ * Returns the first existing 'META-INF/services' folder in a Java source folder,
+ * or newly created 'META-INF/services' folder in an existing Java source folder if 'create' is set to true,
+ * or null.
+ *
+ * @param project
+ * @param create
+ * @return
+ * @throws CoreException
+ */
+ private static IFolder getServiceFolder(IProject project, boolean create) throws CoreException {
+ IContainer m = getMetaInf(project, create);
+ if(m != null) {
+ IFolder ss = m.getFolder(new Path(SERVICES_FOLDER_NAME));
+ if(!ss.exists()) {
+ if(!create) {
+ return null;
+ }
+ ss.create(true, true, new NullProgressMonitor());
+ }
+ return ss;
+ }
+ return null;
+ }
+
+ /**
+ * Returns the first existing META-INF folder in a Java source folder,
+ * or newly created META-INF folder in an existing Java source folder if 'create' is set to true,
+ * or null.
+ *
+ * @param project
+ * @param create
+ * @return
+ * @throws CoreException
+ */
+ private static IContainer getMetaInf(IProject project, boolean create) throws CoreException {
+ IResource[] rs = EclipseUtil.getJavaSourceRoots(project);
+ if(rs == null || rs.length == 0) {
+ return null;
+ }
+ for (IResource r: rs) {
+ IFolder f = ((IContainer)r).getFolder(new Path(META_INF_FOLDER_NAME));
+ if(f.exists()) return f;
+ }
+ if(!create) {
+ return null;
+ }
+ IFolder f = ((IContainer)rs[0]).getFolder(new Path(META_INF_FOLDER_NAME));
+ f.create(true, true, new NullProgressMonitor());
+ return f;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/wizard/service/RegisterServiceUtil.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 3 months
JBoss Tools SVN: r44313 - trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-10-04 16:27:48 -0400 (Thu, 04 Oct 2012)
New Revision: 44313
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
Log:
Duplicate OpenOns (hyperlinks) in faces-config.xml for property name https://issues.jboss.org/browse/JBIDE-12801
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2012-10-04 20:08:57 UTC (rev 44312)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2012-10-04 20:27:48 UTC (rev 44313)
@@ -755,7 +755,7 @@
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
</contenttypeidentifier>
</hyperlink>
-
+
<hyperlink
class="org.jboss.tools.jsf.text.ext.hyperlink.RenderKitHyperlink"
id="org.jboss.tools.common.text.ext.jsf.hyperlink.RenderKitHyperlink">
@@ -995,24 +995,7 @@
</contenttypeidentifier>
</hyperlink>
- <!-- Faces Config File -->
- <hyperlink
- class="org.jboss.tools.jsf.text.ext.hyperlink.PropertyHyperlink"
- id="org.jboss.tools.common.text.ext.jsf.hyperlink.PropertyHyperlink">
- <contenttypeidentifier id="org.eclipse.jst.jsf.facesconfig.facesConfigFile">
- <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.eclipse.wst.xml.core.xmlsource">
- <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.eclipse.core.runtime.xml">
- <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
- <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
- </contenttypeidentifier>
- </hyperlink>
- <!-- Faces Config File -->
+
<hyperlink
class="org.jboss.tools.jsf.text.ext.hyperlink.JSFLinkHyperlink"
12 years, 3 months
JBoss Tools SVN: r44312 - trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-10-04 16:08:57 -0400 (Thu, 04 Oct 2012)
New Revision: 44312
Modified:
trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF
Log:
https://issues.jboss.org/browse/JBIDE-12789 ESBCoreValidator.java - compilation errors in trunk - did something change?
minimal executin environment is set JavaSE-1.6 to fix compilation problems
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF 2012-10-04 19:58:28 UTC (rev 44311)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF 2012-10-04 20:08:57 UTC (rev 44312)
@@ -17,4 +17,4 @@
org.jboss.tools.common.validation,
org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200"
Bundle-Version: 1.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
12 years, 3 months
JBoss Tools SVN: r44311 - trunk/maven/tests/org.jboss.tools.maven.common.test/src/org/jboss/tools/maven/core/identification.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-10-04 15:58:28 -0400 (Thu, 04 Oct 2012)
New Revision: 44311
Modified:
trunk/maven/tests/org.jboss.tools.maven.common.test/src/org/jboss/tools/maven/core/identification/FileIdentificationManagerTest.java
Log:
fix for compilation errors in maven.common.test plugin
Modified: trunk/maven/tests/org.jboss.tools.maven.common.test/src/org/jboss/tools/maven/core/identification/FileIdentificationManagerTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.common.test/src/org/jboss/tools/maven/core/identification/FileIdentificationManagerTest.java 2012-10-04 19:00:25 UTC (rev 44310)
+++ trunk/maven/tests/org.jboss.tools.maven.common.test/src/org/jboss/tools/maven/core/identification/FileIdentificationManagerTest.java 2012-10-04 19:58:28 UTC (rev 44311)
@@ -27,6 +27,12 @@
public ArtifactKey identify(File file) throws CoreException {
return null;
}
+
+ @Override
+ public ArtifactKey identify(File file, IProgressMonitor monitor) throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
};
monitor = new NullProgressMonitor();
fileIdentificationManager = new FileIdentificationManager(Collections.singleton(identifier1));
@@ -43,6 +49,12 @@
public ArtifactKey identify(File file) throws CoreException {
return new ArtifactKey("junit", "junit", "4.10", null);
}
+
+ @Override
+ public ArtifactKey identify(File file, IProgressMonitor monitor) throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
);
assertNotNull(fileIdentificationManager.identify(junit, monitor));
12 years, 3 months