JBoss Tools SVN: r34868 - in trunk/build/aggregate: soa-site and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-09-19 22:23:47 -0400 (Mon, 19 Sep 2011)
New Revision: 34868
Added:
trunk/build/aggregate/site/site.xsl
trunk/build/aggregate/soa-site/site.xsl
Modified:
trunk/build/aggregate/site/build.xml
trunk/build/aggregate/site/index-template.html
trunk/build/aggregate/site/index.html
trunk/build/aggregate/soa-site/build.xml
trunk/build/aggregate/soa-site/index-template.html
trunk/build/aggregate/soa-site/index.html
Log:
https://issues.jboss.org/browse/JBIDE-9743 add links to site.xml and content.jar/artifacts.jar where available for extras, product, product-soa, installer sites.
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-09-19 23:14:56 UTC (rev 34867)
+++ trunk/build/aggregate/site/build.xml 2011-09-20 02:23:47 UTC (rev 34868)
@@ -40,10 +40,23 @@
<pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
</classpath>
</taskdef>
+
+ <available file="${COMMON_TOOLS}/saxon.jar" type="file" property="saxon.jar.exists" />
+ <antcall target="get.saxon" />
</target>
<target name="custom.build" description="aggregate update site extras" depends="init,check.target,add.associate.sites,add.web.content,pack.zip,collect.zips,collect.metadata,create.summary.file" />
+ <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" />
+ </target>
+
<!-- = = = = = = = = = = = = = = = = =
macrodef: fetchZipsFromList - given a list of zips in zip.list.txt, fetch those zips
= = = = = = = = = = = = = = = = = -->
@@ -283,11 +296,11 @@
<for param="location" list="${repository.children.child.location}">
<sequential>
<var name="counter" value="${counter}0" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<length property="i" string="${counter}" />
<if>
<not>
- <contains string="@{location}" substring="/staging.previous/"/>
+ <contains string="@{location}" substring="/staging.previous/" />
</not>
<then>
<if>
@@ -317,7 +330,7 @@
</sequential>
</for>
<var name="counter" unset="true" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<delete file="${aggregate.zips.dir}/compositeArtifacts.xml" quiet="true" />
</then>
@@ -444,6 +457,9 @@
</else>
</if>
+ <!-- get site.xml as HTML, then load into ${site.contents} in order to merge into index.html -->
+ <antcallback target="transform.site.xml" return="site.contents" />
+
<copy todir="${output.dir}" overwrite="true">
<fileset file="index-template.html" />
<mapper type="merge" to="index.html" />
@@ -457,6 +473,18 @@
</copy>
</target>
+ <target name="transform.site.xml">
+ <!-- turn site.xml into site.html via site.xsl -->
+ <delete quiet="true" file="${update.site.source.dir}/site.html" />
+ <xslt style="site.xsl" in="${update.site.source.dir}/site.xml" out="${update.site.source.dir}/site.html" force="true">
+ <classpath location="${COMMON_TOOLS}/saxon.jar" />
+ </xslt>
+ <!-- merge contents of site.html into index.html, then remove site.html -->
+ <loadfile property="site.contents" srcfile="${update.site.source.dir}/site.html" failonerror="false" />
+ <property name="site.contents" value="" />
+ <delete file="${update.site.source.dir}/site.html" quiet="true" />
+ </target>
+
<!-- look for http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2.0.M2.c...;
if found, load file and use ${ALL_ZIPS} to get list of relative path zips to fetch -->
<target name="collect.zips" description="collect zips from the sites we aggregated">
Modified: trunk/build/aggregate/site/index-template.html
===================================================================
--- trunk/build/aggregate/site/index-template.html 2011-09-19 23:14:56 UTC (rev 34867)
+++ trunk/build/aggregate/site/index-template.html 2011-09-20 02:23:47 UTC (rev 34868)
@@ -6,17 +6,20 @@
</style>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<center>
<table marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
- cellspacing="0" cellpadding="0">
+ cellspacing="0" cellpadding="0" width="920">
<tr>
- <td colspan="2"><img
+ <td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png" /></td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
<td>
<h2 class="title">JBoss Tools ${update.site.description} Update Site</h2>
<table width="100%">
@@ -28,7 +31,7 @@
<td class="bodyText">
<p class="bodyText">This is the <b>${update.site.description}</b>
Update Site for JBoss Tools. See <a class="link"
- href="http://www.jboss.org/tools/download/update">Installation
+ href="http://www.jboss.org/tools/download/installation/update_3_3">Installation
Instructions</a>.</p>
</td>
</tr>
@@ -52,29 +55,26 @@
<p class="bodyText">You can also download JBoss Tools as
individual zips for offline installation. See <a class="link"
href="http://www.jboss.org/tools/download">JBoss Tools
- Downloads</a>.</p>
- </td>
- </tr>
-
- <tr class="dark-row" style="height: 30px">
- <td class="bodyText">
- <p class="bodyText">For more information, see <a
+ Downloads</a>.<br/>
+ If you downloaded this site as a zip, see <a href="README.installation.txt">Installation README</a>. See also <a
href="http://www.jboss.org/tools/download/installation">Installation
methods</a>.</p>
</td>
</tr>
- <tr>
- <td class="spacer"><br />
- </td>
- <td class="spacer"><br />
- </td>
- </tr>
</table>
</td>
+ <td>      </td>
</tr>
<tr>
<td></td>
<td>
+ ${site.contents}
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
<table width="100%">
<tr class="header">
<td class="sub-header" width="100%"><span> Installation
@@ -130,4 +130,5 @@
</td>
</tr>
</table>
+</center>
</html>
Modified: trunk/build/aggregate/site/index.html
===================================================================
--- trunk/build/aggregate/site/index.html 2011-09-19 23:14:56 UTC (rev 34867)
+++ trunk/build/aggregate/site/index.html 2011-09-20 02:23:47 UTC (rev 34868)
@@ -6,17 +6,20 @@
</style>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<center>
<table marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
- cellspacing="0" cellpadding="0">
+ cellspacing="0" cellpadding="0" width="920">
<tr>
- <td colspan="2"><img
+ <td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png" /></td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
<td>
<h2 class="title">JBoss Tools Nightly Build Update Site</h2>
<table width="100%">
@@ -28,7 +31,7 @@
<td class="bodyText">
<p class="bodyText">This is the <b>Nightly Build</b>
Update Site for JBoss Tools. See <a class="link"
- href="http://www.jboss.org/tools/download/update">Installation
+ href="http://www.jboss.org/tools/download/installation/update_3_3">Installation
Instructions</a>.</p>
</td>
</tr>
@@ -52,29 +55,404 @@
<p class="bodyText">You can also download JBoss Tools as
individual zips for offline installation. See <a class="link"
href="http://www.jboss.org/tools/download">JBoss Tools
- Downloads</a>.</p>
- </td>
- </tr>
-
- <tr class="dark-row" style="height: 30px">
- <td class="bodyText">
- <p class="bodyText">For more information, see <a
+ Downloads</a>.<br/>
+ If you downloaded this site as a zip, see <a href="README.installation.txt">Installation README</a>. See also <a
href="http://www.jboss.org/tools/download/installation">Installation
methods</a>.</p>
</td>
</tr>
- <tr>
- <td class="spacer"><br />
- </td>
- <td class="spacer"><br />
- </td>
- </tr>
</table>
</td>
+ <td>      </td>
</tr>
<tr>
<td></td>
<td>
+ <br xmlns="http://www.w3.org/1999/xhtml" xmlns:xalan="http://xml.apache.org/xalan"></br><table xmlns="http://www.w3.org/1999/xhtml" xmlns:xalan="http://xml.apache.org/xalan" cellspacing="2" cellpadding="0" border="0">
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+
+ </th>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.ide.eclipse.archives.feature_3.2.1.v20110916-0117-M4.jar" style="font-size:x-small">org.jboss.ide.eclipse.archives.feature</a></td>
+ <td><span style="font-size:x-small">3.2.1.v20110916-0117-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.ide.eclipse.as.feature_2.3.0.v20110916-0135-M4.jar" style="font-size:x-small">org.jboss.ide.eclipse.as.feature</a></td>
+ <td><span style="font-size:x-small">2.3.0.v20110916-0135-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.ide.eclipse.as.server.egit.integration.feature_0.0.1.v20110916-0135-M4.jar" style="font-size:x-small">org.jboss.ide.eclipse.as.server.egit.integration.feature</a></td>
+ <td><span style="font-size:x-small">0.0.1.v20110916-0135-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.ide.eclipse.freemarker.feature_1.2.0.v20110916-0128-H380-M4.jar" style="font-size:x-small">org.jboss.ide.eclipse.freemarker.feature</a></td>
+ <td><span style="font-size:x-small">1.2.0.v20110916-0128-H380-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.birt.feature_1.3.0.v20110916-0128-M4.jar" style="font-size:x-small">org.jboss.tools.birt.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0128-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ ReportTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.cdi.feature_1.2.0.v20110916-0012-M4.jar" style="font-size:x-small">org.jboss.tools.cdi.feature</a></td>
+ <td><span style="font-size:x-small">1.2.0.v20110916-0012-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.cdi.seam.feature_1.2.0.v20110916-0012-M4.jar" style="font-size:x-small">org.jboss.tools.cdi.seam.feature</a></td>
+ <td><span style="font-size:x-small">1.2.0.v20110916-0012-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.common.core.feature_3.3.0.v20110916-0003-M4.jar" style="font-size:x-small">org.jboss.tools.common.core.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0003-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.common.feature_3.3.0.v20110916-0003-M4.jar" style="font-size:x-small">org.jboss.tools.common.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0003-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.common.jdt.feature_3.3.0.v20110916-0115-H438-M4.jar" style="font-size:x-small">org.jboss.tools.common.jdt.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0115-H438-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.common.text.ext.feature_3.3.0.v20110916-0003-M4.jar" style="font-size:x-small">org.jboss.tools.common.text.ext.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0003-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.common.ui.feature_3.3.0.v20110916-0003-M4.jar" style="font-size:x-small">org.jboss.tools.common.ui.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0003-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.common.verification.feature_3.3.0.v20110916-0003-M4.jar" style="font-size:x-small">org.jboss.tools.common.verification.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0003-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.community.project.examples.feature_1.2.1.v20110916-0122-M4.jar" style="font-size:x-small">org.jboss.tools.community.project.examples.feature</a></td>
+ <td><span style="font-size:x-small">1.2.1.v20110916-0122-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.deltacloud.feature_1.0.1.v20110916-0122-H612-M4.jar" style="font-size:x-small">org.jboss.tools.deltacloud.feature</a></td>
+ <td><span style="font-size:x-small">1.0.1.v20110916-0122-H612-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ CloudTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.forge.feature_1.0.0.v20110916-0123-M4.jar" style="font-size:x-small">org.jboss.tools.forge.feature</a></td>
+ <td><span style="font-size:x-small">1.0.0.v20110916-0123-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.gwt.feature_1.0.2.v20110916-0129-M4.jar" style="font-size:x-small">org.jboss.tools.gwt.feature</a></td>
+ <td><span style="font-size:x-small">1.0.2.v20110916-0129-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jmx.feature_1.2.0.v20110916-0116-M4.jar" style="font-size:x-small">org.jboss.tools.jmx.feature</a></td>
+ <td><span style="font-size:x-small">1.2.0.v20110916-0116-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jsf.feature_3.3.0.v20110916-0009-M4.jar" style="font-size:x-small">org.jboss.tools.jsf.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0009-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jst.feature_3.3.0.v20110916-0005-M4.jar" style="font-size:x-small">org.jboss.tools.jst.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0005-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.cdi.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.cdi.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.hibernate.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.hibernate.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.jaxrs.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.jaxrs.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.jbosspackaging.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.jbosspackaging.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.jsf.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.jsf.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.portlet.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.portlet.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.project.examples.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.project.examples.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.maven.seam.feature_1.3.0.v20110916-0137-M4.jar" style="font-size:x-small">org.jboss.tools.maven.seam.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0137-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ MavenTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.portlet.feature_1.2.0.v20110916-0139-M4.jar" style="font-size:x-small">org.jboss.tools.portlet.feature</a></td>
+ <td><span style="font-size:x-small">1.2.0.v20110916-0139-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.project.examples.feature_1.2.1.v20110916-0122-M4.jar" style="font-size:x-small">org.jboss.tools.project.examples.feature</a></td>
+ <td><span style="font-size:x-small">1.2.1.v20110916-0122-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.richfaces.feature_3.3.0.v20110916-0009-M4.jar" style="font-size:x-small">org.jboss.tools.richfaces.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0009-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.runtime.as.detector.feature_1.3.0.v20110916-0116-M4.jar" style="font-size:x-small">org.jboss.tools.runtime.as.detector.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0116-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.runtime.core.feature_1.3.0.v20110916-0116-M4.jar" style="font-size:x-small">org.jboss.tools.runtime.core.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0116-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.runtime.feature_1.3.0.v20110916-0116-M4.jar" style="font-size:x-small">org.jboss.tools.runtime.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0116-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.runtime.seam.detector.feature_1.3.0.v20110916-0116-M4.jar" style="font-size:x-small">org.jboss.tools.runtime.seam.detector.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110916-0116-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.seam.feature_3.3.0.v20110916-0037-M4.jar" style="font-size:x-small">org.jboss.tools.seam.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0037-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.struts.feature_3.3.0.v20110916-0141-M4.jar" style="font-size:x-small">org.jboss.tools.struts.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0141-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.usage.feature_1.1.0.v20110916-0115-M4.jar" style="font-size:x-small">org.jboss.tools.usage.feature</a></td>
+ <td><span style="font-size:x-small">1.1.0.v20110916-0115-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.vpe.feature_3.3.0.v20110916-0006-M4.jar" style="font-size:x-small">org.jboss.tools.vpe.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0006-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.ws.feature_1.2.2.v20110916-0125-H509-M4.jar" style="font-size:x-small">org.jboss.tools.ws.feature</a></td>
+ <td><span style="font-size:x-small">1.2.2.v20110916-0125-H509-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.ws.jaxrs.feature_1.2.2.v20110916-0125-H509-M4.jar" style="font-size:x-small">org.jboss.tools.ws.jaxrs.feature</a></td>
+ <td><span style="font-size:x-small">1.2.2.v20110916-0125-H509-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.xulrunner.feature_3.3.0.v20110916-0006-M4.jar" style="font-size:x-small">org.jboss.tools.xulrunner.feature</a></td>
+ <td><span style="font-size:x-small">3.3.0.v20110916-0006-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+
+ </th>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.hibernate.eclipse.feature_3.4.0.v20110916-0138-H443-M4.jar" style="font-size:x-small">org.hibernate.eclipse.feature</a></td>
+ <td><span style="font-size:x-small">3.4.0.v20110916-0138-H443-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ WebTools</span><span style="font-size:x-small">
+ |
+ DataTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.mozilla.xulrunner.feature_1.9.218.v20110902-0556-M4.jar" style="font-size:x-small">org.mozilla.xulrunner.feature</a></td>
+ <td><span style="font-size:x-small">1.9.218.v20110902-0556-M4</span></td>
+ <td></td>
+ </tr>
+ <tr style="background-color:#DDDDDD">
+ <th colspan="1" style="font-size:small">Metadata</th>
+ <th colspan="1" style="font-size:small"></th>
+ <th colspan="1" style="font-size:small"></th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine"><a href="site.xml" style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar" style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar" style="font-size:x-small">content.jar</a></td>
+ <td class="rowLine"></td>
+ <td class="rowLine"></td>
+ </tr>
+</table><br xmlns="http://www.w3.org/1999/xhtml" xmlns:xalan="http://xml.apache.org/xalan"></br>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
<table width="100%">
<tr class="header">
<td class="sub-header" width="100%"><span> Installation
@@ -130,4 +508,5 @@
</td>
</tr>
</table>
+</center>
</html>
Added: trunk/build/aggregate/site/site.xsl
===================================================================
--- trunk/build/aggregate/site/site.xsl (rev 0)
+++ trunk/build/aggregate/site/site.xsl 2011-09-20 02:23:47 UTC (rev 34868)
@@ -0,0 +1,118 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/site">
+ <br />
+ <table cellspacing="2" cellpadding="0" border="0">
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- JBoss features -->
+ <xsl:for-each select="feature[contains(@id,'jboss')]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- other features -->
+ <xsl:for-each select="feature[not(contains(@id,'jboss'))]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th colspan="1" style="font-size:small">Metadata</th>
+ <th colspan="1" style="font-size:small"></th>
+ <th colspan="1" style="font-size:small"></th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine">
+ <a href="site.xml" style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar" style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar" style="font-size:x-small">content.jar</a>
+ </td>
+ <td class="rowLine">
+ </td>
+ <td class="rowLine">
+ </td>
+ </tr>
+ </table>
+ <br />
+ </xsl:template>
+</xsl:stylesheet>
Modified: trunk/build/aggregate/soa-site/build.xml
===================================================================
--- trunk/build/aggregate/soa-site/build.xml 2011-09-19 23:14:56 UTC (rev 34867)
+++ trunk/build/aggregate/soa-site/build.xml 2011-09-20 02:23:47 UTC (rev 34868)
@@ -40,10 +40,23 @@
<pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
</classpath>
</taskdef>
+
+ <available file="${COMMON_TOOLS}/saxon.jar" type="file" property="saxon.jar.exists" />
+ <antcall target="get.saxon" />
</target>
<target name="custom.build" description="aggregate update site extras" depends="init,check.target,add.associate.sites,add.web.content,pack.zip,collect.zips,collect.metadata,create.summary.file" />
+ <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" />
+ </target>
+
<!-- = = = = = = = = = = = = = = = = =
macrodef: fetchZipsFromList - given a list of zips in zip.list.txt, fetch those zips
= = = = = = = = = = = = = = = = = -->
@@ -283,11 +296,11 @@
<for param="location" list="${repository.children.child.location}">
<sequential>
<var name="counter" value="${counter}0" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<length property="i" string="${counter}" />
<if>
<not>
- <contains string="@{location}" substring="/staging.previous/"/>
+ <contains string="@{location}" substring="/staging.previous/" />
</not>
<then>
<if>
@@ -317,7 +330,7 @@
</sequential>
</for>
<var name="counter" unset="true" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<delete file="${aggregate.zips.dir}/compositeArtifacts.xml" quiet="true" />
</then>
@@ -444,6 +457,9 @@
</else>
</if>
+ <!-- get site.xml as HTML, then load into ${site.contents} in order to merge into index.html -->
+ <antcallback target="transform.site.xml" return="site.contents" />
+
<copy todir="${output.dir}" overwrite="true">
<fileset file="index-template.html" />
<mapper type="merge" to="index.html" />
@@ -457,6 +473,18 @@
</copy>
</target>
+ <target name="transform.site.xml">
+ <!-- turn site.xml into site.html via site.xsl -->
+ <delete quiet="true" file="${update.site.source.dir}/site.html" />
+ <xslt style="site.xsl" in="${update.site.source.dir}/site.xml" out="${update.site.source.dir}/site.html" force="true">
+ <classpath location="${COMMON_TOOLS}/saxon.jar" />
+ </xslt>
+ <!-- merge contents of site.html into index.html, then remove site.html -->
+ <loadfile property="site.contents" srcfile="${update.site.source.dir}/site.html" failonerror="false" />
+ <property name="site.contents" value="" />
+ <delete file="${update.site.source.dir}/site.html" quiet="true" />
+ </target>
+
<!-- look for http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2.0.M2.c...;
if found, load file and use ${ALL_ZIPS} to get list of relative path zips to fetch -->
<target name="collect.zips" description="collect zips from the sites we aggregated">
Modified: trunk/build/aggregate/soa-site/index-template.html
===================================================================
--- trunk/build/aggregate/soa-site/index-template.html 2011-09-19 23:14:56 UTC (rev 34867)
+++ trunk/build/aggregate/soa-site/index-template.html 2011-09-20 02:23:47 UTC (rev 34868)
@@ -6,17 +6,20 @@
</style>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<center>
<table marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
- cellspacing="0" cellpadding="0">
+ cellspacing="0" cellpadding="0" width="920">
<tr>
- <td colspan="2"><img
+ <td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png" /></td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
<td>
<h2 class="title">JBoss Tools - SOA Tooling - ${update.site.description} Update Site</h2>
<table width="100%">
@@ -28,7 +31,7 @@
<td class="bodyText">
<p class="bodyText">This is the <b>${update.site.description}</b>
Update Site for JBoss Tools - SOA Tooling. See <a class="link"
- href="http://www.jboss.org/tools/download/update">Installation
+ href="http://www.jboss.org/tools/download/installation/update_3_3">Installation
Instructions</a>.</p>
</td>
</tr>
@@ -41,7 +44,7 @@
</p>
<ul>
- <li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
+ <li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0/">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
<li><a href="http://download.jboss.org/jbosstools/updates/development/indigo/">JBoss Tools Core Updates - Stable Milestone - Indigo</a></li>
</ul>
</td>
@@ -52,29 +55,26 @@
<p class="bodyText">You can also download JBoss Tools as
individual zips for offline installation. See <a class="link"
href="http://www.jboss.org/tools/download">JBoss Tools
- Downloads</a>.</p>
- </td>
- </tr>
-
- <tr class="dark-row" style="height: 30px">
- <td class="bodyText">
- <p class="bodyText">For more information, see <a
+ Downloads</a>.<br/>
+ If you downloaded this site as a zip, see <a href="README.installation.txt">Installation README</a>. See also <a
href="http://www.jboss.org/tools/download/installation">Installation
methods</a>.</p>
</td>
</tr>
- <tr>
- <td class="spacer"><br />
- </td>
- <td class="spacer"><br />
- </td>
- </tr>
</table>
</td>
+ <td>      </td>
</tr>
<tr>
<td></td>
<td>
+ ${site.contents}
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
<table width="100%">
<tr class="header">
<td class="sub-header" width="100%"><span> Installation
@@ -130,4 +130,5 @@
</td>
</tr>
</table>
+</center>
</html>
Modified: trunk/build/aggregate/soa-site/index.html
===================================================================
--- trunk/build/aggregate/soa-site/index.html 2011-09-19 23:14:56 UTC (rev 34867)
+++ trunk/build/aggregate/soa-site/index.html 2011-09-20 02:23:47 UTC (rev 34868)
@@ -6,17 +6,20 @@
</style>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<center>
<table marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
- cellspacing="0" cellpadding="0">
+ cellspacing="0" cellpadding="0" width="920">
<tr>
- <td colspan="2"><img
+ <td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png" /></td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
<td>
<h2 class="title">JBoss Tools - SOA Tooling - Nightly Build Update Site</h2>
<table width="100%">
@@ -28,7 +31,7 @@
<td class="bodyText">
<p class="bodyText">This is the <b>Nightly Build</b>
Update Site for JBoss Tools - SOA Tooling. See <a class="link"
- href="http://www.jboss.org/tools/download/update">Installation
+ href="http://www.jboss.org/tools/download/installation/update_3_3">Installation
Instructions</a>.</p>
</td>
</tr>
@@ -41,7 +44,7 @@
</p>
<ul>
- <li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
+ <li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0/">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
<li><a href="http://download.jboss.org/jbosstools/updates/development/indigo/">JBoss Tools Core Updates - Stable Milestone - Indigo</a></li>
</ul>
</td>
@@ -52,29 +55,202 @@
<p class="bodyText">You can also download JBoss Tools as
individual zips for offline installation. See <a class="link"
href="http://www.jboss.org/tools/download">JBoss Tools
- Downloads</a>.</p>
- </td>
- </tr>
-
- <tr class="dark-row" style="height: 30px">
- <td class="bodyText">
- <p class="bodyText">For more information, see <a
+ Downloads</a>.<br/>
+ If you downloaded this site as a zip, see <a href="README.installation.txt">Installation README</a>. See also <a
href="http://www.jboss.org/tools/download/installation">Installation
methods</a>.</p>
</td>
</tr>
- <tr>
- <td class="spacer"><br />
- </td>
- <td class="spacer"><br />
- </td>
- </tr>
</table>
</td>
+ <td>      </td>
</tr>
<tr>
<td></td>
<td>
+ <br xmlns="http://www.w3.org/1999/xhtml" xmlns:xalan="http://xml.apache.org/xalan"></br><table xmlns="http://www.w3.org/1999/xhtml" xmlns:xalan="http://xml.apache.org/xalan" cellspacing="2" cellpadding="0" border="0">
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+
+ </th>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.savara.tools.feature_2.0.0.v20110816-1009-H189-M4.jar" style="font-size:x-small">org.jboss.savara.tools.feature</a></td>
+ <td><span style="font-size:x-small">2.0.0.v20110816-1009-H189-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.bpel.feature_1.1.0.v20110816-2125-H376-M3.jar" style="font-size:x-small">org.jboss.tools.bpel.feature</a></td>
+ <td><span style="font-size:x-small">1.1.0.v20110816-2125-H376-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.esb.feature_1.5.0.v20110817-1003-H409-M3.jar" style="font-size:x-small">org.jboss.tools.esb.feature</a></td>
+ <td><span style="font-size:x-small">1.5.0.v20110817-1003-H409-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jbpm.common.feature_4.4.0.v20110817-0946-H391-M3.jar" style="font-size:x-small">org.jboss.tools.jbpm.common.feature</a></td>
+ <td><span style="font-size:x-small">4.4.0.v20110817-0946-H391-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jbpm.convert.feature_1.0.0.v20110817-0946-H391-M3.jar" style="font-size:x-small">org.jboss.tools.jbpm.convert.feature</a></td>
+ <td><span style="font-size:x-small">1.0.0.v20110817-0946-H391-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jbpm3.feature_3.2.0.v20110817-0946-H391-M3.jar" style="font-size:x-small">org.jboss.tools.jbpm3.feature</a></td>
+ <td><span style="font-size:x-small">3.2.0.v20110817-0946-H391-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.jbpm4.feature_4.0.0.v20110817-0946-H391-M3.jar" style="font-size:x-small">org.jboss.tools.jbpm4.feature</a></td>
+ <td><span style="font-size:x-small">4.0.0.v20110817-0946-H391-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.modeshape.rest.feature_1.1.0.v20110817-0930-H317-M3.jar" style="font-size:x-small">org.jboss.tools.modeshape.rest.feature</a></td>
+ <td><span style="font-size:x-small">1.1.0.v20110817-0930-H317-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.jboss.tools.smooks.feature_1.3.0.v20110816-1831-H355-M3.jar" style="font-size:x-small">org.jboss.tools.smooks.feature</a></td>
+ <td><span style="font-size:x-small">1.3.0.v20110816-1831-H355-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span><span style="font-size:x-small">
+ |
+ DataTools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+
+ </th>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.drools.eclipse.feature_5.2.0.Final.jar" style="font-size:x-small">org.drools.eclipse.feature</a></td>
+ <td><span style="font-size:x-small">5.2.0.Final</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span><span style="font-size:x-small">
+ |
+ GeneralTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.drools.eclipse.task.feature_5.2.0.Final.jar" style="font-size:x-small">org.drools.eclipse.task.feature</a></td>
+ <td><span style="font-size:x-small">5.2.0.Final</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.guvnor.tools.feature_5.2.0.Final.jar" style="font-size:x-small">org.guvnor.tools.feature</a></td>
+ <td><span style="font-size:x-small">5.2.0.Final</span></td>
+ <td><span style="font-size:x-small">
+ |
+ AllTools</span><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.pi4soa.core.feature_3.1.1.v20110815-2205-H97-M3.jar" style="font-size:x-small">org.pi4soa.core.feature</a></td>
+ <td><span style="font-size:x-small">3.1.1.v20110815-2205-H97-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.savara.tools.feature_2.0.0.v20110816-1009-H189-M4.jar" style="font-size:x-small">org.savara.tools.feature</a></td>
+ <td><span style="font-size:x-small">2.0.0.v20110816-1009-H189-M4</span></td>
+ <td><span style="font-size:x-small">
+ |
+ SOATools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.teiid.datatools.connectivity.feature_7.5.0.v20110817-1003-H576-M3.jar" style="font-size:x-small">org.teiid.datatools.connectivity.feature</a></td>
+ <td><span style="font-size:x-small">7.5.0.v20110817-1003-H576-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ DataTools</span></td>
+ </tr>
+ <tr style="background-color:
							#EEEEEE
						">
+ <td class="rowLine"><a href="features/org.teiid.designer.feature_7.5.0.v20110817-1003-H576-M3.jar" style="font-size:x-small">org.teiid.designer.feature</a></td>
+ <td><span style="font-size:x-small">7.5.0.v20110817-1003-H576-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ DataTools</span></td>
+ </tr>
+ <tr style="background-color:
							#FFFFFF
						">
+ <td class="rowLine"><a href="features/org.teiid.designer.runtime.feature_7.5.0.v20110817-1003-H576-M3.jar" style="font-size:x-small">org.teiid.designer.runtime.feature</a></td>
+ <td><span style="font-size:x-small">7.5.0.v20110817-1003-H576-M3</span></td>
+ <td><span style="font-size:x-small">
+ |
+ DataTools</span></td>
+ </tr>
+ <tr style="background-color:#DDDDDD">
+ <th colspan="1" style="font-size:small">Metadata</th>
+ <th colspan="1" style="font-size:small"></th>
+ <th colspan="1" style="font-size:small"></th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine"><a href="site.xml" style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar" style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar" style="font-size:x-small">content.jar</a></td>
+ <td class="rowLine"></td>
+ <td class="rowLine"></td>
+ </tr>
+</table><br xmlns="http://www.w3.org/1999/xhtml" xmlns:xalan="http://xml.apache.org/xalan"></br>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
<table width="100%">
<tr class="header">
<td class="sub-header" width="100%"><span> Installation
@@ -130,4 +306,5 @@
</td>
</tr>
</table>
+</center>
</html>
Added: trunk/build/aggregate/soa-site/site.xsl
===================================================================
--- trunk/build/aggregate/soa-site/site.xsl (rev 0)
+++ trunk/build/aggregate/soa-site/site.xsl 2011-09-20 02:23:47 UTC (rev 34868)
@@ -0,0 +1,118 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/site">
+ <br />
+ <table cellspacing="2" cellpadding="0" border="0">
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- JBoss features -->
+ <xsl:for-each select="feature[contains(@id,'jboss')]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- other features -->
+ <xsl:for-each select="feature[not(contains(@id,'jboss'))]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th colspan="1" style="font-size:small">Metadata</th>
+ <th colspan="1" style="font-size:small"></th>
+ <th colspan="1" style="font-size:small"></th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine">
+ <a href="site.xml" style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar" style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar" style="font-size:x-small">content.jar</a>
+ </td>
+ <td class="rowLine">
+ </td>
+ <td class="rowLine">
+ </td>
+ </tr>
+ </table>
+ <br />
+ </xsl:template>
+</xsl:stylesheet>
14 years, 6 months
JBoss Tools SVN: r34867 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-09-19 19:14:56 -0400 (Mon, 19 Sep 2011)
New Revision: 34867
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/KBValidator.java
Log:
Check project accessibility.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/KBValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/KBValidator.java 2011-09-19 20:39:32 UTC (rev 34866)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/KBValidator.java 2011-09-19 23:14:56 UTC (rev 34867)
@@ -109,16 +109,18 @@
}
private static boolean isCorrectOrder(IProject project, String builderId) throws CoreException {
- ICommand[] cs = project.getDescription().getBuildSpec();
- boolean validationFound = false;
- for (ICommand c: cs) {
- String name = c.getBuilderName();
- if(ValidationPlugin.VALIDATION_BUILDER_ID.equals(name)) {
- validationFound = true;
- } else if(builderId.equals(name)) {
- return !validationFound;
+ if(project.isAccessible()) {
+ ICommand[] cs = project.getDescription().getBuildSpec();
+ boolean validationFound = false;
+ for (ICommand c: cs) {
+ String name = c.getBuilderName();
+ if(ValidationPlugin.VALIDATION_BUILDER_ID.equals(name)) {
+ validationFound = true;
+ } else if(builderId.equals(name)) {
+ return !validationFound;
+ }
}
- }
+ }
return true;
}
14 years, 6 months
JBoss Tools SVN: r34866 - in workspace/snjeza/org.jboss.tools.central.update: features and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-09-19 16:39:32 -0400 (Mon, 19 Sep 2011)
New Revision: 34866
Added:
workspace/snjeza/org.jboss.tools.central.update/features/org.jboss.tools.central.feature_1.0.0.201109192238.jar
workspace/snjeza/org.jboss.tools.central.update/plugins/org.jboss.tools.central_1.0.0.201109192238.jar
Removed:
workspace/snjeza/org.jboss.tools.central.update/features/org.jboss.tools.central.feature_1.0.0.201109132051.jar
workspace/snjeza/org.jboss.tools.central.update/plugins/org.jboss.tools.central_1.0.0.201109132051.jar
Modified:
workspace/snjeza/org.jboss.tools.central.update/artifacts.jar
workspace/snjeza/org.jboss.tools.central.update/content.jar
workspace/snjeza/org.jboss.tools.central.update/site.xml
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: workspace/snjeza/org.jboss.tools.central.update/artifacts.jar
===================================================================
(Binary files differ)
Modified: workspace/snjeza/org.jboss.tools.central.update/content.jar
===================================================================
(Binary files differ)
Deleted: workspace/snjeza/org.jboss.tools.central.update/features/org.jboss.tools.central.feature_1.0.0.201109132051.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.central.update/features/org.jboss.tools.central.feature_1.0.0.201109192238.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.central.update/features/org.jboss.tools.central.feature_1.0.0.201109192238.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.central.update/plugins/org.jboss.tools.central_1.0.0.201109132051.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.central.update/plugins/org.jboss.tools.central_1.0.0.201109192238.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.central.update/plugins/org.jboss.tools.central_1.0.0.201109192238.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: workspace/snjeza/org.jboss.tools.central.update/site.xml
===================================================================
--- workspace/snjeza/org.jboss.tools.central.update/site.xml 2011-09-19 20:27:07 UTC (rev 34865)
+++ workspace/snjeza/org.jboss.tools.central.update/site.xml 2011-09-19 20:39:32 UTC (rev 34866)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.jboss.tools.central.feature_1.0.0.201109132051.jar" id="org.jboss.tools.central.feature" version="1.0.0.201109132051">
+ <feature url="features/org.jboss.tools.central.feature_1.0.0.201109192238.jar" id="org.jboss.tools.central.feature" version="1.0.0.201109192238">
<category name="org.jboss.tools.central"/>
</feature>
<category-def name="org.jboss.tools.central" label="JBoss Central"/>
14 years, 6 months
JBoss Tools SVN: r34865 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-09-19 16:27:07 -0400 (Mon, 19 Sep 2011)
New Revision: 34865
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java
Log:
We need icon images for CDI Tools UI https://issues.jboss.org/browse/JBIDE-9717
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java 2011-09-19 20:25:57 UTC (rev 34864)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java 2011-09-19 20:27:07 UTC (rev 34865)
@@ -117,9 +117,9 @@
return ANNOTATION_IMAGE;
}else if(element instanceof EventBean){
return CDI_EVENT_IMAGE;
- }else if(element instanceof IProducerMethod || element instanceof IBeanMethod){
+ }else if(element instanceof IBeanMethod){
return BEAN_METHOD_IMAGE;
- }else if(element instanceof IProducerField || element instanceof IBeanField){
+ }else if(element instanceof IBeanField){
return BEAN_FIELD_IMAGE;
}
return WELD_IMAGE;
14 years, 6 months
JBoss Tools SVN: r34864 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-09-19 16:25:57 -0400 (Mon, 19 Sep 2011)
New Revision: 34864
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF
Log:
We need icon images for CDI Tools UI https://issues.jboss.org/browse/JBIDE-9717
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF 2011-09-19 20:23:26 UTC (rev 34863)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF 2011-09-19 20:25:57 UTC (rev 34864)
@@ -10,16 +10,16 @@
org.jboss.tools.cdi.text.ext.hyperlink
Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
- org.jboss.tools.common.text.ext;bundle-version="2.0.0",
+ org.jboss.tools.common.text.ext,
org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.jface.text;bundle-version="3.7.0",
org.eclipse.jdt.ui;bundle-version="3.7.0",
org.eclipse.jdt.core;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.jboss.tools.cdi.core;bundle-version="1.0.0",
- org.jboss.tools.common;bundle-version="2.0.0",
- org.jboss.tools.common.el.core;bundle-version="2.0.0",
- org.jboss.tools.common.model;bundle-version="2.0.0",
- org.jboss.tools.cdi.ui;bundle-version="1.2.0"
+ org.jboss.tools.cdi.core,
+ org.jboss.tools.common,
+ org.jboss.tools.common.el.core,
+ org.jboss.tools.common.model,
+ org.jboss.tools.cdi.ui
Bundle-Version: 1.2.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
14 years, 6 months
JBoss Tools SVN: r34863 - in trunk/cdi/plugins: org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-09-19 16:23:26 -0400 (Mon, 19 Sep 2011)
New Revision: 34863
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/annotation.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_class.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_field.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_method.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/beans_xml.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/event.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/injection_point.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/interface.png
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java
Log:
We need icon images for CDI Tools UI https://issues.jboss.org/browse/JBIDE-9717
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF 2011-09-19 20:20:48 UTC (rev 34862)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF 2011-09-19 20:23:26 UTC (rev 34863)
@@ -19,6 +19,7 @@
org.jboss.tools.cdi.core;bundle-version="1.0.0",
org.jboss.tools.common;bundle-version="2.0.0",
org.jboss.tools.common.el.core;bundle-version="2.0.0",
- org.jboss.tools.common.model;bundle-version="2.0.0"
+ org.jboss.tools.common.model;bundle-version="2.0.0",
+ org.jboss.tools.cdi.ui;bundle-version="1.2.0"
Bundle-Version: 1.2.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventHyperlink.java 2011-09-19 20:20:48 UTC (rev 34862)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventHyperlink.java 2011-09-19 20:23:26 UTC (rev 34863)
@@ -26,6 +26,7 @@
import org.jboss.tools.cdi.core.IInjectionPointParameter;
import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
public class EventHyperlink extends AbstractHyperlink implements ITestableCDIHyperlink, IInformationItem{
@@ -93,7 +94,7 @@
}
public Image getImage() {
- return null;
+ return CDIUiImages.getImageByElement(event);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java 2011-09-19 20:20:48 UTC (rev 34862)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java 2011-09-19 20:23:26 UTC (rev 34863)
@@ -28,6 +28,7 @@
import org.jboss.tools.cdi.core.IProducerMethod;
import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
public class InjectedPointHyperlink extends AbstractHyperlink implements ITestableCDIHyperlink, IInformationItem{
@@ -126,7 +127,7 @@
}
public Image getImage() {
- return null;
+ return CDIUiImages.getImageByElement(bean);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodHyperlink.java 2011-09-19 20:20:48 UTC (rev 34862)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodHyperlink.java 2011-09-19 20:23:26 UTC (rev 34863)
@@ -24,6 +24,7 @@
import org.jboss.tools.cdi.core.IObserverMethod;
import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
public class ObserverMethodHyperlink extends AbstractHyperlink implements IInformationItem, ITestableCDIHyperlink{
@@ -84,7 +85,7 @@
}
public Image getImage() {
- return null;
+ return CDIUiImages.getImageByElement(observerMethod);
}
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/annotation.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/annotation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_class.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_class.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_field.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_field.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_method.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/bean_method.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/beans_xml.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/beans_xml.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/event.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/event.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/injection_point.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/injection_point.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/interface.png
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/interface.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java 2011-09-19 20:20:48 UTC (rev 34862)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java 2011-09-19 20:23:26 UTC (rev 34863)
@@ -17,6 +17,15 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.cdi.core.IBeanField;
+import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.ICDIAnnotation;
+import org.jboss.tools.cdi.core.ICDIElement;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.internal.core.impl.EventBean;
public class CDIUiImages {
@@ -33,6 +42,13 @@
public static final Image CDI_BEAN_IMAGE = getImage("search/cdi_bean.gif"); //$NON-NLS-1$
public static final Image WELD_IMAGE = getImage("search/weld_icon_16x.gif"); //$NON-NLS-1$
+ public static final Image BEAN_CLASS_IMAGE = getImage("bean_class.png"); //$NON-NLS-1$
+ public static final Image BEAN_METHOD_IMAGE = getImage("bean_method.png"); //$NON-NLS-1$
+ public static final Image BEAN_FIELD_IMAGE = getImage("bean_field.png"); //$NON-NLS-1$
+ public static final Image INJECTION_POINT_IMAGE = getImage("injection_point.png"); //$NON-NLS-1$
+ public static final Image ANNOTATION_IMAGE = getImage("annotation.png"); //$NON-NLS-1$
+ public static final Image CDI_EVENT_IMAGE = getImage("event.png"); //$NON-NLS-1$
+
public static final Image QUICKFIX_ADD = getImage("quickfixes/cdi_add.png"); //$NON-NLS-1$
public static final Image QUICKFIX_REMOVE = getImage("quickfixes/cdi_remove.png"); //$NON-NLS-1$
public static final Image QUICKFIX_EDIT = getImage("quickfixes/cdi_edit.png"); //$NON-NLS-1$
@@ -90,6 +106,23 @@
private URL makeIconFileURL(String name) throws MalformedURLException {
if (name == null) throw new MalformedURLException(CDIUIMessages.CDI_UI_IMAGESIMAGE_NAME_CANNOT_BE_NULL);
return new URL(baseUrl, name);
- }
+ }
+
+ public static Image getImageByElement(ICDIElement element){
+ if(element instanceof IClassBean){
+ return BEAN_CLASS_IMAGE;
+ }else if(element instanceof IInjectionPoint){
+ return INJECTION_POINT_IMAGE;
+ }else if(element instanceof ICDIAnnotation){
+ return ANNOTATION_IMAGE;
+ }else if(element instanceof EventBean){
+ return CDI_EVENT_IMAGE;
+ }else if(element instanceof IProducerMethod || element instanceof IBeanMethod){
+ return BEAN_METHOD_IMAGE;
+ }else if(element instanceof IProducerField || element instanceof IBeanField){
+ return BEAN_FIELD_IMAGE;
+ }
+ return WELD_IMAGE;
+ }
}
14 years, 6 months
JBoss Tools SVN: r34862 - trunk/central/plugins/org.jboss.tools.central.discovery.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-09-19 16:20:48 -0400 (Mon, 19 Sep 2011)
New Revision: 34862
Modified:
trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2011-09-19 20:12:18 UTC (rev 34861)
+++ trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2011-09-19 20:20:48 UTC (rev 34862)
@@ -59,10 +59,10 @@
<connectorDescriptor
categoryId="org.jboss.tools.category.test"
description="Maven Integration for WTP."
- id="org.maven.ide.eclipse.wtp"
+ id="org.maven.ide.eclipse.wtp.feature"
kind="task"
license="Free, EPL"
- name="m2e - Maven Integration for Eclipse."
+ name="Maven Integration for WTP."
provider="Eclipse.org - m2e"
siteUrl="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/">
<icon
14 years, 6 months
JBoss Tools SVN: r34861 - workspace/snjeza/discovery.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-09-19 16:12:18 -0400 (Mon, 19 Sep 2011)
New Revision: 34861
Modified:
workspace/snjeza/discovery/org.jboss.tools.central.discovery_3.3.0.jar
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: workspace/snjeza/discovery/org.jboss.tools.central.discovery_3.3.0.jar
===================================================================
(Binary files differ)
14 years, 6 months
JBoss Tools SVN: r34860 - workspace/snjeza/discovery.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-09-19 16:10:05 -0400 (Mon, 19 Sep 2011)
New Revision: 34860
Modified:
workspace/snjeza/discovery/org.jboss.tools.central.discovery_3.3.0.jar
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: workspace/snjeza/discovery/org.jboss.tools.central.discovery_3.3.0.jar
===================================================================
(Binary files differ)
14 years, 6 months
JBoss Tools SVN: r34859 - in trunk: central/plugins/org.jboss.tools.central/META-INF and 22 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-09-19 15:27:11 -0400 (Mon, 19 Sep 2011)
New Revision: 34859
Added:
trunk/central/plugins/org.jboss.tools.central.discovery/images/jbosstools_icon16.png
trunk/central/plugins/org.jboss.tools.central.discovery/images/jbosstools_icon32.png
trunk/central/plugins/org.jboss.tools.central/icons/import_obj.png
trunk/central/plugins/org.jboss.tools.central/icons/jbosstools_icon32.png
trunk/central/plugins/org.jboss.tools.central/icons/nwarning.gif
trunk/central/plugins/org.jboss.tools.central/icons/success.gif
trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/RefreshJBossTutorialsHandler.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/RefreshIndicator.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshTutorialsJob.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/Tutorial.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/schema/downloadJBossRuntimes.exsd
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/DownloadRuntime.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/actions/
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/actions/DownloadRuntimeAction.java
Removed:
trunk/central/plugins/org.jboss.tools.central/schema/projectExamplesTutorials.exsd
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/DownloadRuntime.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/DownloadJBossAs701Handler.java
Modified:
trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF
trunk/central/plugins/org.jboss.tools.central/icons/Thumbs.db
trunk/central/plugins/org.jboss.tools.central/plugin.xml
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/AbstractJBossCentralPage.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/NewsToolTip.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshDiscoveryJob.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java
trunk/examples/plugins/org.jboss.tools.project.examples/.project
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/META-INF/MANIFEST.MF
trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/META-INF/MANIFEST.MF
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF 2011-09-19 19:27:11 UTC (rev 34859)
@@ -21,7 +21,8 @@
org.eclipse.mylyn.commons.core;bundle-version="3.6.0",
org.eclipse.mylyn.discovery.ui;bundle-version="3.6.0",
org.eclipse.mylyn.discovery.core;bundle-version="3.6.0",
- org.eclipse.mylyn.commons.ui;bundle-version="3.6.1"
+ org.eclipse.mylyn.commons.ui;bundle-version="3.6.1",
+ org.eclipse.equinox.p2.ui.sdk;bundle-version="1.0.200"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
Modified: trunk/central/plugins/org.jboss.tools.central/icons/Thumbs.db
===================================================================
(Binary files differ)
Added: trunk/central/plugins/org.jboss.tools.central/icons/import_obj.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/import_obj.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/jbosstools_icon32.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/jbosstools_icon32.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/nwarning.gif
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/nwarning.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/success.gif
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/success.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-09-19 19:27:11 UTC (rev 34859)
@@ -2,8 +2,7 @@
<?eclipse version="3.4"?>
<plugin>
- <extension-point id="downloadJBossRuntimes" name="%DownloadJBossRuntimes" schema="schema/downloadJBossRuntimes.exsd"/>
- <extension-point id="projectExamplesTutorials" name="%ProjectExamplesTutorial" schema="schema/projectExamplesTutorials.exsd"/>
+ <extension-point id="tutorials" name="%Tutorials" schema="schema/tutorials.exsd"/>
<extension
point="org.eclipse.ui.editors">
@@ -47,11 +46,6 @@
<extension
point="org.eclipse.ui.commands">
<command
- defaultHandler="org.jboss.tools.central.actions.DownloadJBossAs701Handler"
- name="Download and Install JBoss AS 7.0.1"
- id="org.jboss.tools.central.downloadJBossAs701Handler">
- </command>
- <command
defaultHandler="org.jboss.tools.central.actions.ShowJBossCentralHandler"
name="JBoss Central"
id="org.jboss.tools.central.show">
@@ -69,6 +63,11 @@
</command>
<command
+ defaultHandler="org.jboss.tools.central.actions.RefreshJBossTutorialsHandler"
+ name="Refresh"
+ id="org.jboss.tools.central.refreshJBossTutorials">
+ </command>
+ <command
defaultHandler="org.jboss.tools.central.actions.RefreshJBossNewsHandler"
name="Refresh"
id="org.jboss.tools.central.refreshJBossNews">
@@ -128,10 +127,6 @@
<extension
point="org.eclipse.ui.commandImages">
<image
- commandId="org.jboss.tools.central.downloadJBossAs701Handler"
- icon="icons/jbossas7.png">
- </image>
- <image
commandId="org.jboss.tools.central.openJBossToolsHome"
icon="icons/jbosstools_icon16.png">
</image>
@@ -144,6 +139,10 @@
icon="icons/refresh.gif">
</image>
<image
+ commandId="org.jboss.tools.central.refreshJBossTutorials"
+ icon="icons/refresh.gif">
+ </image>
+ <image
commandId="org.jboss.tools.central.refreshDiscovery"
icon="icons/refresh.gif">
</image>
@@ -180,39 +179,93 @@
icon="icons/examples_wiz.gif">
</image>
</extension>
- <extension
- point="org.jboss.tools.central.downloadJBossRuntimes">
- <runtime
- id="org.jboss.tools.central.as.701"
- name="JBoss AS 7.0.1 Everything (NOT Java EE6 Certified)"
- version="7.0.1.Final"
- size="68MB"
- url="http://download.jboss.org/jbossas/7.0/jboss-as-7.0.1.Final/jboss-as-7.0.1..."/>
- <runtime
- id="org.jboss.tools.central.seam.222"
- name="JBoss Seam 2.2.2.Final"
- version="2.2.2.Final"
- size="113.2MB"
- url="http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.2.2.Final/jbos..."/>
- <runtime
- id="org.jboss.tools.central.as.610"
- name="JBoss AS 6.1.0"
- version="6.1.0.Final"
- size="183MB"
- url="http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.z..."/>
- </extension>
-
<extension
- point="org.jboss.tools.central.projectExamplesTutorials">
+ point="org.jboss.tools.central.tutorials">
+ <category
+ id="org.jboss.tools.central.jbossas.quickstart"
+ name="JBoss AS 7 Quickstarts"
+ priority="1" />
+ <category
+ id="org.jboss.tools.central.seam2"
+ name="Seam 2 tutorials"
+ priority="5" />
<tutorial
- id="org.jboss.tools.central.booking22"
- category="Seam"
- name="booking22"
- description="JBoss Seam 2 Booking Examples"
- wtpRuntimes="org.jboss.tools.central.as.610"
- seamRuntimes="org.jboss.tools.central.seam.222"
- eclipseIU="org.testng.eclipse" />
+ id="org.jboss.tools.central.jbossas.quickstart.helloworld"
+ categoryId="org.jboss.tools.central.jbossas.quickstart"
+ name="Helloworld quickstart"
+ type="projectExample"
+ priority="1"
+ icon="icons/jbossas7.png"
+ reference="JBoss AS 7 Quickstarts::helloworld"/>
+ <tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.numberguess"
+ categoryId="org.jboss.tools.central.jbossas.quickstart"
+ name="Numberguess quickstart"
+ type="projectExample"
+ priority="2"
+ icon="icons/jbossas7.png"
+ reference="JBoss AS 7 Quickstarts::numberguess"/>
+
+ <tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.login"
+ categoryId="org.jboss.tools.central.jbossas.quickstart"
+ name="Login quickstart"
+ type="projectExample"
+ priority="3"
+ icon="icons/jbossas7.png"
+ reference="JBoss AS 7 Quickstarts::login"/>
+
+ <tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.kitchensink"
+ categoryId="org.jboss.tools.central.jbossas.quickstart"
+ name="Kitchensink quickstart"
+ type="projectExample"
+ priority="4"
+ icon="icons/jbossas7.png"
+ reference="JBoss AS 7 Quickstarts::kitchensink"/>
+
+ <tutorial
+ id="org.jboss.tools.central.Seam.registration2"
+ categoryId="org.jboss.tools.central.seam2"
+ name="Registration Example"
+ type="projectExample"
+ priority="1"
+ icon="icons/seam16.png"
+ reference="Seam::registration2"/>
+ <tutorial
+ id="org.jboss.tools.central.Seam.messages"
+ categoryId="org.jboss.tools.central.seam2"
+ name="Message Example"
+ type="projectExample"
+ priority="2"
+ icon="icons/seam16.png"
+ reference="Seam::messages"/>
+ <tutorial
+ id="org.jboss.tools.central.Seam.todo"
+ categoryId="org.jboss.tools.central.seam2"
+ name="Todo Example"
+ type="projectExample"
+ priority="3"
+ icon="icons/seam16.png"
+ reference="Seam::todo"/>
+ <tutorial
+ id="org.jboss.tools.central.Seam.numberguess"
+ categoryId="org.jboss.tools.central.seam2"
+ name="Numberguess Example"
+ type="projectExample"
+ priority="4"
+ icon="icons/seam16.png"
+ reference="Seam::numberguess"/>
+ <tutorial
+ id="org.jboss.tools.central.Seam.booking22"
+ categoryId="org.jboss.tools.central.seam2"
+ name="Boooking Example"
+ type="projectExample"
+ priority="5"
+ icon="icons/seam16.png"
+ reference="Seam::booking22"/>
+
</extension>
</plugin>
Deleted: trunk/central/plugins/org.jboss.tools.central/schema/projectExamplesTutorials.exsd
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/schema/projectExamplesTutorials.exsd 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/schema/projectExamplesTutorials.exsd 2011-09-19 19:27:11 UTC (rev 34859)
@@ -1,143 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.tools.central" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.jboss.tools.central" id="projectExamplesTutorial" name="Project Examples Tutorial"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="tutorial" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="tutorial">
- <complexType>
- <sequence>
- </sequence>
- <attribute name="category" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="wtpRuntimes" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="seamRuntimes" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="eclipseIU" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
Copied: trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd (from rev 34696, trunk/central/plugins/org.jboss.tools.central/schema/projectExamplesTutorials.exsd)
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,188 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.central" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.tools.central" id="tutorials" name="Tutorials"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="category" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="tutorial" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="tutorial">
+ <complexType>
+ <attribute name="categoryId" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="projectExample">
+ </enumeration>
+ <enumeration value="cheatsheet">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="reference" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="category">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Deleted: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/DownloadRuntime.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/DownloadRuntime.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/DownloadRuntime.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -1,88 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2008-2011 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * JBoss by Red Hat - Initial implementation.
- ************************************************************************************/
-package org.jboss.tools.central;
-
-/**
- *
- * @author snjeza
- *
- */
-public class DownloadRuntime {
- private String name;
- private String id;
- private String version;
- private String url;
-
- public DownloadRuntime(String id, String name, String version, String url) {
- super();
- this.id = id;
- this.name = name;
- this.version = version;
- this.url = url;
- }
-
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public String getVersion() {
- return version;
- }
- public void setVersion(String version) {
- this.version = version;
- }
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- DownloadRuntime other = (DownloadRuntime) obj;
- if (id == null) {
- if (other.id != null)
- return false;
- } else if (!id.equals(other.id))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- return "DownloadRuntime [name=" + name + ", id=" + id + ", version="
- + version + ", url=" + url + "]";
- }
-
-}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -12,8 +12,16 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Dictionary;
import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -44,8 +52,13 @@
import org.eclipse.ui.services.IServiceLocator;
import org.jboss.tools.central.editors.JBossCentralEditor;
import org.jboss.tools.central.editors.JBossCentralEditorInput;
+import org.jboss.tools.central.model.Tutorial;
+import org.jboss.tools.central.model.TutorialCategory;
+import org.jboss.tools.project.examples.model.Project;
+import org.jboss.tools.runtime.core.model.DownloadRuntime;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.Version;
import org.osgi.service.prefs.BackingStoreException;
/**
@@ -53,16 +66,38 @@
*/
public class JBossCentralActivator extends AbstractUIPlugin {
+ public static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML = "https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/discovery/dir...";
+
+ public static final String ICON = "icon";
+
+ private static final String DESCRIPTION = "description";
+
+ private static final String TUTORIAL = "tutorial";
+
+ public static final String CATEGORY_ID = "categoryId";
+
+ public static final String REFERENCE = "reference";
+
+ public static final String TYPE = "type";
+
+ public static final String PRIORITY = "priority";
+
+ public static final String ID = "id";
+
+ public static final String NAME = "name";
+
+ public static final String CATEGORY = "category";
+
+ public static final String PROJECT_EXAMPLE_TYPE = "projectExample";
+
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.central"; //$NON-NLS-1$
- public static final String DOWNLOAD_JBOSS_RUNTIMES_EXTENSION_ID = "org.jboss.tools.central.downloadJBossRuntimes";
-
public static final String SHOW_JBOSS_CENTRAL_ON_STARTUP = "showJBossCentralOnStartup";
public static final boolean SHOW_JBOSS_CENTRAL_ON_STARTUP_DEFAULT_VALUE = true;
- private static final String JBDS_PRODUCT_PLUGIN_ID = "com.jboss.jbds.product";
+ public static final String JBDS_PRODUCT_PLUGIN_ID = "com.jboss.jbds.product";
public static final String NEW_PROJECT_EXAMPLES_WIZARD_ID = "org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard";
@@ -75,18 +110,15 @@
public static final String CANCELED = FORM_START_TAG + "<span color=\"header\" font=\"header\">Canceled.</span>" + FORM_END_TAG;
public static final String LOADING = FORM_START_TAG + "<span color=\"header\" font=\"header\">Loading...</span>" + FORM_END_TAG;
- public static final int MAX_FEEDS = 40;
+ public static final String TUTORIALS_EXTENSION_ID = "org.jboss.tools.central.tutorials";
- private static final String NAME = "name"; //$NON-NLS-1$
- private static final String ID = "id"; //$NON-NLS-1$
- private static final String VERSION = "version"; //$NON-NLS-1$
- private static final String URL = "url"; //$NON-NLS-1$
+ public Map<String, TutorialCategory> tutorialCategories;
+ public static final int MAX_FEEDS = 100;
+
// The shared instance
private static JBossCentralActivator plugin;
- private Map<String, DownloadRuntime> downloadRuntimes;
-
/**
* The constructor
*/
@@ -108,6 +140,7 @@
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
+ tutorialCategories = null;
super.stop(context);
}
@@ -251,12 +284,12 @@
return null;
}
- public Map<String, DownloadRuntime> getDownloadJBossRuntimes() {
- if (downloadRuntimes == null) {
- downloadRuntimes = new HashMap<String, DownloadRuntime>();
+ public Map<String, TutorialCategory> getTutorialCategories() {
+ if (tutorialCategories == null) {
+ tutorialCategories = new HashMap<String, TutorialCategory>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = registry
- .getExtensionPoint(DOWNLOAD_JBOSS_RUNTIMES_EXTENSION_ID);
+ .getExtensionPoint(TUTORIALS_EXTENSION_ID);
IExtension[] extensions = extensionPoint.getExtensions();
for (int i = 0; i < extensions.length; i++) {
IExtension extension = extensions[i];
@@ -264,16 +297,110 @@
.getConfigurationElements();
for (int j = 0; j < configurationElements.length; j++) {
IConfigurationElement configurationElement = configurationElements[j];
- String name = configurationElement.getAttribute(NAME);
- String id = configurationElement.getAttribute(ID);
- String version = configurationElement.getAttribute(VERSION);
- String url = configurationElement.getAttribute(URL);
- DownloadRuntime downloadRuntime = new DownloadRuntime(id, name, version, url);
- downloadRuntimes.put(id, downloadRuntime);
+ if (CATEGORY.equals(configurationElement.getName())) {
+ String name = configurationElement.getAttribute(NAME);
+ String id = configurationElement.getAttribute(ID);
+ String priorityString = configurationElement.getAttribute(PRIORITY);
+ int priority = Integer.MAX_VALUE;
+ if (priorityString != null) {
+ try {
+ priority = new Integer(priorityString)
+ .intValue();
+ } catch (NumberFormatException e) {
+ log(e);
+ }
+ }
+ TutorialCategory category = new TutorialCategory(id, name, priority);
+ tutorialCategories.put(id, category);
+ }
}
+ for (int j = 0; j < configurationElements.length; j++) {
+ IConfigurationElement configurationElement = configurationElements[j];
+ if (TUTORIAL.equals(configurationElement.getName())) {
+ String name = configurationElement.getAttribute(NAME);
+ String id = configurationElement.getAttribute(ID);
+ String type = configurationElement.getAttribute(TYPE);
+ String reference = configurationElement.getAttribute(REFERENCE);
+ String priorityString = configurationElement.getAttribute(PRIORITY);
+ String description = configurationElement.getAttribute(DESCRIPTION);
+ String iconPath = configurationElement.getAttribute(ICON);
+ int priority = Integer.MAX_VALUE;
+ if (priorityString != null) {
+ try {
+ priority = new Integer(priorityString)
+ .intValue();
+ } catch (NumberFormatException e) {
+ log(e);
+ }
+ }
+ String categoryId = configurationElement.getAttribute(CATEGORY_ID);
+ TutorialCategory category = tutorialCategories.get(categoryId);
+ if (category == null) {
+ log("Invalid tutorial: id=" + id);
+ continue;
+ }
+ Tutorial tutorial = new Tutorial(id, name, type, reference, priority, category, description, iconPath);
+ category.getTutorials().add(tutorial);
+ }
+ }
}
+ List<TutorialCategory> emptyCategories = new ArrayList<TutorialCategory>();
+ for (TutorialCategory category:tutorialCategories.values()) {
+ if (category.getTutorials().size() == 0) {
+ emptyCategories.add(category);
+ }
+ }
+ for (TutorialCategory category:emptyCategories) {
+ tutorialCategories.remove(category.getId());
+ }
}
- return downloadRuntimes;
+
+ return tutorialCategories;
}
+ public Image getImage(String imagePath) {
+ ImageRegistry registry = getImageRegistry();
+ Image image = registry.get(imagePath);
+ if (image != null) {
+ return image;
+ }
+ ImageDescriptor imageDescriptor = getImageDescriptor(imagePath);
+ image = imageDescriptor.createImage();
+ registry.put(imagePath, image);
+ return image;
+ }
+
+ public void setTutorialCategories(
+ Map<String, TutorialCategory> tutorialCategories) {
+ this.tutorialCategories = tutorialCategories;
+ }
+
+ public String getDescription(Tutorial tutorial) {
+ String description = tutorial.getDescription();
+ Project project = tutorial.getProjectExamples();
+ if (project.getDescription() != null) {
+ description = project.getDescription();
+ }
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(description);
+ buffer.append("\n\n");
+ buffer.append("Size: ");
+ buffer.append(project.getSizeAsText());
+ if (project.getUnsatisfiedFixes().size() > 0) {
+ buffer.append("\n\n");
+ }
+ return buffer.toString();
+ }
+
+ public static Dictionary<Object, Object> getEnvironment() {
+ Dictionary<Object, Object> environment = new Hashtable<Object, Object>(System.getProperties());
+ Bundle bundle = Platform.getBundle("org.jboss.tools.central"); //$NON-NLS-1$
+ Version version = bundle.getVersion();
+ environment.put("org.jboss.tools.central.version", version.toString()); //$NON-NLS-1$
+ environment.put("org.jboss.tools.central.version.major", version.getMajor()); //$NON-NLS-1$
+ environment.put("org.jboss.tools.central.version.minor", version.getMinor()); //$NON-NLS-1$
+ environment.put("org.jboss.tools.central.version.micro", version.getMicro()); //$NON-NLS-1$
+ return environment;
+ }
+
}
Deleted: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/DownloadJBossAs701Handler.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/DownloadJBossAs701Handler.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/DownloadJBossAs701Handler.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -1,148 +0,0 @@
-package org.jboss.tools.central.actions;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URL;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.central.DownloadRuntime;
-import org.jboss.tools.central.JBossCentralActivator;
-import org.jboss.tools.project.examples.ProjectExamplesActivator;
-import org.jboss.tools.project.examples.filetransfer.ECFExamplesTransport;
-import org.jboss.tools.runtime.core.JBossRuntimeLocator;
-import org.jboss.tools.runtime.core.RuntimeCoreActivator;
-import org.jboss.tools.runtime.core.model.IRuntimeDetector;
-import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
-import org.jboss.tools.runtime.ui.RuntimeUIActivator;
-
-public class DownloadJBossAs701Handler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- final DownloadRuntime runtime = JBossCentralActivator.getDefault().getDownloadJBossRuntimes().get(getId());
- if (runtime == null) {
- JBossCentralActivator.log("Invalid runtime");
- }
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- DirectoryDialog dialog = new DirectoryDialog(shell);
- dialog.setMessage("Select installation directory.");
- //dialog.setFilterPath("");
- final String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- Job job = new Job("Download '" + runtime.getName() + "' ...") {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- return downloadAndInstall(runtime, selectedDirectory, monitor);
- }
- };
- job.setUser(true);
- job.schedule();
- }
-
- return null;
- }
-
- protected IStatus downloadAndInstall(DownloadRuntime runtime,
- String selectedDirectory, IProgressMonitor monitor) {
- FileInputStream in = null;
- OutputStream out = null;
- try {
- File file = File.createTempFile("JBossRuntime", "tmp");
- file.deleteOnExit();
- out = new BufferedOutputStream(
- new FileOutputStream(file));
- URL url = new URL(runtime.getUrl());
- String name = url.getPath();
- int slashIdx = name.lastIndexOf('/');
- if (slashIdx >= 0)
- name = name.substring(slashIdx + 1);
-
- IStatus result = ECFExamplesTransport.getInstance().download(name,
- url.toExternalForm(), out, monitor);
- out.flush();
- out.close();
- File directory = new File(selectedDirectory);
- directory.mkdirs();
- if (!directory.isDirectory()) {
- JBossCentralActivator.getDefault().getLog().log(result);
- // FIXME
- return Status.CANCEL_STATUS;
- }
- ProjectExamplesActivator.extractZipFile(file, directory, monitor);
- if (!result.isOK()) {
- JBossCentralActivator.getDefault().getLog().log(result);
- // FIXME
- return Status.CANCEL_STATUS;
- }
- createRuntimes(selectedDirectory, monitor);
- } catch (IOException e) {
- JBossCentralActivator.log(e);
- // FIXME
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- // ignore
- }
- }
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- return Status.OK_STATUS;
- }
-
- private String getId() {
- return "org.jboss.tools.central.as.701";
- }
-
- private static void createRuntimes(String directory, IProgressMonitor monitor) {
- JBossRuntimeLocator locator = new JBossRuntimeLocator();
- Set<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault()
- .getRuntimePaths();
- RuntimePath newPath = new RuntimePath(directory);
- runtimePaths.add(newPath);
- for (RuntimePath runtimePath : runtimePaths) {
- List<ServerDefinition> serverDefinitions = locator
- .searchForRuntimes(runtimePath.getPath(),
- monitor);
- runtimePath.getServerDefinitions().clear();
- for (ServerDefinition serverDefinition : serverDefinitions) {
- serverDefinition.setRuntimePath(runtimePath);
- }
- runtimePath.getServerDefinitions().addAll(serverDefinitions);
- }
- List<ServerDefinition> serverDefinitions = RuntimeUIActivator
- .getDefault().getServerDefinitions();
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator
- .getRuntimeDetectors();
- for (IRuntimeDetector detector : detectors) {
- if (detector.isEnabled()) {
- detector.initializeRuntimes(serverDefinitions);
- }
- }
- }
-
-}
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/RefreshJBossTutorialsHandler.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/RefreshJBossTutorialsHandler.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/RefreshJBossTutorialsHandler.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,21 @@
+package org.jboss.tools.central.actions;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.jobs.Job;
+import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.central.jobs.RefreshTutorialsJob;
+
+public class RefreshJBossTutorialsHandler extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ if (RefreshTutorialsJob.INSTANCE.getState() == Job.NONE) {
+ JBossCentralActivator.getDefault().setTutorialCategories(null);
+ RefreshTutorialsJob.INSTANCE.schedule();
+ }
+ return null;
+ }
+
+}
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,372 @@
+/*************************************************************************************
+ * Copyright (c) 2010-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.central.dialogs;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.operation.ModalContext;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.mylyn.commons.core.DelegatingProgressMonitor;
+import org.eclipse.mylyn.internal.discovery.core.model.BundleDiscoveryStrategy;
+import org.eclipse.mylyn.internal.discovery.core.model.ConnectorDescriptor;
+import org.eclipse.mylyn.internal.discovery.core.model.ConnectorDiscovery;
+import org.eclipse.mylyn.internal.discovery.core.model.DiscoveryConnector;
+import org.eclipse.mylyn.internal.discovery.core.model.RemoteBundleDiscoveryStrategy;
+import org.eclipse.mylyn.internal.discovery.ui.DiscoveryUi;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.FormDialog;
+import org.eclipse.ui.forms.HyperlinkSettings;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.central.actions.JBossRuntimeDetectionPreferencesHandler;
+import org.jboss.tools.central.editors.DescriptionToolTip;
+import org.jboss.tools.central.model.Tutorial;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.model.Project;
+import org.jboss.tools.project.examples.model.ProjectFix;
+import org.jboss.tools.runtime.core.RuntimeCoreActivator;
+import org.jboss.tools.runtime.core.model.DownloadRuntime;
+import org.jboss.tools.runtime.ui.actions.DownloadRuntimeAction;
+
+/**
+ * @author snjeza
+ *
+ */
+public class ProjectExamplesDialog extends FormDialog implements IRunnableContext {
+
+ private Tutorial tutorial;
+ private FormToolkit toolkit;
+ private ScrolledForm form;
+ private Composite fixesComposite;
+ private IProgressMonitor monitor;
+
+ public ProjectExamplesDialog(Shell parentShell, Tutorial tutorial) {
+ super(parentShell);
+ setShellStyle(SWT.CLOSE | SWT.MAX | SWT.TITLE | SWT.BORDER
+ | SWT.RESIZE | getDefaultOrientation());
+ this.tutorial = tutorial;
+ this.monitor = new DelegatingProgressMonitor();
+ }
+
+ @Override
+ protected void createFormContent(IManagedForm mform) {
+ mform.getForm().setText(tutorial.getDescription());
+ form = mform.getForm();
+ toolkit = mform.getToolkit();
+ toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
+ form.getBody().setLayout(new GridLayout());
+ form.setText(tutorial.getName());
+ Section descSection = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.EXPANDED);
+ descSection.setText("Description");
+ descSection.setLayout(new GridLayout());
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ descSection.setLayoutData(gd);
+ Text text = new Text(descSection, SWT.READ_ONLY | SWT.WRAP);
+ text.setText(JBossCentralActivator.getDefault().getDescription(tutorial));
+ toolkit.adapt(text, false, false);
+ gd = new GridData(GridData.FILL, GridData.FILL, false, false);
+ text.setLayoutData(gd);
+ descSection.setClient(text);
+
+ Section reqSection = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
+ reqSection.setText("Requirements");
+ reqSection.setLayout(new GridLayout());
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ reqSection.setLayoutData(gd);
+
+ fixesComposite = toolkit.createComposite(reqSection);
+ fixesComposite.setLayout(new GridLayout(3, false));
+ fixesComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ reqSection.setClient(fixesComposite);
+
+ refreshFixes();
+
+ mform.getForm().setBackgroundImage(null);
+ mform.getToolkit().decorateFormHeading(mform.getForm().getForm());
+ mform.getForm().setImage(
+ JBossCentralActivator.getDefault().getImage(
+ "/icons/examples_wiz.gif"));
+ getShell().setText("Project Example");
+ form.getBody().pack();
+ }
+
+ protected void refreshFixes() {
+ Project project = tutorial.getProjectExamples();
+ List<ProjectFix> fixes = project.getFixes();
+ List<ProjectFix> unsatisfiedFixes = new ArrayList<ProjectFix>();
+ project.setUnsatisfiedFixes(unsatisfiedFixes);
+ for (ProjectFix fix:fixes) {
+ if (!ProjectExamplesActivator.canFix(project, fix)) {
+ unsatisfiedFixes.add(fix);
+ }
+ }
+ fixes = project.getUnsatisfiedFixes();
+ disposeChildren(fixesComposite);
+ if (fixes.size() > 0) {
+ for (ProjectFix projectFix : fixes) {
+ if (ProjectFix.WTP_RUNTIME.equals(projectFix.getType())
+ || ProjectFix.SEAM_RUNTIME.equals(projectFix.getType())) {
+ addDescription(projectFix);
+ addRuntimeFixActions(projectFix);
+ }
+ }
+ Set<String> connectorIds = new HashSet<String>();
+ boolean havePluginFix = false;
+ for (ProjectFix projectFix : fixes) {
+ if (ProjectFix.PLUGIN_TYPE.equals(projectFix.getType())) {
+ if (havePluginFix) {
+ new Label(fixesComposite, SWT.NONE);
+ new Label(fixesComposite, SWT.NONE);
+ }
+ addDescription(projectFix);
+ havePluginFix = true;
+ String connectorId = projectFix.getProperties().get(ProjectFix.CONNECTOR_ID);
+ if (connectorId != null) {
+ String[] ids = connectorId.split(",");
+ for (String id:ids) {
+ if (id != null && !id.trim().isEmpty()) {
+ connectorIds.add(id.trim());
+ }
+ }
+ }
+ }
+ }
+ if (havePluginFix) {
+ addPluginFixActions(connectorIds);
+ } else {
+ new Label(fixesComposite, SWT.NONE);
+ new Label(fixesComposite, SWT.NONE);
+ }
+ }
+ }
+
+ private void disposeChildren(Composite composite) {
+ Control[] children = composite.getChildren();
+ for (Control child : children) {
+ if (child instanceof Composite) {
+ disposeChildren((Composite) child);
+ child.dispose();
+ } else {
+ child.dispose();
+ }
+ }
+ }
+
+ private void addDescription(ProjectFix projectFix) {
+ FormText fixDescriptionText = toolkit.createFormText(fixesComposite, true);
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(JBossCentralActivator.FORM_START_TAG);
+ buffer.append("<img href=\"image\"/> ");
+ String description = projectFix.getProperties().get(ProjectFix.DESCRIPTION);
+ description = StringEscapeUtils.escapeHtml(description);
+ buffer.append(description);
+ buffer.append(JBossCentralActivator.FORM_END_TAG);
+ fixDescriptionText.setText(buffer.toString(), true, false);
+ if (ProjectFix.WTP_RUNTIME.equals(projectFix.getType())) {
+ fixDescriptionText.setImage("image", JBossCentralActivator.getDefault().getImage("/icons/wtp_server.gif"));
+ } else if (ProjectFix.SEAM_RUNTIME.equals(projectFix.getType())) {
+ fixDescriptionText.setImage("image", JBossCentralActivator.getDefault().getImage("/icons/seam16.png"));
+ } if (ProjectFix.PLUGIN_TYPE.equals(projectFix.getType())) {
+ fixDescriptionText.setImage("image", JBossCentralActivator.getDefault().getImage("/icons/software.png"));
+ }
+ }
+
+ protected void addRuntimeFixActions(ProjectFix projectFix) {
+ Button install = toolkit.createButton(fixesComposite, "Install", SWT.PUSH);
+ ToolTip tooltip = new DescriptionToolTip(install, "JBoss Runtime Detection");
+ tooltip.activate();
+ //install.setImage(JBossCentralActivator.getDefault().getImage("/icons/search_local.png"));
+ install.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ new JBossRuntimeDetectionPreferencesHandler().execute(new ExecutionEvent());
+ } catch (ExecutionException e1) {
+ JBossCentralActivator.log(e1);
+ }
+ refresh();
+ }
+ });
+ final String downloadId = projectFix.getProperties().get(ProjectFix.DOWNLOAD_ID);
+ boolean haveDownloadId = false;
+ if (downloadId != null) {
+ DownloadRuntime downloadRuntime = RuntimeCoreActivator.getDefault().getDownloadJBossRuntimes().get(downloadId);
+ if (downloadRuntime != null) {
+ haveDownloadId = true;
+ Button download = toolkit.createButton(fixesComposite, "Download and Install...", SWT.PUSH);
+ ToolTip tip = new DescriptionToolTip(download, "Download and install " + downloadRuntime.getName());
+ tip.activate();
+ //download.setImage(JBossCentralActivator.getDefault().getImage("/icons/repository-submit.gif"));
+
+ download.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ new DownloadRuntimeAction(downloadId).run();
+ refresh();
+ }
+ });
+
+ }
+ }
+ if (!haveDownloadId) {
+ new Label(fixesComposite, SWT.NONE);
+ }
+ }
+
+ protected void addPluginFixActions(final Set<String> connectorIds) {
+ if (connectorIds.size() > 0) {
+ Button install = toolkit.createButton(fixesComposite, "Install", SWT.PUSH);
+ ToolTip tooltip = new DescriptionToolTip(install, "Install required feature(s)");
+ tooltip.activate();
+ //install.setImage(JBossCentralActivator.getDefault().getImage("/icons/software.png"));
+ install.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ install(connectorIds);
+ } catch (Exception e1) {
+ // FIXME
+ JBossCentralActivator.log(e1);
+ }
+ refresh();
+ }
+ });
+
+ }
+ Button p2install = toolkit.createButton(fixesComposite, "Install New Software", SWT.PUSH);
+ ToolTip tip = new DescriptionToolTip(p2install, "P2 Install New Software");
+ tip.activate();
+ //p2install.setImage(JBossCentralActivator.getDefault().getImage("/icons/update.gif"));
+
+ p2install.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IHandlerService.class);
+ try {
+ handlerService.executeCommand("org.eclipse.equinox.p2.ui.sdk.install", new Event());
+ }
+ catch (Exception e1) {
+ JBossCentralActivator.log(e1);
+ }
+ refresh();
+ }
+ });
+
+ if (connectorIds.size() == 0) {
+ new Label(fixesComposite, SWT.NONE);
+ }
+ }
+
+ protected void install(final Set<String> connectorIds) throws InvocationTargetException, InterruptedException {
+ run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ ConnectorDiscovery connectorDiscovery = new ConnectorDiscovery();
+
+ // look for descriptors from installed bundles
+ connectorDiscovery.getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
+
+ RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy();
+ remoteDiscoveryStrategy.setDirectoryUrl(JBossCentralActivator.JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML);
+ connectorDiscovery.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
+
+ connectorDiscovery.setEnvironment(JBossCentralActivator.getEnvironment());
+ connectorDiscovery.setVerifyUpdateSiteAvailability(true);
+ IStatus result = connectorDiscovery.performDiscovery(monitor);
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ if (result.isOK()) {
+ List<DiscoveryConnector> connectors = connectorDiscovery.getConnectors();
+ List<ConnectorDescriptor> installableConnectors = new ArrayList<ConnectorDescriptor>();
+ for (DiscoveryConnector connector:connectors) {
+ if (connectorIds.contains(connector.getId())) {
+ installableConnectors.add(connector);
+ }
+ }
+ DiscoveryUi.install(installableConnectors, ProjectExamplesDialog.this);
+ }
+ }
+ });
+
+ }
+
+ @Override
+ public void run(boolean fork, boolean cancelable,
+ IRunnableWithProgress runnable) throws InvocationTargetException,
+ InterruptedException {
+ ModalContext.run(runnable, fork, monitor, getDisplay());
+ }
+
+ protected Display getDisplay() {
+ Display display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, "Run",
+ true);
+ createButton(parent, IDialogConstants.CANCEL_ID,
+ IDialogConstants.CANCEL_LABEL, false);
+ }
+
+ protected void refresh() {
+ if (form == null || form.isDisposed()) {
+ return;
+ }
+ refreshFixes();
+ fixesComposite.pack();
+ form.reflow(true);
+ form.redraw();
+ form.layout(true, true);
+ }
+
+
+}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/AbstractJBossCentralPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/AbstractJBossCentralPage.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/AbstractJBossCentralPage.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -1,15 +1,22 @@
package org.jboss.tools.central.editors;
+import java.io.IOException;
+
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormText;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
+import org.jboss.tools.central.JBossCentralActivator;
public class AbstractJBossCentralPage extends FormPage {
@@ -19,20 +26,9 @@
super(editor, id, title);
}
- protected Section createSection(FormToolkit toolkit, Composite composite, String title, int style) {
- Section section = toolkit.createSection(composite, style);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(section);
- section.setText(title);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- section.setLayout(layout);
- return section;
- }
-
protected Composite createComposite(FormToolkit toolkit, Composite body) {
Composite composite = toolkit.createComposite(body, SWT.NONE);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
@@ -47,4 +43,45 @@
}
return display;
}
+
+ protected Section createSection(FormToolkit toolkit, Composite parent, String name, int style) {
+ final Section section = toolkit.createSection(parent, style);
+ section.setText(name);
+ section.setLayout(new GridLayout());
+ return section;
+ }
+
+ protected Composite createLoadingComposite(FormToolkit toolkit, Composite parent) {
+ Composite composite = toolkit.createComposite(parent, SWT.WRAP);
+ composite.setLayout(new GridLayout(2, false));
+ GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false);
+ composite.setLayoutData(gd);
+ try {
+ final RefreshIndicator indicator = new RefreshIndicator(composite, "/icons/loader.gif", SWT.NONE);
+ gd = new GridData(GridData.FILL, GridData.FILL, false, false);
+ gd.widthHint = 30;
+ gd.heightHint = 10;
+ indicator.setLayoutData(gd);
+ indicator.setBusy(true);
+ toolkit.adapt(indicator, true, false);
+ composite.addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ indicator.dispose();
+ }
+ });
+
+ } catch (IOException e) {
+ JBossCentralActivator.log(e);
+ }
+ FormText formText = toolkit.createFormText(composite, true);
+ gd = new GridData(GridData.FILL, GridData.FILL, false, false);
+ formText.setLayoutData(gd);
+ String text = JBossCentralActivator.FORM_START_TAG +
+ "Refreshing..." +
+ JBossCentralActivator.FORM_END_TAG;
+ formText.setText(text, true, false);
+ return composite;
+ }
}
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,47 @@
+package org.jboss.tools.central.editors;
+
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Text;
+
+public class DescriptionToolTip extends ToolTip {
+
+ private Control control;
+ private String description;
+
+ public DescriptionToolTip(Control control, String description) {
+ super(control);
+ this.control = control;
+ this.description = description;
+ setHideOnMouseDown(true);
+ setPopupDelay(400);
+
+ }
+
+ @Override
+ protected Composite createToolTipContentArea(Event event, Composite parent) {
+ // Create the content area
+ parent.setLayout(new GridLayout());
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 2;
+ layout.marginLeft = 2;
+ composite.setLayout(layout);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ composite.setLayoutData(gd);
+ composite.setBackground(parent.getDisplay().getSystemColor(
+ SWT.COLOR_INFO_BACKGROUND));
+ Text text = new Text(composite,
+ SWT.READ_ONLY | SWT.WRAP);
+ text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+ text.setText(description);
+
+ return composite;
+ }
+
+}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -1,9 +1,10 @@
package org.jboss.tools.central.editors;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.List;
-import java.util.Timer;
-import java.util.TimerTask;
+import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -17,6 +18,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
@@ -28,30 +30,35 @@
import org.eclipse.jface.window.ToolTip;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
@@ -60,7 +67,6 @@
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.ImageHyperlink;
import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.ScrolledPageBook;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.internal.forms.widgets.FormFonts;
@@ -68,8 +74,13 @@
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.central.dialogs.ProjectExamplesDialog;
import org.jboss.tools.central.jobs.RefreshNewsJob;
+import org.jboss.tools.central.jobs.RefreshTutorialsJob;
import org.jboss.tools.central.model.NewsEntry;
+import org.jboss.tools.central.model.Tutorial;
+import org.jboss.tools.central.model.TutorialCategory;
+import org.jboss.tools.project.examples.model.Project;
import org.osgi.framework.Bundle;
public class GettingStartedPage extends AbstractJBossCentralPage {
@@ -81,19 +92,28 @@
private IWorkbenchAction newWizardDropDownAction;
private ScrolledForm form;
private PageBook newsPageBook;
- private Image loaderImage;
- private Image newsImage;
private ScrolledComposite scrollComposite;
private static Font authorFont;
private Font linkFont;
- private RefreshJobChangeListener refreshJobChangeListener;
+ private RefreshNewsJobChangeListener refreshNewsJobChangeListener;
private FormText newsNoteText;
- private FormText newsLoadingText;
+ private FormText tutorialsNoteText;
+ private Composite newsLoadingComposite;
+ private Composite tutorialsLoadingComposite;
private FormText newsExceptionText;
+ private FormText tutorialsExceptionText;
private Composite newsComposite;
+ private Composite tutorialsComposite;
private FormToolkit toolkit;
private ScrolledComposite tutorialScrollComposite;
private PageBook tutorialPageBook;
+ private RefreshTutorialsJobChangeListener refreshTutorialsJobChangeListener;
+ private Section newsSection;
+ private Section tutorialsSection;
+ private Section documentationSection;
+ private Section projectsSection;
+ private Composite projectsComposite;
+ private Composite documentationComposite;
public GettingStartedPage(FormEditor editor) {
super(editor, ID, "Getting Started");
@@ -101,6 +121,7 @@
@Override
protected void createFormContent(IManagedForm managedForm) {
+ super.createFormContent(managedForm);
toolkit = managedForm.getToolkit();
form = managedForm.getForm();
@@ -108,8 +129,10 @@
GridLayout gridLayout = new GridLayout(2, true);
gridLayout.horizontalSpacing = 7;
body.setLayout(gridLayout);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ body.setLayoutData(gd);
toolkit.paintBordersFor(body);
-
+
Composite left = createComposite(toolkit, body);
createTutorialsSection(toolkit, left);
createProjectsSection(toolkit, left);
@@ -120,97 +143,94 @@
createNewsSection(toolkit, right);
toolkit.paintBordersFor(right);
- super.createFormContent(managedForm);
- form.redraw();
- form.reflow(true);
+ final ControlAdapter controlAdapter = new ControlAdapter() {
+
+ @Override
+ public void controlResized(ControlEvent e) {
+ resize();
+ }
+
+ };
+ form.addControlListener(controlAdapter);
+ final PaintListener paintListener = new PaintListener() {
+
+ @Override
+ public void paintControl(PaintEvent e) {
+ resize();
+ }
+ };
+ //form.addPaintListener(paintListener);
+ form.addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ form.removeControlListener(controlAdapter);
+ //form.removePaintListener(paintListener);
+ form.removeDisposeListener(this);
+ }
+ });
+
+ resize();
+
}
private void createNewsSection(FormToolkit toolkit, Composite parent) {
- final Section news = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
- news.setText("News");
- news.setLayout(new GridLayout());
- GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
- gd.widthHint = 350;
- gd.heightHint = 100;
- news.setLayoutData(gd);
- linkFont = news.getFont();
- createNewsToolbar(toolkit, news);
-
- scrollComposite = new ScrolledComposite(news, SWT.V_SCROLL);
- gd =new GridData(SWT.FILL, SWT.FILL, false, false);
+ newsSection = createSection(toolkit, parent, "News", ExpandableComposite.TITLE_BAR|ExpandableComposite.EXPANDED);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ //gd.widthHint = 350;
+ //gd.heightHint = 100;
+ newsSection.setLayoutData(gd);
+ linkFont = newsSection.getFont();
+ createNewsToolbar(toolkit, newsSection);
+
+ scrollComposite = new ScrolledComposite(newsSection, SWT.V_SCROLL);
+ gd =new GridData(SWT.FILL, SWT.FILL, true, false);
scrollComposite.setLayoutData(gd);
scrollComposite.setLayout(new GridLayout());
newsPageBook = new PageBook(scrollComposite, SWT.WRAP);
- gd =new GridData(SWT.FILL, SWT.FILL, false, false);
+ gd =new GridData(SWT.FILL, SWT.FILL, true, false);
newsPageBook.setLayoutData(gd);
scrollComposite.setContent(newsPageBook);
scrollComposite.setExpandVertical(true);
scrollComposite.setExpandHorizontal(true);
- scrollComposite.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- recomputeScrollComposite(scrollComposite, newsPageBook);
- }
- });
+ scrollComposite.setAlwaysShowScrollBars(false);
+// scrollComposite.addControlListener(new ControlAdapter() {
+// public void controlResized(ControlEvent e) {
+// recomputeScrollComposite(scrollComposite, newsPageBook);
+// }
+// });
- newsNoteText = createNewsNoteText(toolkit);
- newsLoadingText = createLoadingText(toolkit);
- newsExceptionText = createExceptionText(toolkit);
+ newsNoteText = createNoteText(toolkit, newsPageBook);
+ newsLoadingComposite = createLoadingComposite(toolkit, newsPageBook);
+ newsExceptionText = createExceptionText(toolkit, newsPageBook);
+
+ newsComposite = toolkit.createComposite(newsPageBook, SWT.NONE);
+ newsComposite.setLayout(new GridLayout());
+ gd =new GridData(SWT.FILL, SWT.FILL, false, false);
+ newsComposite.setLayoutData(gd);
- form.addControlListener(new ControlAdapter() {
-
- @Override
- public void controlResized(ControlEvent e) {
- GridData gridData = (GridData) scrollComposite.getLayoutData();
- Point size = form.getSize();
- gridData.heightHint = size.y - 55;
- gridData.widthHint = size.x/2 - 10;
- gridData.grabExcessVerticalSpace = true;
-
- gridData = (GridData) news.getLayoutData();
- gridData.heightHint = size.y - 40;
- gridData.widthHint = size.x/2 - 5;
- gridData.grabExcessVerticalSpace = false;
- form.reflow(true);
- form.redraw();
- recomputeScrollComposite(scrollComposite, newsPageBook);
- }
- });
-
- news.setClient(scrollComposite);
- showLoading();
+ newsSection.setClient(scrollComposite);
+ showLoading(newsPageBook, newsLoadingComposite, scrollComposite);
newsPageBook.pack(true);
RefreshNewsJob refreshNewsJob = RefreshNewsJob.INSTANCE;
- refreshJobChangeListener = new RefreshJobChangeListener();
- refreshNewsJob.addJobChangeListener(refreshJobChangeListener);
+ refreshNewsJobChangeListener = new RefreshNewsJobChangeListener();
+ refreshNewsJob.addJobChangeListener(refreshNewsJobChangeListener);
refreshNewsJob.schedule();
}
- private FormText createExceptionText(FormToolkit toolkit) {
- FormText formText = toolkit.createFormText(newsPageBook, true);
+ private FormText createExceptionText(FormToolkit toolkit, Composite parent) {
+ FormText formText = toolkit.createFormText(parent, true);
GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false);
formText.setLayoutData(gd);
return formText;
}
- private FormText createLoadingText(FormToolkit toolkit) {
- FormText formText = toolkit.createFormText(newsPageBook, true);
+ private FormText createNoteText(FormToolkit toolkit, Composite parent) {
+ FormText formText = toolkit.createFormText(parent, true);
GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false);
formText.setLayoutData(gd);
- String text = JBossCentralActivator.FORM_START_TAG +
- "<img href=\"image\"/> <b>Refreshing...</b>" +
- JBossCentralActivator.FORM_END_TAG;
- formText.setText(text, true, false);
- Image image = getLoaderImage();
- formText.setImage("image", image);
- return formText;
- }
-
- private FormText createNewsNoteText(FormToolkit toolkit) {
- FormText formText = toolkit.createFormText(newsPageBook, true);
- GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false);
- formText.setLayoutData(gd);
formText.setText("<form><p>" +
"<img href=\"image\"/>" +
" No entries found." +
@@ -260,18 +280,16 @@
}
private void createTutorialsSection(FormToolkit toolkit, Composite parent) {
- final Section tutorials = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
- tutorials.setText("Project Examples");
- tutorials.setLayout(new GridLayout());
+ tutorialsSection = createSection(toolkit, parent, "Project Examples", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
- gd.widthHint = 350;
- gd.heightHint = 200;
- tutorials.setLayoutData(gd);
+ //gd.widthHint = 350;
+ //gd.heightHint = 100;
+ tutorialsSection.setLayoutData(gd);
- createTutorialsToolbar(toolkit, tutorials);
+ createTutorialsToolbar(toolkit, tutorialsSection);
- tutorialScrollComposite = new ScrolledComposite(tutorials, SWT.V_SCROLL);
- gd =new GridData(SWT.FILL, SWT.FILL, false, false);
+ tutorialScrollComposite = new ScrolledComposite(tutorialsSection, SWT.V_SCROLL);
+ gd = new GridData(SWT.FILL, SWT.FILL, false, false);
tutorialScrollComposite.setLayoutData(gd);
tutorialScrollComposite.setLayout(new GridLayout());
toolkit.adapt(tutorialScrollComposite);
@@ -283,49 +301,38 @@
tutorialScrollComposite.setContent(tutorialPageBook);
tutorialScrollComposite.setExpandVertical(true);
tutorialScrollComposite.setExpandHorizontal(true);
- tutorialScrollComposite.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
- }
- });
+ tutorialScrollComposite.setAlwaysShowScrollBars(false);
+// tutorialScrollComposite.addControlListener(new ControlAdapter() {
+// public void controlResized(ControlEvent e) {
+// recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
+// }
+// });
+
+ tutorialsNoteText = createNoteText(toolkit, tutorialPageBook);
+ tutorialsLoadingComposite = createLoadingComposite(toolkit, tutorialPageBook);
+ tutorialsExceptionText = createExceptionText(toolkit, tutorialPageBook);
- Composite tutorialComposite = toolkit.createComposite(tutorialPageBook, SWT.NONE);
- tutorialComposite.setLayout(new GridLayout());
- gd =new GridData(SWT.FILL, SWT.FILL, true, true);
- tutorialComposite.setLayoutData(gd);
+ tutorialsComposite = toolkit.createComposite(tutorialPageBook, SWT.NONE);
+ tutorialsComposite.setLayout(new GridLayout());
+ gd =new GridData(SWT.FILL, SWT.FILL, false, false);
+ tutorialsComposite.setLayoutData(gd);
+
+ tutorialsSection.setClient(tutorialScrollComposite);
-// ExpandableComposite seam2Category = toolkit.createExpandableComposite(tutorialComposite, ExpandableComposite.TITLE_BAR|ExpandableComposite.CLIENT_INDENT|ExpandableComposite.TWISTIE);
-// seam2Category.setText("Seam 2");
-// gd = new GridData(SWT.FILL, SWT.FILL, false, false);
-// seam2Category.setLayoutData(gd);
-// seam2Category.setLayout(new GridLayout());
-
- //newsLoadingText = createLoadingText(toolkit);
-
- form.addControlListener(new ControlAdapter() {
-
+ tutorialsSection.addExpansionListener(new ExpansionAdapter() {
+
@Override
- public void controlResized(ControlEvent e) {
- GridData gridData = (GridData) tutorialScrollComposite.getLayoutData();
- Point size = form.getSize();
- //gridData.heightHint = size.y - 55;
- gridData.widthHint = size.x/2 - 10;
- gridData.grabExcessVerticalSpace = true;
-
- gridData = (GridData) tutorials.getLayoutData();
- //gridData.heightHint = size.y - 40;
- gridData.widthHint = size.x/2 - 5;
- gridData.grabExcessVerticalSpace = false;
- form.reflow(true);
- form.redraw();
- recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
+ public void expansionStateChanged(ExpansionEvent e) {
+ resize();
}
- });
-
- tutorials.setClient(tutorialScrollComposite);
- tutorialPageBook.showPage(tutorialComposite);
- form.reflow(true);
- form.redraw();
+ });
+
+ showLoading(tutorialPageBook, tutorialsLoadingComposite, tutorialScrollComposite);
+ tutorialPageBook.pack(true);
+ RefreshTutorialsJob refreshTutorialsJob = RefreshTutorialsJob.INSTANCE;
+ refreshTutorialsJobChangeListener = new RefreshTutorialsJobChangeListener();
+ refreshTutorialsJob.addJobChangeListener(refreshTutorialsJobChangeListener);
+ refreshTutorialsJob.schedule();
}
private void createTutorialsToolbar(FormToolkit toolkit, Section section) {
@@ -351,18 +358,28 @@
item = JBossCentralActivator.createContributionItem(getSite(), "org.jboss.tools.wtp.runtime.preferences");
toolBarManager.add(item);
- item = JBossCentralActivator.createContributionItem(getSite(), "org.jboss.tools.central.downloadJBossAs701Handler");
+ item = JBossCentralActivator.createContributionItem(getSite(), "org.jboss.tools.central.refreshJBossTutorials");
toolBarManager.add(item);
+ //Action action = new DownloadRuntimeAction("Download and Install JBoss AS 7.0.1", JBossCentralActivator.imageDescriptorFromPlugin(JBossCentralActivator.PLUGIN_ID, "/icons/jbossas7.png"), "org.jboss.tools.runtime.core.as.701");
+ //toolBarManager.add(action);
+
toolBarManager.update(true);
section.setTextClient(headerComposite);
}
public void createProjectsSection(FormToolkit toolkit, Composite parent) {
- Section projects = createSection(toolkit, parent, "Create Projects", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+ projectsSection = createSection(toolkit, parent, "Create Projects", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+ projectsSection.setText("Create Projects");
+ projectsSection.setLayout(new GridLayout());
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
+ //gd.widthHint = 350;
+ //gd.heightHint = 100;
+ projectsSection.setLayoutData(gd);
- Composite headerComposite = toolkit.createComposite(projects, SWT.NONE);
+
+ Composite headerComposite = toolkit.createComposite(projectsSection, SWT.NONE);
RowLayout rowLayout = new RowLayout();
rowLayout.marginTop = 0;
rowLayout.marginBottom = 0;
@@ -378,13 +395,13 @@
toolBarManager.add(newWizardDropDownAction);
toolBarManager.update(true);
- projects.setTextClient(headerComposite);
+ projectsSection.setTextClient(headerComposite);
- Composite composite = toolkit.createComposite(projects);
+ projectsComposite = toolkit.createComposite(projectsSection);
GridLayout layout = new GridLayout(2, true);
layout.horizontalSpacing = 10;
- composite.setLayout(layout);
- GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);
+ projectsComposite.setLayout(layout);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(projectsComposite);
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint("org.eclipse.ui.newWizards");
@@ -403,12 +420,12 @@
for (IConfigurationElement element : elements) {
String id = element.getAttribute("id");
if (wizardIDs.contains(id) && !createdIDs.contains(id)) {
- createProjectLink(toolkit, composite, element);
+ createProjectLink(toolkit, projectsComposite, element);
createdIDs.add(id);
}
}
}
- projects.setClient(composite);
+ projectsSection.setClient(projectsComposite);
}
private void createProjectLink(FormToolkit toolkit, Composite composite,
@@ -499,28 +516,32 @@
}
public void createDocumentationSection(FormToolkit toolkit, Composite parent) {
- Section documentation = createSection(toolkit, parent, "Documentation", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
-
- Composite composite = toolkit.createComposite(documentation);
+ documentationSection = createSection(toolkit, parent, "Documentation", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
+ //gd.widthHint = 350;
+ //gd.heightHint = 100;
+ documentationSection.setLayoutData(gd);
+
+ documentationComposite = toolkit.createComposite(documentationSection);
GridLayout layout = new GridLayout(2, true);
layout.horizontalSpacing = 30;
- composite.setLayout(layout);
- GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);
+ documentationComposite.setLayout(layout);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(documentationComposite);
- addHyperlink(toolkit, composite, "New and Noteworthy", "http://docs.jboss.org/tools/whatsnew/");
- addHyperlink(toolkit, composite, "User Forum", "http://community.jboss.org/en/tools?view=discussions");
+ addHyperlink(toolkit, documentationComposite, "New and Noteworthy", "http://docs.jboss.org/tools/whatsnew/");
+ addHyperlink(toolkit, documentationComposite, "User Forum", "http://community.jboss.org/en/tools?view=discussions");
- addHyperlink(toolkit, composite, "Reference", "http://docs.jboss.org/tools/latest/");
- addHyperlink(toolkit, composite, "Developer Forum", "http://community.jboss.org/en/tools/dev?view=discussions");
+ addHyperlink(toolkit, documentationComposite, "Reference", "http://docs.jboss.org/tools/latest/");
+ addHyperlink(toolkit, documentationComposite, "Developer Forum", "http://community.jboss.org/en/tools/dev?view=discussions");
- addHyperlink(toolkit, composite, "FAQ", "http://www.jboss.org/tools/docs/faq");
- addHyperlink(toolkit, composite, "Wiki", "http://community.jboss.org/wiki/JBossTools");
+ addHyperlink(toolkit, documentationComposite, "FAQ", "http://www.jboss.org/tools/docs/faq");
+ addHyperlink(toolkit, documentationComposite, "Wiki", "http://community.jboss.org/wiki/JBossTools");
- addHyperlink(toolkit, composite, "Screencasts", "http://docs.jboss.org/tools/movies/");
- addHyperlink(toolkit, composite, "Issue Tracker", "https://issues.jboss.org/browse/JBIDE");
+ addHyperlink(toolkit, documentationComposite, "Screencasts", "http://docs.jboss.org/tools/movies/");
+ addHyperlink(toolkit, documentationComposite, "Issue Tracker", "https://issues.jboss.org/browse/JBIDE");
- documentation.setClient(composite);
+ documentationSection.setClient(documentationComposite);
}
private void addHyperlink(FormToolkit toolkit, Composite composite, String text, final String url) {
@@ -538,23 +559,19 @@
public void dispose() {
newWizardDropDownAction.dispose();
newWizardDropDownAction = null;
- if (loaderImage != null) {
- loaderImage.dispose();
- loaderImage = null;
+ if (refreshNewsJobChangeListener != null) {
+ RefreshNewsJob.INSTANCE.removeJobChangeListener(refreshNewsJobChangeListener);
+ refreshNewsJobChangeListener = null;
}
- if (newsImage != null) {
- newsImage.dispose();
- newsImage = null;
+ if (refreshTutorialsJobChangeListener != null) {
+ RefreshTutorialsJob.INSTANCE.removeJobChangeListener(refreshTutorialsJobChangeListener);
+ refreshTutorialsJobChangeListener = null;
}
- if (refreshJobChangeListener != null) {
- RefreshNewsJob.INSTANCE.removeJobChangeListener(refreshJobChangeListener);
- refreshJobChangeListener = null;
- }
super.dispose();
}
- public boolean showLoading() {
- if (newsPageBook.isDisposed()) {
+ public boolean showLoading(final PageBook pageBook, final Composite composite, final ScrolledComposite scrolledComposite) {
+ if (pageBook.isDisposed()) {
return false;
}
Display display = getDisplay();
@@ -562,28 +579,18 @@
@Override
public void run() {
- newsPageBook.showPage(newsLoadingText);
+ pageBook.showPage(composite);
form.reflow(true);
form.redraw();
- recomputeScrollComposite(scrollComposite, newsPageBook);
+ recomputeScrollComposite(scrolledComposite, pageBook);
}
});
return true;
}
- private Image getLoaderImage() {
- if (loaderImage == null) {
- loaderImage = JBossCentralActivator.imageDescriptorFromPlugin(JBossCentralActivator.PLUGIN_ID, "/icons/loader.gif").createImage();
- }
- return loaderImage;
- }
-
private Image getNewsImage() {
- if (newsImage == null) {
- newsImage = JBossCentralActivator.imageDescriptorFromPlugin(JBossCentralActivator.PLUGIN_ID, "/icons/newsLink.gif").createImage();
- }
- return newsImage;
+ return JBossCentralActivator.getDefault().getImage("/icons/newsLink.gif");
}
private void recomputeScrollComposite(ScrolledComposite composite, PageBook pageBook) {
@@ -591,8 +598,8 @@
composite.setMinSize(pageBook.computeSize(r.width, SWT.DEFAULT));
}
- public void showNote() {
- if (newsPageBook.isDisposed()) {
+ public void showNote(final PageBook pageBook, final FormText noteText, final ScrolledComposite scrolledComposite) {
+ if (pageBook.isDisposed()) {
return;
}
Display display = getDisplay();
@@ -600,10 +607,10 @@
@Override
public void run() {
- newsPageBook.showPage(newsNoteText);
+ pageBook.showPage(noteText);
form.reflow(true);
form.redraw();
- recomputeScrollComposite(scrollComposite, newsPageBook);
+ recomputeScrollComposite(scrolledComposite, pageBook);
}
});
}
@@ -624,42 +631,159 @@
}
- private void showException(Exception e) {
+ private void showException(PageBook pageBook, FormText exceptionText, Exception e) {
JBossCentralActivator.log(e);
String text = JBossCentralActivator.FORM_START_TAG +
"<img href=\"image\"/> " +
e.getMessage() +
JBossCentralActivator.FORM_END_TAG;
- newsExceptionText.setText(text, true, false);
+ exceptionText.setText(text, true, false);
Image image = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
- newsExceptionText.setImage("image", image);
- newsPageBook.showPage(newsExceptionText);
+ exceptionText.setImage("image", image);
+ pageBook.showPage(exceptionText);
}
- public void refresh() {
+ public void refreshNews() {
RefreshNewsJob job = RefreshNewsJob.INSTANCE;
+ if (job.getState() == Job.NONE) {
+ if (job.getException() != null) {
+ showException(newsPageBook, newsExceptionText,
+ job.getException());
+ return;
+ }
+ List<NewsEntry> entries = job.getEntries();
+ if (entries == null || entries.size() == 0) {
+ showNote(newsPageBook, newsNoteText, scrollComposite);
+ return;
+ }
+ showNews(entries);
+ }
+ }
+
+ public void refreshTutorials() {
+ RefreshTutorialsJob job = RefreshTutorialsJob.INSTANCE;
if (job.getException() != null) {
- showException(job.getException());
+ showException(tutorialPageBook, tutorialsExceptionText, job.getException());
return;
}
- List<NewsEntry> entries = job.getEntries();
- if (entries == null || entries.size() == 0) {
- showNote();
+ Map<String, TutorialCategory> categories = job.getTutorialCategories();
+ if (categories == null || categories.size() == 0) {
+ showNote(tutorialPageBook, tutorialsNoteText, tutorialScrollComposite);
return;
}
- showNews(entries);
+ showTutorials(categories);
}
+ private void showTutorials(Map<String, TutorialCategory> categories) {
+ disposeChildren(tutorialsComposite);
+ Collection<TutorialCategory> tempCategories = categories.values();
+ List<TutorialCategory> sortedCategories = new ArrayList<TutorialCategory>();
+ sortedCategories.addAll(tempCategories);
+ Collections.sort(sortedCategories);
+ for (TutorialCategory category:sortedCategories) {
+ final ExpandableComposite categoryComposite = toolkit.createExpandableComposite(tutorialsComposite,
+ ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+ categoryComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TB_TOGGLE));
+ categoryComposite.setText(category.getName());
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
+ categoryComposite.setLayoutData(gd);
+ categoryComposite.setLayout(new GridLayout());
+
+ final Composite composite = toolkit.createComposite(categoryComposite);
+ gd = new GridData(SWT.FILL, SWT.FILL, false, false);
+ composite.setLayoutData(gd);
+ composite.setLayout(new GridLayout(1, false));
+
+ categoryComposite.addExpansionListener(new ExpansionAdapter() {
+ public void expansionStateChanged(ExpansionEvent e) {
+ resize();
+ }
+ });
+
+ for (final Tutorial tutorial:category.getTutorials()) {
+ Project project = tutorial.getProjectExamples();
+ if (project == null) {
+ continue;
+ }
+ FormText tutorialText = toolkit.createFormText(composite, true);
+ configureTutorialText(tutorialText, tutorial);
+ hookTooltip(tutorialText, tutorial);
+ }
+ categoryComposite.setClient(composite);
+ }
+
+ tutorialPageBook.showPage(tutorialsComposite);
+ form.reflow(true);
+ form.redraw();
+ resize();
+ //recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
+ }
+
+ private void hookTooltip(FormText tutorialText, Tutorial tutorial) {
+ final String description = JBossCentralActivator.getDefault().getDescription(tutorial);
+ if (description != null && !description.isEmpty()) {
+ ToolTip toolTip = new DescriptionToolTip(tutorialText, description);
+ toolTip.activate();
+ }
+ }
+
+ protected void configureTutorialText(FormText tutorialText, final Tutorial tutorial) {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(JBossCentralActivator.FORM_START_TAG);
+ //boolean haveImage = tutorial.getIconPath() != null && JBossCentralActivator.getDefault().getImage(tutorial.getIconPath()) != null;
+ //if (haveImage) {
+ // buffer.append("<img href=\"image\"/> ");
+ //}
+ //if (project.getUnsatisfiedFixes().size() > 0) {
+ buffer.append("<img href=\"image\"/> ");
+ //}
+ buffer.append("<a href=\"link\">");
+ buffer.append(tutorial.getName());
+ buffer.append("</a> ");
+
+ buffer.append(JBossCentralActivator.FORM_END_TAG);
+ String text = buffer.toString();
+ tutorialText.setText(text , true, false);
+ Image image;
+ Project project = tutorial.getProjectExamples();
+ if (project.getUnsatisfiedFixes().size() > 0) {
+ image = JBossCentralActivator.getDefault().getImage("/icons/nwarning.gif");
+ } else {
+ image = JBossCentralActivator.getDefault().getImage("/icons/import_obj.png");
+ }
+ tutorialText.setImage("image", image);
+ tutorialText.addHyperlinkListener(new HyperlinkAdapter() {
+
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ Object object = e.data;
+ if (object instanceof String) {
+ ProjectExamplesDialog dialog = new ProjectExamplesDialog(getSite().getShell(), tutorial);
+
+ dialog.open();
+ }
+ }
+
+ });
+
+ }
+
+ private void disposeChildren(Composite composite) {
+ Control[] children = composite.getChildren();
+ for (Control child:children) {
+ if (child instanceof Composite) {
+ disposeChildren((Composite) child);
+ child.dispose();
+ } else {
+ child.dispose();
+ }
+ }
+ }
+
private void showNews(List<NewsEntry> entries) {
int i = 0;
- if (newsComposite != null && !newsComposite.isDisposed()) {
- newsComposite.dispose();
- }
- newsComposite = toolkit.createComposite(newsPageBook, SWT.NONE);
- newsComposite.setLayout(new GridLayout());
- GridData gd =new GridData(SWT.FILL, SWT.FILL, true, true);
- newsComposite.setLayoutData(gd);
-
+ disposeChildren(newsComposite);
+
for (final NewsEntry entry:entries) {
if (i++ > JBossCentralActivator.MAX_FEEDS) {
return;
@@ -676,7 +800,6 @@
if (entry.getDescription() != null && !entry.getDescription().isEmpty()) {
ToolTip toolTip = new NewsToolTip(formText, entry.getDescription());
toolTip.activate();
-
}
formText.addHyperlinkListener(new HyperlinkAdapter() {
@@ -697,8 +820,56 @@
recomputeScrollComposite(scrollComposite, newsPageBook);
}
- private class RefreshJobChangeListener implements IJobChangeListener {
+ protected void resize() {
+ Point size = form.getSize();
+ GridData gd;
+ int widthHint = size.x/2 - 40;
+
+ gd = (GridData) newsSection.getLayoutData();
+ gd.heightHint = size.y - 40;
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
+ Point computedSize = newsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ newsSection.setSize(widthHint, computedSize.y);
+
+ gd = (GridData) tutorialsSection.getLayoutData();
+ //gridData.heightHint = size.y - 40;
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
+ tutorialPageBook.pack();
+ computedSize = tutorialPageBook.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ tutorialsSection.setSize(widthHint, computedSize.y);
+
+ gd = (GridData) documentationSection.getLayoutData();
+ //gridData.heightHint = size.y - 40;
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
+ computedSize = documentationSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ documentationSection.setSize(widthHint, computedSize.y);
+
+ gd = (GridData) projectsSection.getLayoutData();
+ //gridData.heightHint = size.y - 40;
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
+ computedSize = projectsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ projectsSection.setSize(widthHint, computedSize.y);
+
+ form.reflow(true);
+ form.redraw();
+ scrollComposite.setMinSize(widthHint, size.y - 55);
+
+ computedSize = tutorialPageBook.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ int y = computedSize.y;
+ if (y > 200) {
+ y = 200;
+ }
+ tutorialScrollComposite.setMinSize(widthHint, y);
+ refreshNews();
+ form.layout(true, true);
+ }
+ private class RefreshNewsJobChangeListener implements IJobChangeListener {
+
@Override
public void aboutToRun(IJobChangeEvent event) {
@@ -715,7 +886,7 @@
@Override
public void run() {
- refresh();
+ refreshNews();
}
});
@@ -729,7 +900,7 @@
@Override
public void scheduled(IJobChangeEvent event) {
RefreshNewsJob.INSTANCE.setException(null);
- showLoading();
+ showLoading(newsPageBook, newsLoadingComposite, scrollComposite);
}
@Override
@@ -739,4 +910,46 @@
}
+ private class RefreshTutorialsJobChangeListener implements IJobChangeListener {
+
+ @Override
+ public void aboutToRun(IJobChangeEvent event) {
+
+ }
+
+ @Override
+ public void awake(IJobChangeEvent event) {
+
+ }
+
+ @Override
+ public void done(IJobChangeEvent event) {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ refreshTutorials();
+ }
+ });
+
+ }
+
+ @Override
+ public void running(IJobChangeEvent event) {
+
+ }
+
+ @Override
+ public void scheduled(IJobChangeEvent event) {
+ RefreshTutorialsJob.INSTANCE.setException(null);
+ showLoading(tutorialPageBook, tutorialsLoadingComposite, tutorialScrollComposite);
+ }
+
+ @Override
+ public void sleeping(IJobChangeEvent event) {
+
+ }
+
+ }
+
}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -10,9 +10,6 @@
************************************************************************************/
package org.jboss.tools.central.editors;
-
-import javax.tools.Tool;
-
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.action.IToolBarManager;
@@ -24,7 +21,6 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
@@ -48,7 +44,7 @@
private static final String JBDS_CENTRAL = "JBoss Developer Studio Central";
- private GettingStartedPage gettingStartedPage;
+ private AbstractJBossCentralPage gettingStartedPage;
private SoftwarePage softwarePage;
@@ -204,7 +200,7 @@
return headerImage;
}
- public GettingStartedPage getGettingStartedPage() {
+ public AbstractJBossCentralPage getGettingStartedPage() {
return gettingStartedPage;
}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/NewsToolTip.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/NewsToolTip.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/NewsToolTip.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -3,6 +3,8 @@
import org.eclipse.jface.window.ToolTip;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.OpenWindowListener;
+import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MouseEvent;
@@ -31,6 +33,22 @@
private int y;
private boolean focused = false;
+ private Listener deactivateListener = new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ if (focused) {
+ if (CURRENT_TOOLTIP != null) {
+ CURRENT_TOOLTIP.dispose();
+ CURRENT_TOOLTIP = null;
+ }
+ activate();
+ hide();
+ focused = false;
+ }
+ }
+ };
+
private MouseMoveListener mouseMoveListener = new MouseMoveListener() {
public void mouseMove(MouseEvent e) {
x = e.x;
@@ -64,9 +82,20 @@
public NewsToolTip(FormText formText, String toolText) {
super(formText);
- this.toolText = toolText;
+ this.toolText = "<html>" +
+ "<head>" +
+ "<title>Aggregated feed of all JBoss feeds</title>" +
+ "<style>" +
+ "html, body { font-size: 12px;font-family: Arial, Helvetica, sans-serif; }" +
+ "h1, h2, h3, h4, h5, h6 { font-size: 14px;font-weight:bold;font-family: Arial, Helvetica, sans-serif; }" +
+ "</style>" +
+ "</head>" +
+ "<body" +
+ toolText +
+ "</body>" +
+ "</html>";
this.formText = formText;
- setShift(new Point(10, 3));
+ setShift(new Point(0, 15));
setPopupDelay(400);
setHideOnMouseDown(true);
}
@@ -75,7 +104,7 @@
final Shell stickyTooltip = new Shell(control.getShell(), SWT.ON_TOP | SWT.TOOL
| SWT.NO_FOCUS);
stickyTooltip.setLayout(new GridLayout());
- stickyTooltip.setBackground(stickyTooltip.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+ //stickyTooltip.setBackground(stickyTooltip.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
control.getDisplay().asyncExec(new Runnable() {
public void run() {
@@ -100,6 +129,9 @@
if (!focused) {
formText.setFocus();
}
+ if (formText.getShell() != null) {
+ formText.getShell().addListener(SWT.Deactivate, deactivateListener);
+ }
formText.addMouseMoveListener(mouseMoveListener);
formText.addListener(SWT.KeyDown, keyListener);
@@ -110,8 +142,10 @@
if (formText != null && !formText.isDisposed()) {
formText.removeMouseMoveListener(mouseMoveListener);
formText.removeListener(SWT.KeyDown, keyListener);
+ if (formText.getShell() != null && !formText.getShell().isDisposed()) {
+ formText.getShell().removeListener(SWT.Deactivate, deactivateListener);
+ }
}
-
}
});
@@ -121,8 +155,14 @@
parent.setLayoutData(gd);
Browser browser = new Browser(parent, SWT.NONE);
+ browser.setJavascriptEnabled(false);
+ browser.addOpenWindowListener(new OpenWindowListener() {
+ public void open(WindowEvent event) {
+ event.required= true;
+ }
+ });
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.heightHint = 250;
+ gd.heightHint = 150;
gd.widthHint = 400;
browser.setLayoutData(gd);
browser.setText(toolText);
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/RefreshIndicator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/RefreshIndicator.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/RefreshIndicator.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,200 @@
+package org.jboss.tools.central.editors;
+
+import java.awt.image.ImageProducer;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.central.JBossCentralActivator;
+import org.osgi.framework.Bundle;
+public class RefreshIndicator extends Canvas {
+ protected Image[] images;
+ protected Image image;
+
+ protected Thread busyThread;
+ protected boolean stop;
+
+ /**
+ * BusyWidget constructor comment.
+ * @param parent org.eclipse.swt.widgets.Composite
+ * @param style int
+ * @throws IOException
+ */
+ public RefreshIndicator(Composite parent, String imagePath, int style) throws IOException {
+ super(parent, style);
+
+ images = getImages(parent, imagePath);
+
+ addPaintListener(new PaintListener() {
+ public void paintControl(PaintEvent event) {
+ onPaint(event);
+ }
+ });
+
+ image = images[0];
+ }
+
+ private Image[] getImages(Composite parent, String imagePath) throws IOException {
+ ImageLoader loader = new ImageLoader();
+ Bundle bundle = JBossCentralActivator.getDefault().getBundle();
+ URL entry = bundle.getEntry(imagePath);
+ Image[] images = null;
+ InputStream is = null;
+ try {
+ is = entry.openStream();
+ ImageData[] datas = loader.load(is);
+ images = new Image[datas.length];
+ int i = 0;
+ for (ImageData data:datas) {
+ images[i++] = new Image(parent.getDisplay(), data);
+ }
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ }
+ return images;
+ }
+
+ public Point computeSize(int wHint, int hHint, boolean changed) {
+ return new Point(25, 25);
+ }
+
+ /**
+ * Creates a thread to animate the image.
+ */
+ protected synchronized void createBusyThread() {
+ if (busyThread != null)
+ return;
+
+ stop = false;
+ busyThread = new Thread() {
+ protected int count;
+ public void run() {
+ try {
+ final int maxCount = images.length;
+ count = 1;
+ while (!stop) {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ if (!stop) {
+ if (count < maxCount)
+ setImage(images[count]);
+ count++;
+ if (count > maxCount - 1)
+ count = 1;
+ }
+ }
+ });
+ try {
+ sleep(125);
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ if (busyThread == null)
+ Display.getDefault().syncExec(new Thread() {
+ public void run() {
+ setImage(images[0]);
+ }
+ });
+ } catch (Exception e) {
+ JBossCentralActivator.log(e);
+ }
+ }
+ };
+
+ busyThread.setPriority(Thread.NORM_PRIORITY + 2);
+ busyThread.setDaemon(true);
+ busyThread.start();
+ }
+
+ public void dispose() {
+ stop = true;
+ busyThread = null;
+ if (images != null) {
+ for (Image image:images) {
+ image.dispose();
+ }
+ }
+ super.dispose();
+ }
+
+ /**
+ * Return the image or <code>null</code>.
+ */
+ public Image getImage() {
+ return image;
+ }
+
+ /**
+ * Returns true if it is currently busy.
+ *
+ * @return boolean
+ */
+ public boolean isBusy() {
+ return (busyThread != null);
+ }
+
+ /*
+ * Process the paint event
+ */
+ protected void onPaint(PaintEvent event) {
+ Rectangle rect = getClientArea();
+ if (rect.width == 0 || rect.height == 0)
+ return;
+
+ GC gc = event.gc;
+ if (image != null)
+ gc.drawImage(image, 2, 2);
+ }
+
+ /**
+ * Sets the indicators busy count up (true) or down (false) one.
+ *
+ * @param busy boolean
+ */
+ public synchronized void setBusy(boolean busy) {
+ if (busy) {
+ if (busyThread == null)
+ createBusyThread();
+ } else {
+ if (busyThread != null) {
+ stop = true;
+ busyThread = null;
+ }
+ }
+ }
+
+ /**
+ * Set the image.
+ * The value <code>null</code> clears it.
+ */
+ public void setImage(Image image) {
+ if (image != this.image && !isDisposed()) {
+ this.image = image;
+ redraw();
+ }
+ }
+
+ @Override
+ public void setVisible(boolean visible) {
+ setBusy(visible);
+ super.setVisible(visible);
+ }
+}
\ No newline at end of file
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -23,7 +23,6 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -35,7 +34,6 @@
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormText;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
@@ -50,15 +48,13 @@
public class SoftwarePage extends AbstractJBossCentralPage implements IRunnableContext {
- private static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML = "https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/discovery/dir...";
public static final String ID = ID_PREFIX + "SoftwarePage";
private Dictionary<Object, Object> environment;
private ScrolledForm form;
private IProgressMonitor monitor;
private PageBook pageBook;
- private Image loaderImage;
- private FormText loadingText;
+ private Composite loadingComposite;
private Composite featureComposite;
private DiscoveryViewer discoveryViewer;
private RefreshJobChangeListener refreshJobChangeListener;
@@ -116,7 +112,7 @@
discoveryViewer = new DiscoveryViewer(getSite(), this);
discoveryViewer.setShowConnectorDescriptorKindFilter(false);
discoveryViewer.setShowInstalledFilterEnabled(true);
- discoveryViewer.setDirectoryUrl(JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML);
+ discoveryViewer.setDirectoryUrl(JBossCentralActivator.JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML);
discoveryViewer.createControl(pageBook);
discoveryViewer.setEnvironment(getEnvironment());
discoveryViewer.addFilter(new ViewerFilter() {
@@ -152,7 +148,7 @@
}
});
- loadingText = createLoadingText(toolkit);
+ loadingComposite = createLoadingComposite(toolkit, pageBook);
form.addControlListener(new ControlAdapter() {
@@ -185,6 +181,13 @@
}
+ private Dictionary<Object, Object> getEnvironment() {
+ if (environment == null) {
+ environment = JBossCentralActivator.getEnvironment();
+ }
+ return environment;
+ }
+
private void createFeaturesToolbar(FormToolkit toolkit, Section section) {
Composite headerComposite = toolkit.createComposite(section, SWT.NONE);
RowLayout rowLayout = new RowLayout();
@@ -210,20 +213,9 @@
section.setTextClient(headerComposite);
}
- private FormText createLoadingText(FormToolkit toolkit) {
- FormText formText = toolkit.createFormText(pageBook, true);
- GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false);
- formText.setLayoutData(gd);
- String text = JBossCentralActivator.FORM_START_TAG +
- "<img href=\"image\"/> <b>Refreshing...</b>" +
- JBossCentralActivator.FORM_END_TAG;
- formText.setText(text, true, false);
- Image image = getLoaderImage();
- formText.setImage("image", image);
- return formText;
- }
+
private void adapt(FormToolkit toolkit, Control control) {
-; toolkit.adapt(control, true, true);
+ toolkit.adapt(control, true, true);
if (control instanceof Composite) {
Control[] children = ((Composite) control).getChildren();
for (Control c:children) {
@@ -232,20 +224,6 @@
}
}
- private Dictionary<Object, Object> getEnvironment() {
- if (environment == null) {
- environment = new Hashtable<Object, Object>(System.getProperties());
-
- Bundle bundle = Platform.getBundle("org.jboss.tools.central"); //$NON-NLS-1$
- Version version = bundle.getVersion();
- environment.put("org.jboss.tools.central.version", version.toString()); //$NON-NLS-1$
- environment.put("org.jboss.tools.central.version.major", version.getMajor()); //$NON-NLS-1$
- environment.put("org.jboss.tools.central.version.minor", version.getMinor()); //$NON-NLS-1$
- environment.put("org.jboss.tools.central.version.micro", version.getMicro()); //$NON-NLS-1$
- }
- return environment;
- }
-
@Override
public void run(boolean fork, boolean cancelable,
IRunnableWithProgress runnable) throws InvocationTargetException,
@@ -262,7 +240,7 @@
@Override
public void run() {
- pageBook.showPage(loadingText);
+ pageBook.showPage(loadingComposite);
form.reflow(true);
form.redraw();
}
@@ -289,19 +267,8 @@
return true;
}
- private Image getLoaderImage() {
- if (loaderImage == null) {
- loaderImage = JBossCentralActivator.imageDescriptorFromPlugin(JBossCentralActivator.PLUGIN_ID, "/icons/loader.gif").createImage();
- }
- return loaderImage;
- }
-
@Override
public void dispose() {
- if (loaderImage != null) {
- loaderImage.dispose();
- loaderImage = null;
- }
if (refreshJobChangeListener != null) {
RefreshDiscoveryJob.INSTANCE.removeJobChangeListener(refreshJobChangeListener);
refreshJobChangeListener = null;
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshDiscoveryJob.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshDiscoveryJob.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshDiscoveryJob.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -13,7 +13,7 @@
public static RefreshDiscoveryJob INSTANCE = new RefreshDiscoveryJob();
private RefreshDiscoveryJob() {
- super("Refresh JBoss News...");
+ super("Discovering...");
setPriority(LONG);
}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -27,7 +27,7 @@
public static RefreshNewsJob INSTANCE = new RefreshNewsJob();
private RefreshNewsJob() {
- super("Refresh JBoss News...");
+ super("Refreshing JBoss News...");
setPriority(LONG);
}
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshTutorialsJob.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshTutorialsJob.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshTutorialsJob.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,102 @@
+package org.jboss.tools.central.jobs;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.central.model.Tutorial;
+import org.jboss.tools.central.model.TutorialCategory;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.model.Category;
+import org.jboss.tools.project.examples.model.Project;
+import org.jboss.tools.project.examples.model.ProjectFix;
+import org.jboss.tools.project.examples.model.ProjectUtil;
+
+public class RefreshTutorialsJob extends Job {
+
+ private Exception exception;
+ private Map<String, TutorialCategory> tutorialCategories;
+ public static RefreshTutorialsJob INSTANCE = new RefreshTutorialsJob();
+
+ private RefreshTutorialsJob() {
+ super("Refreshing JBoss Tutorials...");
+ setPriority(LONG);
+ }
+
+ @Override
+ public IStatus run(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ tutorialCategories = JBossCentralActivator.getDefault().getTutorialCategories();
+ List<Category> categories = ProjectUtil.getProjects(monitor);
+ Collection<TutorialCategory> values = tutorialCategories.values();
+ for (TutorialCategory category:values) {
+ for (Tutorial tutorial:category.getTutorials()) {
+ if (JBossCentralActivator.PROJECT_EXAMPLE_TYPE.equals(tutorial.getType())) {
+ String reference = tutorial.getReference();
+ String[] projectExamples = reference.split("::");
+ Assert.isNotNull(projectExamples);
+ Assert.isTrue(projectExamples.length == 2);
+ String projectExampleCategory = projectExamples[0];
+ String projectExampleName = projectExamples[1];
+ Project projectTutorial = null;
+ for (Category peCategory : categories) {
+ if (projectExampleCategory.equals(peCategory.getName())) {
+ for (Project project : peCategory.getProjects()) {
+ if (projectExampleName
+ .equals(project.getName())) {
+ projectTutorial = project;
+ break;
+ }
+ }
+ }
+ if (projectTutorial != null) {
+ List<ProjectFix> unsatisfiedFixes = new ArrayList<ProjectFix>();
+ if (projectTutorial != null) {
+ List<ProjectFix> fixes = projectTutorial.getFixes();
+ projectTutorial.setUnsatisfiedFixes(unsatisfiedFixes);
+ for (ProjectFix fix : fixes) {
+ if (!ProjectExamplesActivator.canFix(projectTutorial, fix)) {
+ unsatisfiedFixes.add(fix);
+ }
+ }
+ }
+
+ break;
+ }
+ }
+ if (projectTutorial != null) {
+ tutorial.setProjectExamples(projectTutorial);
+ } else {
+ JBossCentralActivator.log("Invalid Project example:" + tutorial.getId());
+ }
+ } else {
+ // FIXME
+ }
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ public Exception getException() {
+ return exception;
+ }
+
+ public void setException(Exception exception) {
+ this.exception = exception;
+ }
+
+ public Map<String, TutorialCategory> getTutorialCategories() {
+ return tutorialCategories;
+ }
+
+}
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/Tutorial.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/Tutorial.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/Tutorial.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,157 @@
+package org.jboss.tools.central.model;
+
+import org.jboss.tools.project.examples.model.Project;
+
+public class Tutorial implements Comparable<Tutorial> {
+ private String id;
+ private String name;
+ private String type;
+ private String reference;
+ private int priority;
+ private TutorialCategory category;
+ private Project projectExamples;
+ private String description;
+ private String iconPath;
+
+ public Tutorial(String id, String name, String type, String reference,
+ int priority, TutorialCategory category, String description, String iconPath) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ this.reference = reference;
+ this.priority = priority;
+ this.category = category;
+ this.description = description;
+ this.iconPath = iconPath;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ public TutorialCategory getCategory() {
+ return category;
+ }
+
+ public void setCategory(TutorialCategory category) {
+ this.category = category;
+ }
+
+ public Project getProjectExamples() {
+ return projectExamples;
+ }
+
+ public void setProjectExamples(Project projectExamples) {
+ this.projectExamples = projectExamples;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getIconPath() {
+ return iconPath;
+ }
+
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Tutorial other = (Tutorial) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int compareTo(Tutorial o) {
+ if (o == null) {
+ return -1;
+ }
+ TutorialCategory otherCategory = o.getCategory();
+ if (otherCategory == null && this.category == null) {
+ return 0;
+ }
+ if (this.category != null) {
+ if (this.category.compareTo(otherCategory) != 0) {
+ return this.category.compareTo(otherCategory);
+ }
+ int other = o.getPriority();
+ if (other < this.priority)
+ return 1;
+ else if (other > this.priority)
+ return -1;
+ return this.getId().compareTo(o.getId());
+ }
+ return -1;
+ }
+
+ @Override
+ public String toString() {
+ return "Tutorial [id=" + id + ", name=" + name + ", type=" + type
+ + ", reference=" + reference + ", priority=" + priority
+ + ", category=" + category + ", projectExamples="
+ + projectExamples + ", description=" + description
+ + ", iconPath=" + iconPath + "]";
+ }
+
+}
Added: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java (rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,93 @@
+package org.jboss.tools.central.model;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+public class TutorialCategory implements Comparable<TutorialCategory> {
+
+ private String id;
+ private String name;
+ private int priority;
+ private Set<Tutorial> tutorials = new TreeSet<Tutorial>();
+
+ public TutorialCategory() {
+ }
+
+ public TutorialCategory(String id, String name, int priority) {
+ this.id = id;
+ this.name = name;
+ this.priority = priority;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ TutorialCategory other = (TutorialCategory) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "TutorialCategory [id=" + id + ", name=" + name + ", priority="
+ + priority + "]";
+ }
+
+ @Override
+ public int compareTo(TutorialCategory o) {
+ if (o == null)
+ return 1;
+ int other = o.getPriority();
+ if (other < this.priority)
+ return 1;
+ else if (other > this.priority)
+ return -1;
+ return id.compareTo(o.getId());
+ }
+
+ public Set<Tutorial> getTutorials() {
+ return tutorials;
+ }
+
+}
Added: trunk/central/plugins/org.jboss.tools.central.discovery/images/jbosstools_icon16.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central.discovery/images/jbosstools_icon16.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central.discovery/images/jbosstools_icon32.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central.discovery/images/jbosstools_icon32.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2011-09-19 19:27:11 UTC (rev 34859)
@@ -56,6 +56,22 @@
url="http://www.eclipse.org/m2e/">
</overview>
</connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ description="Maven Integration for WTP."
+ id="org.maven.ide.eclipse.wtp"
+ kind="task"
+ license="Free, EPL"
+ name="m2e - Maven Integration for Eclipse."
+ provider="Eclipse.org - m2e"
+ siteUrl="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/">
+ <icon
+ image32="images/m2e_32.gif">
+ </icon>
+ <overview
+ url="http://www.eclipse.org/m2e/">
+ </overview>
+ </connectorDescriptor>
<connectorDescriptor
categoryId="org.jboss.tools.category.test"
certificationId="com.jboss.jbds.discovery.JbdsCertified"
@@ -75,6 +91,125 @@
url="http://testng.org/">
</overview>
</connectorDescriptor>
-
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven Integration."
+ id="org.jboss.tools.maven.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven Integration."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ summary="JBoss Maven Integration."
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven CDI Configurator."
+ id="org.jboss.tools.maven.cdi.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven CDI Configurator."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven Hibernate Configurator."
+ id="org.jboss.tools.maven.hibernate.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven Hibernate Configurator."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven JAX-RS Configurator."
+ id="org.jboss.tools.maven.jaxrs.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven JAX-RS Configurator."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven JSF Configurator."
+ id="org.jboss.tools.maven.jsf.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven JSF Configurator."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven Portlet Configurator."
+ id="org.jboss.tools.maven.portlet.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven Portlet Configurator."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.category.test"
+ certificationId="com.jboss.jbds.discovery.JbdsCertified"
+ description="JBoss Maven Seam Configurator."
+ id="org.jboss.tools.maven.seam.feature"
+ kind="task"
+ license="Free, EPL"
+ name="JBoss Maven Seam Configurator."
+ provider="JBoss by Red Hat"
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ <icon
+ image32="images/jbosstools_icon32.png">
+ </icon>
+ <overview
+ url="http://jboss.org/tools">
+ </overview>
+ </connectorDescriptor>
</extension>
</plugin>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/.project
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/.project 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/.project 2011-09-19 19:27:11 UTC (rev 34859)
@@ -1,34 +1,41 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.project.examples</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.project.examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>lib-org.jboss.tools.jst.web.kb_3.3.0.v20110915-1635-H19-M3</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7/plugins/org.jboss.tools.jst.web.kb_3.3.0.v20110915-1635-H19-M3</location>
+ </link>
+ </linkedResources>
+</projectDescription>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -54,6 +54,7 @@
import org.eclipse.ui.internal.cheatsheets.views.ViewUtilities;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.validation.internal.operations.ValidationBuilder;
+import org.jboss.tools.project.examples.fixes.PluginFix;
import org.jboss.tools.project.examples.fixes.ProjectExamplesFix;
import org.jboss.tools.project.examples.fixes.SeamRuntimeFix;
import org.jboss.tools.project.examples.fixes.WTPRuntimeFix;
@@ -441,4 +442,22 @@
out.write(buffer, 0, len);
}
}
+
+ public static boolean canFix(Project project,ProjectFix fix) {
+ String type = fix.getType();
+ if (ProjectFix.PLUGIN_TYPE.equals(type)) {
+ return new PluginFix().canFix(project, fix);
+ }
+
+ if (ProjectFix.WTP_RUNTIME.equals(type)) {
+ return new WTPRuntimeFix().canFix(project, fix);
+ }
+
+ if (ProjectFix.SEAM_RUNTIME.equals(type)) {
+ return new SeamRuntimeFix().canFix(project, fix);
+ }
+ ProjectExamplesActivator.log(NLS.bind(Messages.NewProjectExamplesWizardPage_Invalid_fix, project.getName()));
+ return true;
+ }
+
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -45,6 +45,9 @@
public static final String SEAM_PREFERENCES_ID = "org.jboss.tools.common.model.ui.seam"; //$NON-NLS-1$
public static final String WTP_PREFERENCES_ID = "org.eclipse.wst.server.ui.runtime.preferencePage"; //$NON-NLS-1$
+ public static final Object DOWNLOAD_ID = "downloadId"; //$NON-NLS-1$
+ public static final Object CONNECTOR_ID = "connectorIds"; //$NON-NLS-1$
+
private String type;
private Map<String,String> properties = new HashMap<String,String>();
private static Map<String,String> shortDescriptions = new HashMap<String, String>();
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -399,23 +399,6 @@
+ monitorBounds.height - initialSize.y)));
}
- private boolean canFix(Project project,ProjectFix fix) {
- String type = fix.getType();
- if (ProjectFix.PLUGIN_TYPE.equals(type)) {
- return new PluginFix().canFix(project, fix);
- }
-
- if (ProjectFix.WTP_RUNTIME.equals(type)) {
- return new WTPRuntimeFix().canFix(project, fix);
- }
-
- if (ProjectFix.SEAM_RUNTIME.equals(type)) {
- return new SeamRuntimeFix().canFix(project, fix);
- }
- ProjectExamplesActivator.log(NLS.bind(Messages.NewProjectExamplesWizardPage_Invalid_fix, project.getName()));
- return true;
- }
-
private void refresh(final TreeViewer viewer, boolean show) {
AdaptableList input = new AdaptableList(getCategories(show));
viewer.setInput(input);
@@ -567,7 +550,7 @@
List<ProjectFix> unsatisfiedFixes = new ArrayList<ProjectFix>();
project.setUnsatisfiedFixes(unsatisfiedFixes);
for (ProjectFix fix:fixes) {
- if (!canFix(project, fix)) {
+ if (!ProjectExamplesActivator.canFix(project, fix)) {
unsatisfiedFixes.add(fix);
}
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/META-INF/MANIFEST.MF 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/META-INF/MANIFEST.MF 2011-09-19 19:27:11 UTC (rev 34859)
@@ -4,8 +4,8 @@
Bundle-SymbolicName: org.jboss.tools.runtime.core;singleton:=true
Bundle-Version: 1.3.0.qualifier
Bundle-Activator: org.jboss.tools.runtime.core.RuntimeCoreActivator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
+Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %BundleVendor
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml 2011-09-19 19:27:11 UTC (rev 34859)
@@ -2,5 +2,43 @@
<?eclipse version="3.4"?>
<plugin>
<extension-point id="runtimeDetectors" name="Runtime Detectors" schema="schema/runtimeDetectors.exsd"/>
-
+ <extension-point id="downloadJBossRuntimes" name="%DownloadJBossRuntimes" schema="schema/downloadJBossRuntimes.exsd"/>
+
+ <extension
+ point="org.jboss.tools.runtime.core.downloadJBossRuntimes">
+ <runtime
+ id="org.jboss.tools.runtime.core.as.701"
+ name="JBoss AS 7.0.1 Everything (NOT Java EE6 Certified)"
+ version="7.0.1.Final"
+ size="68MB"
+ url="http://download.jboss.org/jbossas/7.0/jboss-as-7.0.1.Final/jboss-as-7.0.1..."/>
+ <runtime
+ id="org.jboss.tools.runtime.core.seam.222"
+ name="JBoss Seam 2.2.2.Final"
+ version="2.2.2.Final"
+ size="113.2MB"
+ url="http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.2.2.Final/jbos..."/>
+ <runtime
+ id="org.jboss.tools.runtime.core.seam.202"
+ name="JBoss Seam 2.0.2.SP1"
+ version="2.0.2.SP1"
+ size="84MB"
+ url="https://sourceforge.net/projects/jboss/files/JBoss%20Seam/jboss-seam-2.0...."/>
+
+ <runtime
+ id="org.jboss.tools.runtime.core.as.610"
+ name="JBoss AS 6.1.0"
+ version="6.1.0.Final"
+ size="183MB"
+ url="http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.z..."/>
+ <runtime
+ id="org.jboss.tools.runtime.core.as.423"
+ name="JBoss AS 4.2.3"
+ version="4.2.3"
+ size="100MB"
+ url="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4...."/>
+
+
+ </extension>
+
</plugin>
Added: trunk/runtime/plugins/org.jboss.tools.runtime.core/schema/downloadJBossRuntimes.exsd
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/schema/downloadJBossRuntimes.exsd (rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/schema/downloadJBossRuntimes.exsd 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,138 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.central" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.tools.central" id="downloadJBossRuntimes" name="Download JBoss Runtimes"/>
+ </appinfo>
+ <documentation>
+ Downloads a new JBoss Runtime
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="runtime" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="runtime">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="version" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="url" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="size" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 3.0.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ <extension
+ point="org.jboss.tools.central.downloadJBossRuntimes">
+
+</extension>
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ JBoss by Red Hat
+ </documentation>
+ </annotation>
+
+</schema>
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -11,7 +11,9 @@
package org.jboss.tools.runtime.core;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
@@ -27,6 +29,7 @@
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.runtime.core.model.DownloadRuntime;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
import org.jboss.tools.runtime.core.model.InvalidRuntimeDetector;
import org.osgi.framework.BundleContext;
@@ -45,6 +48,8 @@
private static final String ESB_DETECTOR_ID = "org.jboss.tools.runtime.handlers.EsbHandler"; //$NON-NLS-1$
private static final String RUNTIME_DETECTOR_EXTENSION_ID = "org.jboss.tools.runtime.core.runtimeDetectors";
+
+ public static final String DOWNLOAD_JBOSS_RUNTIMES_EXTENSION_ID = "org.jboss.tools.runtime.core.downloadJBossRuntimes";
private static final String NAME = "name";
@@ -69,6 +74,12 @@
private static IEclipsePreferences prefs;
+ private static final String VERSION = "version"; //$NON-NLS-1$
+ private static final String URL = "url"; //$NON-NLS-1$
+
+
+ private Map<String, DownloadRuntime> downloadRuntimes;
+
/**
* The constructor
*/
@@ -226,4 +237,28 @@
return esbDetector;
}
+ public Map<String, DownloadRuntime> getDownloadJBossRuntimes() {
+ if (downloadRuntimes == null) {
+ downloadRuntimes = new HashMap<String, DownloadRuntime>();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(DOWNLOAD_JBOSS_RUNTIMES_EXTENSION_ID);
+ IExtension[] extensions = extensionPoint.getExtensions();
+ for (int i = 0; i < extensions.length; i++) {
+ IExtension extension = extensions[i];
+ IConfigurationElement[] configurationElements = extension
+ .getConfigurationElements();
+ for (int j = 0; j < configurationElements.length; j++) {
+ IConfigurationElement configurationElement = configurationElements[j];
+ String name = configurationElement.getAttribute(NAME);
+ String id = configurationElement.getAttribute(ID);
+ String version = configurationElement.getAttribute(VERSION);
+ String url = configurationElement.getAttribute(URL);
+ DownloadRuntime downloadRuntime = new DownloadRuntime(id, name, version, url);
+ downloadRuntimes.put(id, downloadRuntime);
+ }
+ }
+ }
+ return downloadRuntimes;
+ }
}
Added: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/DownloadRuntime.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/DownloadRuntime.java (rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/DownloadRuntime.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,88 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.core.model;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public class DownloadRuntime {
+ private String name;
+ private String id;
+ private String version;
+ private String url;
+
+ public DownloadRuntime(String id, String name, String version, String url) {
+ super();
+ this.id = id;
+ this.name = name;
+ this.version = version;
+ this.url = url;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public String getVersion() {
+ return version;
+ }
+ public void setVersion(String version) {
+ this.version = version;
+ }
+ public String getUrl() {
+ return url;
+ }
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DownloadRuntime other = (DownloadRuntime) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "DownloadRuntime [name=" + name + ", id=" + id + ", version="
+ + version + ", url=" + url + "]";
+ }
+
+}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/META-INF/MANIFEST.MF 2011-09-19 18:29:43 UTC (rev 34858)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/META-INF/MANIFEST.MF 2011-09-19 19:27:11 UTC (rev 34859)
@@ -7,11 +7,13 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.runtime.core,
- org.eclipse.core.resources
+ org.eclipse.core.resources,
+ org.jboss.tools.project.examples
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %BundleVendor
Export-Package: org.jboss.tools.runtime.ui,
+ org.jboss.tools.runtime.ui.actions,
org.jboss.tools.runtime.ui.dialogs,
org.jboss.tools.runtime.ui.preferences
Added: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/actions/DownloadRuntimeAction.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/actions/DownloadRuntimeAction.java (rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/actions/DownloadRuntimeAction.java 2011-09-19 19:27:11 UTC (rev 34859)
@@ -0,0 +1,171 @@
+package org.jboss.tools.runtime.ui.actions;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.filetransfer.ECFExamplesTransport;
+import org.jboss.tools.runtime.core.JBossRuntimeLocator;
+import org.jboss.tools.runtime.core.RuntimeCoreActivator;
+import org.jboss.tools.runtime.core.model.DownloadRuntime;
+import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.RuntimePath;
+import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.ui.RuntimeUIActivator;
+
+public class DownloadRuntimeAction extends Action {
+
+ private String runtimeId;
+
+ public DownloadRuntimeAction(String runtimeId) {
+ super();
+ setRuntimeId(runtimeId);
+ }
+
+ private void setRuntimeId(String runtimeId) {
+ Assert.isNotNull(runtimeId);
+ this.runtimeId = runtimeId;
+ }
+
+ public DownloadRuntimeAction(String text, ImageDescriptor image, String runtimeId) {
+ super(text, image);
+ setRuntimeId(runtimeId);
+ }
+
+ public DownloadRuntimeAction(String text, int style, String runtimeId) {
+ super(text, style);
+ setRuntimeId(runtimeId);
+ }
+
+ public DownloadRuntimeAction(String text, String runtimeId) {
+ super(text);
+ setRuntimeId(runtimeId);
+ }
+
+ private void downloadRuntime(final DownloadRuntime runtime) {
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ DirectoryDialog dialog = new DirectoryDialog(shell);
+ dialog.setMessage("Select installation directory.");
+ //dialog.setFilterPath("");
+ final String selectedDirectory = dialog.open();
+ if (selectedDirectory != null) {
+ Job job = new Job("Download '" + runtime.getName() + "' ...") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ return downloadAndInstall(runtime, selectedDirectory, monitor);
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ private IStatus downloadAndInstall(DownloadRuntime runtime,
+ String selectedDirectory, IProgressMonitor monitor) {
+ FileInputStream in = null;
+ OutputStream out = null;
+ try {
+ File file = File.createTempFile("JBossRuntime", "tmp");
+ file.deleteOnExit();
+ out = new BufferedOutputStream(
+ new FileOutputStream(file));
+ URL url = new URL(runtime.getUrl());
+ String name = url.getPath();
+ int slashIdx = name.lastIndexOf('/');
+ if (slashIdx >= 0)
+ name = name.substring(slashIdx + 1);
+
+ IStatus result = ECFExamplesTransport.getInstance().download(name,
+ url.toExternalForm(), out, monitor);
+ out.flush();
+ out.close();
+ File directory = new File(selectedDirectory);
+ directory.mkdirs();
+ if (!directory.isDirectory()) {
+ RuntimeCoreActivator.getDefault().getLog().log(result);
+ // FIXME
+ return Status.CANCEL_STATUS;
+ }
+ ProjectExamplesActivator.extractZipFile(file, directory, monitor);
+ if (!result.isOK()) {
+ RuntimeCoreActivator.getDefault().getLog().log(result);
+ // FIXME
+ return Status.CANCEL_STATUS;
+ }
+ createRuntimes(selectedDirectory, monitor);
+ } catch (IOException e) {
+ RuntimeCoreActivator.log(e);
+ // FIXME
+ } finally {
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+ private static void createRuntimes(String directory, IProgressMonitor monitor) {
+ JBossRuntimeLocator locator = new JBossRuntimeLocator();
+ Set<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault()
+ .getRuntimePaths();
+ RuntimePath newPath = new RuntimePath(directory);
+ runtimePaths.add(newPath);
+ for (RuntimePath runtimePath : runtimePaths) {
+ List<ServerDefinition> serverDefinitions = locator
+ .searchForRuntimes(runtimePath.getPath(),
+ monitor);
+ runtimePath.getServerDefinitions().clear();
+ for (ServerDefinition serverDefinition : serverDefinitions) {
+ serverDefinition.setRuntimePath(runtimePath);
+ }
+ runtimePath.getServerDefinitions().addAll(serverDefinitions);
+ }
+ List<ServerDefinition> serverDefinitions = RuntimeUIActivator
+ .getDefault().getServerDefinitions();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator
+ .getRuntimeDetectors();
+ for (IRuntimeDetector detector : detectors) {
+ if (detector.isEnabled()) {
+ detector.initializeRuntimes(serverDefinitions);
+ }
+ }
+ }
+
+ @Override
+ public void run() {
+ Assert.isNotNull(runtimeId);
+ DownloadRuntime runtime = RuntimeCoreActivator.getDefault().getDownloadJBossRuntimes().get(runtimeId);
+ Assert.isNotNull(runtime);
+ downloadRuntime(runtime);
+ }
+
+}
14 years, 6 months