JBoss Tools SVN: r28613 - in trunk/documentation/whatsnew: bpel and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-01-26 09:17:32 -0500 (Wed, 26 Jan 2011)
New Revision: 28613
Modified:
trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html
trunk/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html
trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html
trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.CR1.html
trunk/documentation/whatsnew/jst/jst-news-3.2.0.CR1.html
trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html
trunk/documentation/whatsnew/vpe/vpe-news-3.2.0.CR1.html
Log:
Standardize content and fix typos
Modified: trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -7,9 +7,9 @@
<body>
-<h1>JBoss AS Tools 3.2.0.CR1 - New and Noteworthy</h1>
+<h1>JBoss AS Tools 3.2.0.CR1 What's New</h1>
- <p align="right"><a href="../index.html">< Main Index</a> <a href="../hibernate/hibernate-news-3.4.0.CR1.html">Hibernate Tools ></a></p>
+ <p align="right"><a href="../index.html">< Main Index</a> <a href="../cdi/cdi-news-3.2.0.CR1.html">CDI Tools ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
@@ -31,7 +31,7 @@
looking for in terms of feature completion. The normal server types
and deploy-only servers had more features via the RSE extensions,
and use of RSE is now encouraged for all your remote-system deployment needs.
- <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7412">Related jira</a></small></p>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7412">Related Jira</a></small></p>
</td>
</tr>
</tr>
@@ -48,8 +48,8 @@
<p></p>
Remote stop also did not function properly due to the remote shell exiting before the command was fully processed by the remote server. This also has been fixed.
<p><small>
- <a href="https://jira.jboss.org/jira/browse/JBIDE-7579">Related jira</a>
- <a href="https://jira.jboss.org/jira/browse/JBIDE-7753">Related jira</a>
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-7579">Related Jira</a>
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-7753">Related Jira</a>
</small></p>
</td>
</tr>
@@ -65,7 +65,7 @@
<p></p>
Some issues were not being logged in the Server Log View. If a remote file copy failed, the issue was not logged. If the start and stop of the remote deployment scanner failed, this also was not logged. Both issues should be fixed now.
<p><img src="images/nANDn_3.2.0.cr1.alsoLog.gif"/></p>
- <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7814">Related jira</a></small></p>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7814">Related Jira</a></small></p>
</td>
</tr>
@@ -92,7 +92,7 @@
and then change it to RSE.</p>
<p><img src="images/nANDn.3.2.0.cr1.serverWizardRSEPage.gif"/></p>
<p></p>
- <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-6920">related jira</a></small></p>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7920">Related Jira</a></small></p>
</td>
</tr>
@@ -126,7 +126,7 @@
<p><img src="images/runtimeDetection1.png"/></p>
<p>The user selects runtimes he wants to create and clicks the OK button to create them.</p>
- <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7527">JBIDE-7527</a></small></p>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7527">Related Jira</a></small></p>
</td>
</tr>
<tr>
Modified: trunk/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -26,7 +26,7 @@
The "New ODE Deployment Descriptor" wizard now looks like this:<br /><br />
<img src="images/ODE-Deployment-Descriptor-Wizard.png" style=" width : 500px;" /><br />
- <br />See <a href="https://jira.jboss.org/jira/browse/JBIDE-7334">JBIDE-7334</a> for details.
+ <br /><a href="https://jira.jboss.org/jira/browse/JBIDE-7334">Related Jira</a>
</td>
</tr>
@@ -38,11 +38,11 @@
</tr>
<tr>
<td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Quick-Pick Properties</b></td>
- <td valign="top">The "Quick Pick" and comboboxes in the Properties/Detail tab of some of the activities are now synchronized;
- For example, when a Receive Operation or Partner Link is selected from the comboboxes, the Quick Pick selection is also updated.<br /><br />
+ <td valign="top">The "Quick Pick" and combo boxes in the Properties/Detail tab of some of the activities are now synchronized.
+ For example, when a Receive Operation or Partner Link is selected from the combo boxes, the Quick Pick selection is also updated.<br /><br />
<img src="images/Receive-Properties.png" style=" width : 600px;" /><br />
- <br />See <a href="https://jira.jboss.org/jira/browse/JBIDE-7861">JBIDE-7861</a> for details.
+ <br /><a href="https://jira.jboss.org/jira/browse/JBIDE-7861">Related Jira</a>
</td>
</tr>
@@ -57,7 +57,7 @@
<td valign="top">Counter variables defined in a ForEach activity were not accessible in Assign activities. This has now been fixed.<br /><br />
<img src="images/forEachVariable.png" style=" width : 800px;" /><br />
- <br />See <a href="https://jira.jboss.org/jira/browse/JBIDE-7861">JBIDE-7861</a> for details.
+ <br /><a href="https://jira.jboss.org/jira/browse/JBIDE-8042">Related Jira</a>
</td>
</tr>
@@ -72,10 +72,8 @@
<td valign="top">Several bugs in the Event, Termination, Compensation and Fault Handler windows have been fixed.<br /><br />
<img src="images/Handlers.png" style=" width : 700px;" /><br />
- <br />See
- <a href="https://jira.jboss.org/jira/browse/JBIDE-8044">JBIDE-8044</a> and
- <a href="https://jira.jboss.org/jira/browse/JBIDE-8048">JBIDE-8048</a>
- for more information.
+ <br /><a href="https://jira.jboss.org/jira/browse/JBIDE-8044">Related Jira 1</a>
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-8048">Related Jira 2</a>
</td>
</tr>
Modified: trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -47,9 +47,7 @@
</project>
</xmp>
</p>
- <p><small>
- For more details, see <a href="https://jira.jboss.org/jira/browse/JBIDE-6412">JBIDE-7944</a>
- </small></p>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-6412">Related Jira</a></small></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -29,7 +29,7 @@
<p>Full list parameter value is shown in the text area for named parameters. The values are separated by the "|" symbol.
</p>
<p><img src="images/full_param_list.png"/></p>
- <p><small><a href="https://issues.jboss.org/browse/JBIDE-7771">Related jira</a></small></p>
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-7771">Related Jira</a></small></p>
</td>
</tr>
@@ -47,7 +47,7 @@
<p>Display all properties for Configuration node for Hibernate Console Configuration.
</p>
<p><img src="images/properties_for_configuration.png"/></p>
- <p><small><a href="https://issues.jboss.org/browse/JBIDE-7990">Related jira</a></small></p>
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-7990">Related Jira</a></small></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/jst/jst-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/jst/jst-news-3.2.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/jst/jst-news-3.2.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -43,10 +43,10 @@
<p><b>'Insert Tag' wizard</b></p>
</td>
<td valign="top">
- <p>Wizard 'Insert Tag' opened on drop from Palette now shows most used attributes on a special tab to seporate them from all the available attributes.</p>
+ <p>Wizard 'Insert Tag' opened on drop from Palette now shows most used attributes on a special tab to separate them from all the available attributes.</p>
<img src="images/3.2.0.CR1/insert_tag.png"/>
<p><small><a
- href="https://jira.jboss.org/browse/JBIDE-7830">Related Jira 1</a></small></p>
+ href="https://jira.jboss.org/browse/JBIDE-7830">Related Jira</a></small></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -9,7 +9,7 @@
<title>What's New in Maven Tools</title>
</head>
<body>
-<h1>Maven Tools</h1>
+<h1>Maven Tools 3.2.0.CR1 What's New</h1>
<p align="right"><a href="../index.html">< Main Index</a> <a
href="../examples/examples-news-3.2.0.CR1.html">Project Examples ></a></p>
@@ -25,8 +25,7 @@
<td valign="top" align="left"><a name="itemname1" id="itemname1"></a><b>JBoss CDI Maven Configurator</b></td>
<td valign="top">
<p>Now the CDI Maven configurator adds CDI support for non-wtp projects that have the "javax.enterprise:cdi-api" dependency.
- <p><small>
- See <a href="https://jira.jboss.org/jira/browse/JBIDE-6412">JBIDE-7944</a>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-6412">Related Jira</a>
</small></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/vpe/vpe-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.2.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.2.0.CR1.html 2011-01-26 14:17:32 UTC (rev 28613)
@@ -22,9 +22,9 @@
</td>
</tr>
<tr>
- <td valign="top" align="left"><b>Side by side two-paned editor</b></td>
+ <td valign="top" align="left"><b>Side by Side two-paned editor</b></td>
<td valign="top">
- <p>Side by Side New editor command has been added to all eclipse editors.</p>
+ <p>New Editor (Side by Side) command has been added to all Eclipse editors.</p>
<p><img src="images/3.2.0.CR1/new-window-side-by-side.png"
alt="New Editor Command Side By Side To Existing One" /></p>
<p><img src="images/3.2.0.CR1/side-by-side.png"
13 years, 5 months
JBoss Tools SVN: r28612 - trunk/documentation/whatsnew/gwt.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-01-26 08:11:03 -0500 (Wed, 26 Jan 2011)
New Revision: 28612
Modified:
trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html
Log:
JBIDE-8156 added missing 'not'
Modified: trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html 2011-01-26 12:28:56 UTC (rev 28611)
+++ trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html 2011-01-26 13:11:03 UTC (rev 28612)
@@ -24,7 +24,7 @@
<tr>
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>JDK 1.6 supported</b></td>
<td valign="top">
- <p>GWT Integration had a bug where it was possible to use it with JDK 1.6. We fixed this for CR1.</p>
+ <p>GWT Integration had a bug where it was possible to not use it with JDK 1.6. We fixed this for CR1.</p>
<p><small><a href="https://issues.jboss.org/browse/JBIDE-8004">Related Jira</a></small></p>
</td>
</tr>
13 years, 5 months
JBoss Tools SVN: r28611 - in trunk/documentation/whatsnew: gwt and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-01-26 07:28:56 -0500 (Wed, 26 Jan 2011)
New Revision: 28611
Modified:
trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html
trunk/documentation/whatsnew/index.html
trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html
Log:
JBIDE-8156 bulk N&N updates
Modified: trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
+++ trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html 2011-01-26 12:28:56 UTC (rev 28611)
@@ -12,7 +12,7 @@
<h1>GWT Integration 1.0.0.CR1 What's New</h1>
<p align="right"><a href="../index.html">< Main Index</a> <a
-href="../examples/examples-news-3.2.0.CR1.html">Project Examples ></a></p>
+href="../maven/maven-news-3.2.0.CR1.html">Maven Tools ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
@@ -27,7 +27,7 @@
<p>GWT Integration had a bug where it was possible to use it with JDK 1.6. We fixed this for CR1.</p>
<p><small><a href="https://issues.jboss.org/browse/JBIDE-8004">Related Jira</a></small></p>
</td>
- </tr>
+ </tr>
</table>
</body>
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2011-01-26 11:58:43 UTC (rev 28610)
+++ trunk/documentation/whatsnew/index.html 2011-01-26 12:28:56 UTC (rev 28611)
@@ -33,7 +33,10 @@
<p><a href="teiid/teiid-news-7.1.0.CR1.html">Teiid Tools</a></p>
<p><a href="deltacloud/deltacloud-news-0.0.1.CR1.html">Delta Cloud Tools</a></p>
<p><a href="gwt/gwt-news-1.0.0.CR1.html">GWT Integration</a></p>
- <p><a href="examples/examples-news-3.2.0.CR1.html">Project Examples</a></p>
+ <p><a href="examples/examples-news-3.2.0.CR1.html">Project
+ Examples</a></p>
+
+ <p><a href="maven/maven-news-3.2.0.CR1.html">Maven Tools</a></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
+++ trunk/documentation/whatsnew/maven/maven-news-3.2.0.CR1.html 2011-01-26 12:28:56 UTC (rev 28611)
@@ -12,7 +12,7 @@
<h1>Maven Tools</h1>
<p align="right"><a href="../index.html">< Main Index</a> <a
- href="../drools/drools-news-5.1.0.Beta2.html">Drools Tools ></a></p>
+href="../examples/examples-news-3.2.0.CR1.html">Project Examples ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
13 years, 5 months
JBoss Tools SVN: r28610 - in trunk/documentation/whatsnew: as and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-01-26 06:58:43 -0500 (Wed, 26 Jan 2011)
New Revision: 28610
Modified:
trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html
trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR1.html
trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR2.html
trunk/documentation/whatsnew/esb/esb-news-1.4.0.Beta2.html
trunk/documentation/whatsnew/esb/esb-news-1.4.0.M2.html
trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html
trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html
trunk/documentation/whatsnew/index.html
trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html
Log:
JBIDE-8156 bulk N&N updates
Modified: trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/as/as-news-3.2.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -34,7 +34,11 @@
<p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-7412">Related jira</a></small></p>
</td>
</tr>
+ </tr>
+ <tr><td colspan="2"><hr /></td></tr>
+
<tr>
+ <tr>
<td valign="top" align="left">
<p align="right">
<b>Remote Launch / Remote Stop fixed</b></td>
@@ -49,7 +53,11 @@
</small></p>
</td>
</tr>
+ </tr>
+ <tr><td colspan="2"><hr /></td></tr>
+
<tr>
+ <tr>
<td valign="top" align="left">
<p align="right">
<b>Logging changes</b></td>
Modified: trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR1.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -1,4 +1,3 @@
- <p><a href="smooks/smooks-news-1.1.0.CR1.html">Smooks Tools</a></p> <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Modified: trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR2.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR2.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/esb/esb-news-1.3.0.CR2.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -1,4 +1,3 @@
- <p><a href="smooks/smooks-news-1.1.0.CR1.html">Smooks Tools</a></p> <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Modified: trunk/documentation/whatsnew/esb/esb-news-1.4.0.Beta2.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.4.0.Beta2.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/esb/esb-news-1.4.0.Beta2.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -11,7 +11,7 @@
<body>
<h1>ESB tools 1.4.0.Beta2 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../modeshape/modeshape-news-7.1.0.Beta2.html">Modeshape Tools ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../modeshape/modeshape-news-3.2.0.Beta2.html">Modeshape Tools ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
Modified: trunk/documentation/whatsnew/esb/esb-news-1.4.0.M2.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.4.0.M2.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/esb/esb-news-1.4.0.M2.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -1,4 +1,3 @@
- <p><a href="smooks/smooks-news-1.1.0.CR1.html">Smooks Tools</a></p> <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Modified: trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/examples/examples-news-3.2.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -11,7 +11,7 @@
<body>
<h1>Examples 3.2.0.CR1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../hibernate/hibernate-news-3.4.0.CR1.html">Hibernate Tools ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
Modified: trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/gwt/gwt-news-1.0.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -12,7 +12,7 @@
<h1>GWT Integration 1.0.0.CR1 What's New</h1>
<p align="right"><a href="../index.html">< Main Index</a> <a
-href="../drools/guvnor-tools-news-5.1.0.CR1.html">Guvnor Tools ></a></p>
+href="../examples/examples-news-3.2.0.CR1.html">Project Examples ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/index.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -24,13 +24,16 @@
<td valign="top" align="left">
<p align="right"><b>3.2.0.CR1</b>
<td valign="top">
+ <p><a href="as/as-news-3.2.0.CR1.html">JBoss AS Server Tools</a></p>
<p><a href="cdi/cdi-news-3.2.0.CR1.html">CDI (JSR-299) Tools</a></p>
<p><a href="hibernate/hibernate-news-3.4.0.CR1.html">Hibernate Tools</a></p>
<p><a href="jst/jst-news-3.2.0.CR1.html">JST/JSF Tools</a></p>
<p><a href="vpe/vpe-news-3.2.0.CR1.html">Visual Page Editor</a></p>
- <p><a href="bpel/bpel-news-1.1.0.CR1.html">BPEL Tools</a></p>
- <p><a href="teiid/teiid-news-7.1.0.CR1.html">Teiid Tools</a></p>
-
+ <p><a href="bpel/bpel-news-1.1.0.CR1.html">BPEL Tools</a></p>
+ <p><a href="teiid/teiid-news-7.1.0.CR1.html">Teiid Tools</a></p>
+ <p><a href="deltacloud/deltacloud-news-0.0.1.CR1.html">Delta Cloud Tools</a></p>
+ <p><a href="gwt/gwt-news-1.0.0.CR1.html">GWT Integration</a></p>
+ <p><a href="examples/examples-news-3.2.0.CR1.html">Project Examples</a></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html 2011-01-26 08:54:13 UTC (rev 28609)
+++ trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html 2011-01-26 11:58:43 UTC (rev 28610)
@@ -9,7 +9,9 @@
</head>
<body>
<h1>Teiid Designer 7.1.0 CR1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a
+href="../deltacloud/deltacloud-news-0.0.1.CR1.html">Delta Cloud Tools ></a></p>
+
<p>Last revised January 20, 2010</p>
<p><b>Teiid Designer</b> is a graphical data modeling tool that enables
rapid definition, integration, management and testing of data services
13 years, 5 months
JBoss Tools SVN: r28609 - trunk/documentation/whatsnew/bpel.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-01-26 03:54:13 -0500 (Wed, 26 Jan 2011)
New Revision: 28609
Removed:
trunk/documentation/whatsnew/bpel/.project
Log:
don't add .project files midtree so imports doesn't work nice
Deleted: trunk/documentation/whatsnew/bpel/.project
===================================================================
--- trunk/documentation/whatsnew/bpel/.project 2011-01-26 05:47:39 UTC (rev 28608)
+++ trunk/documentation/whatsnew/bpel/.project 2011-01-26 08:54:13 UTC (rev 28609)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>bpel.new_and_noteworthy</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
13 years, 5 months
JBoss Tools SVN: r28608 - trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-01-26 00:47:39 -0500 (Wed, 26 Jan 2011)
New Revision: 28608
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java
Log:
JBIDE-8046: modify for the ws test failed
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java 2011-01-26 01:49:39 UTC (rev 28607)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java 2011-01-26 05:47:39 UTC (rev 28608)
@@ -78,7 +78,7 @@
startup(currentServer);
publishWebProject(fproject.getProject());
- JobUtils.delay(30000);
+ JobUtils.delay(60000);
String webServiceUrl = "http://localhost:8080/JavaFirstTestProject/HelloWorld?wsdl";
URL url = new URL(webServiceUrl);
URLConnection conn = url.openConnection();
13 years, 5 months
JBoss Tools SVN: r28607 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views/cloud/cnf and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-25 20:49:39 -0500 (Tue, 25 Jan 2011)
New Revision: 28607
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersActionProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersContentProvider.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java
Log:
JBIDE-8224 - initial commit for CNF based CloudView
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-26 00:04:15 UTC (rev 28606)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-26 01:49:39 UTC (rev 28607)
@@ -875,6 +875,28 @@
</instanceof>
</or></possibleChildren>
</navigatorContent>
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="org.jboss.tools.deltacloud.ui.views.cloud.cnf.FiltersContentProvider"
+ icon="icons/sample.gif"
+ id="org.jboss.tools.deltacloud.ui.filtersContentRoot"
+ labelProvider="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudLabelProvider"
+ name="Filters"
+ priority="high">
+ <triggerPoints>
+ <or>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </or></possibleChildren>
+ </navigatorContent>
<actionProvider
class="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudViewActionProvider"
id="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudViewActionProvider"
@@ -887,6 +909,18 @@
</or>
</enablement>
</actionProvider>
+ <actionProvider
+ class="org.jboss.tools.deltacloud.ui.views.cloud.cnf.FiltersActionProvider"
+ id="org.jboss.tools.deltacloud.ui.views.cloud.cnf.FiltersActionProvider"
+ priority="higher">
+ <enablement>
+ <or>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </or>
+ </enablement>
+ </actionProvider>
</extension>
<extension
point="org.eclipse.ui.navigator.viewer">
@@ -900,6 +934,10 @@
isRoot="true"
pattern="org.jboss.tools.deltacloud.ui.cloudContentRoot">
</contentExtension>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.tools.deltacloud.ui.filtersContentRoot">
+ </contentExtension>
</includes>
</viewerContentBinding>
<viewerActionBinding
@@ -908,6 +946,9 @@
<actionExtension
pattern="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudViewActionProvider">
</actionExtension>
+ <actionExtension
+ pattern="org.jboss.tools.deltacloud.ui.views.cloud.cnf.FiltersActionProvider">
+ </actionExtension>
</includes>
</viewerActionBinding>
</extension>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-01-26 00:04:15 UTC (rev 28606)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-01-26 01:49:39 UTC (rev 28607)
@@ -49,17 +49,12 @@
return clouds;
}
- public abstract static class CategoryContent implements IAdaptable{
- protected String name;
- protected DeltaCloud cloud;
- public CategoryContent(String name, DeltaCloud cloud) {
- this.name = name;
- this.cloud = cloud;
+ public abstract static class CloudAdaptable implements IAdaptable {
+ private DeltaCloud cloud;
+ public CloudAdaptable(DeltaCloud dc) {
+ this.cloud = dc;
}
public DeltaCloud getCloud(){ return cloud; }
- public String getName(){ return name;}
- public abstract Job getFetchChildrenJob(TreeViewer viewer);
- public abstract Object[] getChildren() throws Exception ;
public Object getAdapter(Class adapter) {
if( adapter == DeltaCloud.class )
return cloud;
@@ -67,15 +62,26 @@
}
}
+ public abstract static class CategoryContent extends CloudAdaptable {
+ protected String name;
+ public CategoryContent(String name, DeltaCloud cloud) {
+ super(cloud);
+ this.name = name;
+ }
+ public String getName(){ return name;}
+ public abstract Job getFetchChildrenJob(TreeViewer viewer);
+ public abstract Object[] getChildren() throws Exception ;
+ }
+
public static class InstancesCategory extends CategoryContent {
public InstancesCategory(String name, DeltaCloud cloud) {
super(name, cloud);
}
public Job getFetchChildrenJob(TreeViewer viewer) {
- return new LoadCloudInstancesJob(cloud,refreshParentRunnable(viewer, this) );
+ return new LoadCloudInstancesJob(getCloud(),refreshParentRunnable(viewer, this) );
}
public Object[] getChildren() throws Exception {
- return cloud.instancesLoaded() ? cloud.getInstances() : null;
+ return getCloud().instancesLoaded() ? getCloud().getInstances() : null;
}
}
@@ -84,19 +90,19 @@
super(name, cloud);
}
public Job getFetchChildrenJob(TreeViewer viewer) {
- return new LoadCloudImagesJob(cloud,refreshParentRunnable(viewer, this) );
+ return new LoadCloudImagesJob(getCloud(),refreshParentRunnable(viewer, this) );
}
public Object[] getChildren() throws Exception {
- if( !cloud.imagesLoaded() )
+ if( !getCloud().imagesLoaded() )
return null;
- DeltaCloudImage[] images = cloud.getImages();
+ DeltaCloudImage[] images = getCloud().getImages();
int numPages = images.length / ImagesPager.PER_PAGE;
if( images.length != 0 &&
images.length % ImagesPager.PER_PAGE != 0)
numPages++;
ImagesPager[] pages = new ImagesPager[numPages];
for( int i = 0; i < numPages; i++ ) {
- pages[i] = new ImagesPager(cloud, i);
+ pages[i] = new ImagesPager(getCloud(), i);
}
return pages;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java 2011-01-26 00:04:15 UTC (rev 28606)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java 2011-01-26 01:49:39 UTC (rev 28607)
@@ -10,13 +10,18 @@
******************************************************************************/
package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.navigator.CommonNavigator;
import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.core.IDeltaCloudManagerListener;
-public class CloudNavigator extends CommonNavigator implements IDeltaCloudManagerListener {
+public class CloudNavigator extends CommonNavigator implements IDeltaCloudManagerListener, PropertyChangeListener {
protected Object getInitialInput() {
return this;
}
@@ -24,13 +29,56 @@
super.createPartControl(aParent);
getCommonViewer().setSorter(null);
DeltaCloudManager.getDefault().addCloudManagerListener(this);
+ try {
+ DeltaCloud[] currentClouds = DeltaCloudManager.getDefault().getClouds();
+ for( int i = 0; i < currentClouds.length; i++ ) {
+ currentClouds[i].addPropertyChangeListener(DeltaCloud.PROP_NAME, this);
+ currentClouds[i].addPropertyChangeListener(DeltaCloud.PROP_IMAGES, this);
+ currentClouds[i].addPropertyChangeListener(DeltaCloud.PROP_INSTANCES, this);
+ }
+ } catch( DeltaCloudException dce ) { /* ignore */ }
}
public void cloudsChanged(int type, DeltaCloud cloud) {
+ // This is super ugly
+ if( type == IDeltaCloudManagerListener.ADD_EVENT) {
+ cloud.addPropertyChangeListener(DeltaCloud.PROP_NAME, this);
+ cloud.addPropertyChangeListener(DeltaCloud.PROP_IMAGES, this);
+ cloud.addPropertyChangeListener(DeltaCloud.PROP_INSTANCES, this);
+ }
+ else if( type == IDeltaCloudManagerListener.REMOVE_EVENT) {
+ cloud.removePropertyChangeListener(DeltaCloud.PROP_NAME, this);
+ cloud.removePropertyChangeListener(DeltaCloud.PROP_IMAGES, this);
+ cloud.removePropertyChangeListener(DeltaCloud.PROP_INSTANCES, this);
+ }
if( getCommonViewer() != null && !getCommonViewer().getTree().isDisposed())
- getCommonViewer().refresh();
+ asyncRefresh(null);
}
+
+ private void asyncRefresh(final Object o) {
+ Display.getDefault().asyncExec(new Runnable(){
+ public void run() {
+ if( o == null )
+ getCommonViewer().refresh();
+ else
+ getCommonViewer().refresh(o);
+ }
+ });
+ }
+
public void dispose() {
super.dispose();
DeltaCloudManager.getDefault().removeCloudManagerListener(this);
+ try {
+ DeltaCloud[] currentClouds = DeltaCloudManager.getDefault().getClouds();
+ for( int i = 0; i < currentClouds.length; i++ ) {
+ currentClouds[i].removePropertyChangeListener(DeltaCloud.PROP_NAME, this);
+ currentClouds[i].removePropertyChangeListener(DeltaCloud.PROP_IMAGES, this);
+ currentClouds[i].removePropertyChangeListener(DeltaCloud.PROP_INSTANCES, this);
+ }
+ } catch( DeltaCloudException dce ) { /* ignore */ }
}
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ asyncRefresh(evt.getSource());
+ }
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersActionProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersActionProvider.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersActionProvider.java 2011-01-26 01:49:39 UTC (rev 28607)
@@ -0,0 +1,11 @@
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import org.eclipse.ui.navigator.CommonActionProvider;
+
+public class FiltersActionProvider extends CommonActionProvider {
+
+ public FiltersActionProvider() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersContentProvider.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/FiltersContentProvider.java 2011-01-26 01:49:39 UTC (rev 28607)
@@ -0,0 +1,74 @@
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import java.util.Collection;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.IImageFilter;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.CloudAdaptable;
+
+public class FiltersContentProvider implements ITreeContentProvider {
+
+ @Override
+ public void dispose() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public class CloudFilterPair extends CloudAdaptable {
+ private IImageFilter filter;
+ public CloudFilterPair(DeltaCloud cloud, IImageFilter filter) {
+ super(cloud);
+ this.filter = filter;
+ }
+ public String toString() {
+ return "Filter: " + filter.toString();
+ }
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if( parentElement instanceof DeltaCloud ) {
+ IImageFilter filter = ((DeltaCloud)parentElement).getImageFilter();
+ if( filter != null ) {
+ CloudFilterPair cfp = new CloudFilterPair(((DeltaCloud)parentElement), filter);
+ return new Object[]{ cfp };
+ }
+ }
+ if( parentElement instanceof CloudFilterPair ) {
+ try {
+ CloudFilterPair cfp = (CloudFilterPair)parentElement;
+ Collection<DeltaCloudImage> filteredImages = cfp.filter.filter(cfp.getCloud().getImages());
+ return filteredImages.toArray(new DeltaCloudImage[filteredImages.size()]);
+ } catch(DeltaCloudException dce) { /* ignore */ }
+ }
+ return new Object[]{};
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
13 years, 5 months
JBoss Tools SVN: r28606 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-25 19:04:15 -0500 (Tue, 25 Jan 2011)
New Revision: 28606
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/ClouldSorter1.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudInstanceDialog.java
Log:
JBIDE-8224 - initial commit for CNF based CloudView
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-01-26 00:03:09 UTC (rev 28605)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-01-26 00:04:15 UTC (rev 28606)
@@ -21,7 +21,8 @@
org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)",
org.eclipse.equinox.security;bundle-version="[1.0.100,2.0.0)",
org.eclipse.equinox.security.ui;bundle-version="1.0.200",
- org.eclipse.jsch.core;bundle-version="1.1.200"
+ org.eclipse.jsch.core;bundle-version="1.1.200",
+ org.eclipse.ui.navigator;bundle-version="3.5.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.deltacloud.ui,
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-26 00:03:09 UTC (rev 28605)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-26 00:04:15 UTC (rev 28606)
@@ -16,7 +16,15 @@
id="org.jboss.tools.deltacloud.ui.views.CloudView">
</view>
<view
+ name="CloudViewerName2"
+ icon="icons/delta.gif"
category="org.jboss.tools.deltacloud.ui"
+ class="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudNavigator"
+ id="org.jboss.tools.deltacloud.ui.views.CloudView2">
+ </view>
+
+ <view
+ category="org.jboss.tools.deltacloud.ui"
class="org.jboss.tools.deltacloud.ui.views.cloudelements.InstanceView"
icon="icons/delta.gif"
id="org.jboss.tools.deltacloud.ui.views.InstanceView"
@@ -843,5 +851,65 @@
</adapter>
</factory>
</extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider"
+ icon="icons/delta.gif"
+ id="org.jboss.tools.deltacloud.ui.cloudContentRoot"
+ labelProvider="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudLabelProvider"
+ name="DeltaClouds"
+ priority="higher">
+ <triggerPoints>
+ <or>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </or></possibleChildren>
+ </navigatorContent>
+ <actionProvider
+ class="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudViewActionProvider"
+ id="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudViewActionProvider"
+ priority="higher">
+ <enablement>
+ <or>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </or>
+ </enablement>
+ </actionProvider>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewer
+ viewerId="org.jboss.tools.deltacloud.ui.views.CloudView2">
+ </viewer>
+ <viewerContentBinding
+ viewerId="org.jboss.tools.deltacloud.ui.views.CloudView2">
+ <includes>
+ <contentExtension
+ isRoot="true"
+ pattern="org.jboss.tools.deltacloud.ui.cloudContentRoot">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding
+ viewerId="org.jboss.tools.deltacloud.ui.views.CloudView2">
+ <includes>
+ <actionExtension
+ pattern="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudViewActionProvider">
+ </actionExtension>
+ </includes>
+ </viewerActionBinding>
+ </extension>
</plugin>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java 2011-01-26 00:03:09 UTC (rev 28605)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -35,20 +35,25 @@
private static final String NAME_PREFIX= Activator.PLUGIN_ID + '.';
private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
public static final String IMG_CLOUD= NAME_PREFIX + "cloud.gif"; //$NON-NLS-1$
- public static final String IMG_FOLDER= NAME_PREFIX + "folder.gif"; //$NON-NLS-1$
- public static final String IMG_INSTANCE= NAME_PREFIX + "instance.gif"; //$NON-NLS-1$
- public static final String IMG_IMAGE= NAME_PREFIX + "image.gif"; //$NON-NLS-1$
public static final String IMG_COLLAPSE_ALL= NAME_PREFIX + "collapseall.gif"; //$NON-NLS-1$
public static final String IMG_DELTA= NAME_PREFIX + "delta.gif"; //$NON-NLS-1$
public static final String IMG_DELTA_LARGE= NAME_PREFIX + "delta-large.gif"; //$NON-NLS-1$
+ public static final String IMG_DESTROY = NAME_PREFIX + "destroy.gif"; //$NON-NLS-1$
+ public static final String IMG_DESTROY_D = NAME_PREFIX + "destroyd.gif"; //$NON-NLS-1$
+ public static final String IMG_FOLDER= NAME_PREFIX + "folder.gif"; //$NON-NLS-1$
+ public static final String IMG_IMAGE= NAME_PREFIX + "image.gif"; //$NON-NLS-1$
+ public static final String IMG_INSTANCE= NAME_PREFIX + "instance.gif"; //$NON-NLS-1$
+ public static final String IMG_NEW_DELTA= NAME_PREFIX + "newdelta.gif"; //$NON-NLS-1$
+ public static final String IMG_REBOOT = NAME_PREFIX + "reboot.gif"; //$NON-NLS-1$
+ public static final String IMG_REBOOTD = NAME_PREFIX + "rebootd.gif"; //$NON-NLS-1$
public static final String IMG_START= NAME_PREFIX + "run.gif"; //$NON-NLS-1$
public static final String IMG_STARTD = NAME_PREFIX + "rund.gif"; //$NON-NLS-1$
+ public static final String IMG_RUNNING= NAME_PREFIX + "running.gif"; //$NON-NLS-1$
public static final String IMG_STOP = NAME_PREFIX + "stop.gif"; //$NON-NLS-1$
public static final String IMG_STOPD = NAME_PREFIX + "stopd.gif"; //$NON-NLS-1$
public static final String IMG_STOPPED = NAME_PREFIX + "stopped.gif"; //$NON-NLS-1$
- public static final String IMG_REBOOT = NAME_PREFIX + "reboot.gif"; //$NON-NLS-1$
- public static final String IMG_REBOOTD = NAME_PREFIX + "rebootd.gif"; //$NON-NLS-1$
- public static final String IMG_RUNNING= NAME_PREFIX + "running.gif"; //$NON-NLS-1$
+ public static final String SYSTEM_VIEW = NAME_PREFIX + "system_view.gif"; //$NON-NLS-1$
+ public static final String SYSTEM_VIEWD = NAME_PREFIX + "system_viewd.gif"; //$NON-NLS-1$
public static final ImageDescriptor DESC_CLOUD= createManaged("", IMG_CLOUD);
public static final ImageDescriptor DESC_FOLDER= createManaged("", IMG_FOLDER);
public static final ImageDescriptor DESC_INSTANCE= createManaged("", IMG_INSTANCE);
@@ -56,6 +61,9 @@
public static final ImageDescriptor DESC_COLLAPSE_ALL= createManaged("", IMG_COLLAPSE_ALL);
public static final ImageDescriptor DESC_DELTA= createManaged("", IMG_DELTA);
public static final ImageDescriptor DESC_DELTA_LARGE= createManaged("", IMG_DELTA_LARGE);
+ public static final ImageDescriptor DESC_NEW_DELTA= createManaged("", IMG_NEW_DELTA);
+ public static final ImageDescriptor DESC_DESTROY = createManaged("", IMG_DESTROY);
+ public static final ImageDescriptor DESC_DESTROYD= createManaged("", IMG_DESTROY_D);
public static final ImageDescriptor DESC_START= createManaged("", IMG_START);
public static final ImageDescriptor DESC_STARTD= createManaged("", IMG_STARTD);
public static final ImageDescriptor DESC_RUNNING= createManaged("", IMG_RUNNING);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudInstanceDialog.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudInstanceDialog.java 2011-01-26 00:03:09 UTC (rev 28605)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudInstanceDialog.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.deltacloud.ui.commands;
+import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -45,4 +46,13 @@
, message);
setTitle(title);
}
+
+ public DeltaCloudInstance[] getResult2() {
+ ArrayList<DeltaCloudInstance> result = new ArrayList<DeltaCloudInstance>();
+ Object[] supArr = super.getResult();
+ for( int i = 0; i < supArr.length; i++ ) {
+ result.add((DeltaCloudInstance)supArr[i]);
+ }
+ return result.toArray(new DeltaCloudInstance[result.size()]);
+ }
}
\ No newline at end of file
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.job.LoadCloudImagesJob;
+import org.jboss.tools.deltacloud.core.job.LoadCloudInstancesJob;
+import org.jboss.tools.deltacloud.ui.Activator;
+
+public class CloudContentProvider implements ITreeContentProvider {
+ private TreeViewer viewer;
+ public CloudContentProvider() {
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.viewer = (TreeViewer)viewer;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ DeltaCloudManager m = DeltaCloudManager.getDefault();
+ DeltaCloud[] clouds = new DeltaCloud[]{};
+ try {
+ clouds = m.getClouds();
+ } catch( DeltaCloudException dce) {}
+ return clouds;
+ }
+
+ public abstract static class CategoryContent implements IAdaptable{
+ protected String name;
+ protected DeltaCloud cloud;
+ public CategoryContent(String name, DeltaCloud cloud) {
+ this.name = name;
+ this.cloud = cloud;
+ }
+ public DeltaCloud getCloud(){ return cloud; }
+ public String getName(){ return name;}
+ public abstract Job getFetchChildrenJob(TreeViewer viewer);
+ public abstract Object[] getChildren() throws Exception ;
+ public Object getAdapter(Class adapter) {
+ if( adapter == DeltaCloud.class )
+ return cloud;
+ return null;
+ }
+ }
+
+ public static class InstancesCategory extends CategoryContent {
+ public InstancesCategory(String name, DeltaCloud cloud) {
+ super(name, cloud);
+ }
+ public Job getFetchChildrenJob(TreeViewer viewer) {
+ return new LoadCloudInstancesJob(cloud,refreshParentRunnable(viewer, this) );
+ }
+ public Object[] getChildren() throws Exception {
+ return cloud.instancesLoaded() ? cloud.getInstances() : null;
+ }
+ }
+
+ public static class ImagesCategory extends CategoryContent {
+ public ImagesCategory(String name, DeltaCloud cloud) {
+ super(name, cloud);
+ }
+ public Job getFetchChildrenJob(TreeViewer viewer) {
+ return new LoadCloudImagesJob(cloud,refreshParentRunnable(viewer, this) );
+ }
+ public Object[] getChildren() throws Exception {
+ if( !cloud.imagesLoaded() )
+ return null;
+ DeltaCloudImage[] images = cloud.getImages();
+ int numPages = images.length / ImagesPager.PER_PAGE;
+ if( images.length != 0 &&
+ images.length % ImagesPager.PER_PAGE != 0)
+ numPages++;
+ ImagesPager[] pages = new ImagesPager[numPages];
+ for( int i = 0; i < numPages; i++ ) {
+ pages[i] = new ImagesPager(cloud, i);
+ }
+ return pages;
+ }
+ }
+
+ public static class ImagesPager {
+ public static final int PER_PAGE = 50;
+ private DeltaCloud cloud;
+ private int page;
+ private int start, end;
+ private ArrayList<DeltaCloudImage> myImages = null;
+ public ImagesPager(DeltaCloud cloud, int page) {
+ this.cloud = cloud;
+ this.page = page;
+ try {
+ DeltaCloudImage[] images = cloud.getImages();
+ start = page * PER_PAGE;
+ end = ((page+1) * PER_PAGE);
+ end = end > images.length ? images.length : end;
+ } catch(DeltaCloudException dce){}
+ }
+ public Object[] getChildren() throws Exception {
+ if( myImages == null ) {
+ DeltaCloudImage[] images = cloud.getImages();
+ myImages = new ArrayList<DeltaCloudImage>();
+ for( int i = start; i < end; i++) {
+ myImages.add(images[i]);
+ }
+ }
+ return (DeltaCloudImage[]) myImages.toArray(new DeltaCloudImage[myImages.size()]);
+ }
+ public int getPage() { return page; }
+ public String toString() {
+ return start + "..." + end;
+ }
+ }
+
+ public static class DelayObject {
+ public Object parent;
+ public DelayObject(Object parent) {
+ this.parent = parent;
+ }
+ }
+
+ private static Runnable refreshParentRunnable(final TreeViewer v, final Object parent) {
+ return new Runnable() {
+ public void run() {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ v.refresh(parent);
+ }
+ });
+ }
+ };
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ try {
+ if( parentElement instanceof DeltaCloud) {
+ return new CategoryContent[] {
+ new InstancesCategory("Instances", (DeltaCloud)parentElement),
+ new ImagesCategory("Images", (DeltaCloud)parentElement)
+ };
+ }
+
+ if( parentElement instanceof CategoryContent ) {
+ CategoryContent cc = (CategoryContent)parentElement;
+ Object[] vals = cc.getChildren();
+ if( vals == null ) {
+ Job j = cc.getFetchChildrenJob(viewer);
+ j.schedule();
+ return new Object[]{new DelayObject(this)};
+ }
+ return vals;
+ }
+
+ if( parentElement instanceof ImagesPager ) {
+ return ((ImagesPager)parentElement).getChildren();
+ }
+ } catch( Exception e ) {
+ // log? show? idk
+ Activator.getDefault().getLog().log(new Status(
+ IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
+ }
+ return new Object[]{};
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+ public boolean hasChildren(Object element) {
+ if( element instanceof DelayObject )
+ return false;
+ return true;
+ }
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+import org.jboss.tools.deltacloud.ui.views.cloud.ImageItem;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.CategoryContent;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.DelayObject;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.ImagesPager;
+
+public class CloudLabelProvider extends LabelProvider {
+ public Image getImage(Object element) {
+ if (element instanceof DeltaCloud) {
+ return SWTImagesFactory.get(SWTImagesFactory.IMG_CLOUD);
+ } else if (element instanceof CategoryContent ) {
+ return SWTImagesFactory.get(SWTImagesFactory.IMG_FOLDER);
+ } else if (element instanceof DeltaCloudInstance) {
+ return SWTImagesFactory.get(SWTImagesFactory.IMG_INSTANCE);
+ } else if (element instanceof DeltaCloudImage) {
+ return SWTImagesFactory.get(SWTImagesFactory.IMG_IMAGE);
+ } else if (element instanceof ImagesPager ) {
+ return SWTImagesFactory.get(SWTImagesFactory.IMG_FOLDER);
+ }
+ return null;
+ }
+
+ public String getText(Object element) {
+ if( element instanceof DelayObject )
+ return "Loading...";
+
+ if( element instanceof DeltaCloud)
+ return ((DeltaCloud)element).getName();
+
+ if( element instanceof CategoryContent)
+ return ((CategoryContent)element).getName();
+
+ if( element instanceof DeltaCloudImage)
+ return getImageText((DeltaCloudImage)element);
+
+ if( element instanceof DeltaCloudInstance)
+ return getInstanceText((DeltaCloudInstance)element);
+
+ return (element == null ? "" : element.toString());//$NON-NLS-1$
+ }
+
+ private String getInstanceText(DeltaCloudInstance instance) {
+ String result = instance.getAlias() != null
+ ? instance.getAlias()
+ : instance.getName() != null
+ ? instance.getName()
+ : "";
+
+ if (instance.getId() != null)
+ result += " [" + instance.getId() + "]";
+
+ return result.trim();
+ }
+
+ private String getImageText(DeltaCloudImage image) {
+ StringBuilder builder = new StringBuilder();
+ if (image.getName() != null)
+ builder.append(image.getName()).append(' ');
+ if (image.getId() != null)
+ builder.append('[').append(image.getId()).append(']');
+ return builder.toString();
+ }
+
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudNavigator.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.IDeltaCloudManagerListener;
+
+public class CloudNavigator extends CommonNavigator implements IDeltaCloudManagerListener {
+ protected Object getInitialInput() {
+ return this;
+ }
+ public void createPartControl(Composite aParent) {
+ super.createPartControl(aParent);
+ getCommonViewer().setSorter(null);
+ DeltaCloudManager.getDefault().addCloudManagerListener(this);
+ }
+ public void cloudsChanged(int type, DeltaCloud cloud) {
+ if( getCommonViewer() != null && !getCommonViewer().getTree().isDisposed())
+ getCommonViewer().refresh();
+ }
+ public void dispose() {
+ super.dispose();
+ DeltaCloudManager.getDefault().removeCloudManagerListener(this);
+ }
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionProvider.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionProvider.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -0,0 +1,247 @@
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import java.io.ObjectInputStream.GetField;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.wizards.EditCloudConnectionWizard;
+import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilterWizard;
+import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilterWizard;
+import org.jboss.tools.internal.deltacloud.ui.wizards.NewCloudConnectionWizard;
+
+public class CloudViewActionProvider extends CommonActionProvider {
+
+ private ICommonActionExtensionSite actionSite;
+ private CommonViewer cv;
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ ICommonViewerSite site = aSite.getViewSite();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ StructuredViewer v = aSite.getStructuredViewer();
+ if( v instanceof CommonViewer ) {
+ cv = (CommonViewer)v;
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ createActions(cv, wsSite.getSelectionProvider());
+ addDoubleClickHandler(cv);
+ }
+ }
+ }
+
+ public void dispose() {
+ super.dispose();
+ removeDoubleClickHandler();
+ }
+
+ private IDoubleClickListener doubleClickListener;
+ protected void addDoubleClickHandler(CommonViewer cv) {
+ doubleClickListener = new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ Object o = getSelection();
+ }
+ };
+ cv.addDoubleClickListener(doubleClickListener);
+ }
+
+ protected void removeDoubleClickHandler() {
+ cv.removeDoubleClickListener(doubleClickListener);
+ }
+
+ private Action newConnectionAction, editConnectionAction,
+ deleteCloudAction, refreshCloudAction, launchInstanceAction,
+ startAction, stopAction, rebootAction, destroyAction,
+ filterImageAction, filterInstanceAction;
+
+ protected IStructuredSelection getSelection() {
+ ICommonViewerSite site = actionSite.getViewSite();
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ return (IStructuredSelection)wsSite.getSelectionProvider().getSelection();
+ }
+ return null;
+ }
+
+ protected Object getSelectedItem() {
+ IStructuredSelection selection = getSelection();
+ if( selection != null )
+ return selection.getFirstElement();
+ return null;
+ }
+
+ private void addGM(String id, boolean visible, IMenuManager manager) {
+ GroupMarker gm = new GroupMarker(id);
+ manager.add(gm);
+ Separator s = new Separator();
+ s.setVisible(true);
+ manager.add(s);
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ createActions(cv, null);
+ Object first = getSelectedItem();
+ addGM("BEGIN_CLOUD", false, menu);
+ menu.insertAfter("BEGIN_CLOUD", newConnectionAction);
+ if (first == null)
+ return;
+
+ addGM("END_CLOUD", true, menu);
+ menu.insertBefore("END_CLOUD", editConnectionAction);
+ menu.insertBefore("END_CLOUD", deleteCloudAction);
+ menu.insertBefore("END_CLOUD", refreshCloudAction);
+ addGM("INSTANCE_ACTIONS_BEGIN", false, menu);
+ addGM("INSTANCE_ACTIONS_END", true, menu);
+ menu.insertBefore("INSTANCE_ACTIONS_END", launchInstanceAction);
+ if( (first instanceof DeltaCloudInstance)) {
+ DeltaCloudInstance i = (DeltaCloudInstance)first;
+ menu.insertBefore("INSTANCE_ACTIONS_END", startAction);
+ menu.insertBefore("INSTANCE_ACTIONS_END", stopAction);
+ menu.insertBefore("INSTANCE_ACTIONS_END", rebootAction);
+ menu.insertBefore("INSTANCE_ACTIONS_END", destroyAction);
+ startAction.setEnabled(i.canStart());
+ stopAction.setEnabled(i.canStop());
+ rebootAction.setEnabled(i.canReboot());
+ destroyAction.setEnabled(i.canDestroy());
+ }
+ addGM("FILTERS_BEGIN", false, menu);
+ addGM("FILTERS_END", true, menu);
+ menu.insertBefore("FILTERS_END", filterImageAction);
+ menu.insertBefore("FILTERS_END", filterInstanceAction);
+ }
+
+ public void createActions(CommonViewer tableViewer, ISelectionProvider provider) {
+ final Shell shell = tableViewer.getTree().getShell();
+ newConnectionAction = new Action() {
+ public void run() {
+ NewCloudConnectionWizard wizard = new NewCloudConnectionWizard();
+ wizard.init(PlatformUI.getWorkbench(), new StructuredSelection());
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ };
+ newConnectionAction.setText("New Connection");
+ newConnectionAction.setImageDescriptor(SWTImagesFactory.DESC_NEW_DELTA);
+
+ editConnectionAction = new Action() {
+ public void run() {
+ DeltaCloud cloud = UIUtils.getFirstAdaptedElement(getSelection(), DeltaCloud.class);
+ if (cloud != null) {
+ IWizard wizard = new EditCloudConnectionWizard(cloud);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ }
+ };
+ editConnectionAction.setText("Edit Connection");
+
+ deleteCloudAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.deleteDeltaClouds(shell, getSelection());
+ }
+ };
+ deleteCloudAction.setText("Delete Cloud");
+ deleteCloudAction.setImageDescriptor(SWTImagesFactory.DESC_DESTROY);
+ deleteCloudAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_DESTROYD);
+
+ refreshCloudAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.refreshDeltaClouds(shell, getSelection());
+ }
+ };
+ refreshCloudAction.setText("Refresh Cloud");
+
+ launchInstanceAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.showCreateInstanceWizard(shell, getSelection());
+ }
+ };
+ launchInstanceAction.setText("Launch Instance");
+ launchInstanceAction.setImageDescriptor(SWTImagesFactory.DESC_INSTANCE);
+
+ startAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.startInstances(getSelection());
+ }
+ };
+ startAction.setText("Start");
+ startAction.setImageDescriptor(SWTImagesFactory.DESC_START);
+ startAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STARTD);
+
+ stopAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.stopInstances(getSelection());
+ }
+ };
+ stopAction.setText("Stop");
+ stopAction.setImageDescriptor(SWTImagesFactory.DESC_STOP);
+ stopAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STOPD);
+
+ rebootAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.rebootInstances(getSelection());
+ }
+ };
+ rebootAction.setText("Reboot");
+ rebootAction.setImageDescriptor(SWTImagesFactory.DESC_REBOOT);
+ rebootAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_REBOOTD);
+
+ destroyAction = new Action() {
+ public void run() {
+ CloudViewActionUtil.destroyInstances(getSelection());
+ }
+ };
+ destroyAction.setText("Destroy");
+ destroyAction.setImageDescriptor(SWTImagesFactory.DESC_DESTROY);
+ destroyAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_DESTROYD);
+
+ filterImageAction = new Action() {
+ public void run() {
+ DeltaCloud cloud = UIUtils.getFirstAdaptedElement(getSelection(), DeltaCloud.class);
+ if( cloud != null ) {
+ IWizard wizard = new ImageFilterWizard(cloud);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ }
+ };
+ filterImageAction.setText("Filter Images");
+
+
+ filterInstanceAction = new Action() {
+ public void run() {
+ DeltaCloud cloud = UIUtils.getFirstAdaptedElement(getSelection(), DeltaCloud.class);
+ if( cloud != null ) {
+ IWizard wizard = new InstanceFilterWizard(cloud);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ }
+ };
+ filterInstanceAction.setText("Filter Instances");
+ }
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -0,0 +1,207 @@
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.job.InstanceActionJob;
+import org.jboss.tools.deltacloud.core.job.RefreshCloudJob;
+import org.jboss.tools.deltacloud.ui.commands.DeleteCloudHandler.DeleteCloudsDialog;
+import org.jboss.tools.deltacloud.ui.commands.DeltaCloudInstanceDialog;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstanceWizard;
+
+public class CloudViewActionUtil {
+ private final static String STARTING_INSTANCE_MSG_KEY = "StartingInstance.msg"; //$NON-NLS-1$
+ private final static String START_INSTANCES_DIALOG_TITLE_VAL = CVMessages.getString("StartInstancesDialog.title"); //$NON-NLS-1$
+ private final static String START_INSTANCES_DIALOG_MSG_VAL = CVMessages.getString("StartInstancesDialog.msg"); //$NON-NLS-1$
+
+ private final static String STOPPING_INSTANCE_MSG_KEY = "StoppingInstance.msg"; //$NON-NLS-1$
+ private final static String STOP_INSTANCES_DIALOG_TITLE_VAL = CVMessages.getString("StopInstancesDialog.title"); //$NON-NLS-1$
+ private final static String STOP_INSTANCES_DIALOG_MSG_VAL = CVMessages.getString("StopInstancesDialog.msg"); //$NON-NLS-1$
+
+ private final static String REBOOTING_INSTANCE_MSG_KEY = "RebootingInstance.msg"; //$NON-NLS-1$
+ private final static String REBOOT_INSTANCE_TITLE_VAL = CVMessages.getString("RebootInstancesDialog.title"); //$NON-NLS-1$
+ private final static String REBOOT_INSTANCE_MSG_VAL = CVMessages.getString("RebootInstancesDialog.msg"); //$NON-NLS-1$
+
+ private final static String DESTROYING_INSTANCE_MSG_KEY = "DestroyingInstance.msg"; //$NON-NLS-1$
+ private final static String DESTROY_INSTANCE_TITLE_VAL = CVMessages.getString("DestroyInstancesDialog.title"); //$NON-NLS-1$
+ private final static String DESTROY_INSTANCE_MSG_VAL = CVMessages.getString("DestroyInstancesDialog.msg"); //$NON-NLS-1$
+
+ public static void startInstances(ISelection selection) {
+ DeltaCloudInstance[] instances = getStoppedInstancesToLaunch(getCloudInstances(selection));
+ handleInstanceAction(
+ instances,
+ START_INSTANCES_DIALOG_TITLE_VAL, START_INSTANCES_DIALOG_MSG_VAL,
+ DeltaCloudInstance.Action.START, DeltaCloudInstance.State.RUNNING,
+ STARTING_INSTANCE_MSG_KEY);
+ }
+
+ public static void stopInstances(ISelection selection) {
+ DeltaCloudInstance[] instances = getStoppableInstances(getCloudInstances(selection));
+ handleInstanceAction(
+ instances,
+ STOP_INSTANCES_DIALOG_TITLE_VAL, STOP_INSTANCES_DIALOG_MSG_VAL,
+ DeltaCloudInstance.Action.STOP, DeltaCloudInstance.State.STOPPED,
+ STOPPING_INSTANCE_MSG_KEY);
+ }
+
+ public static void rebootInstances(ISelection selection) {
+ DeltaCloudInstance[] instances = getRebootableInstances(getCloudInstances(selection));
+ handleInstanceAction(
+ instances,
+ REBOOT_INSTANCE_TITLE_VAL, REBOOT_INSTANCE_MSG_VAL,
+ DeltaCloudInstance.Action.REBOOT, DeltaCloudInstance.State.RUNNING,
+ REBOOTING_INSTANCE_MSG_KEY);
+ }
+ public static void destroyInstances(ISelection selection) {
+ DeltaCloudInstance[] instances = getDestroyableInstances(getCloudInstances(selection));
+ handleInstanceAction(
+ instances,
+ DESTROY_INSTANCE_TITLE_VAL, DESTROY_INSTANCE_MSG_VAL,
+ DeltaCloudInstance.Action.DESTROY, DeltaCloudInstance.State.TERMINATED,
+ DESTROYING_INSTANCE_MSG_KEY);
+ }
+
+ protected static void handleInstanceAction(DeltaCloudInstance[] instances,
+ String dialogTitle, String dialogMsg, DeltaCloudInstance.Action action,
+ DeltaCloudInstance.State expectedState, String unformattedJobName) {
+ if(instances.length > 1 ) {
+ List<DeltaCloudInstance> list = Arrays.asList(instances);
+ DeltaCloudInstanceDialog dialog = new DeltaCloudInstanceDialog(
+ UIUtils.getActiveShell(), list,
+ dialogTitle, dialogMsg);
+ dialog.setInitialElementSelections(list);
+ if (Dialog.OK == dialog.open()) {
+ instances = dialog.getResult2();
+ } else {
+ instances = new DeltaCloudInstance[]{};
+ }
+ }
+
+ for( int i = 0; i < instances.length; i++ ) {
+ executeInstanceAction( instances[i], action, expectedState,
+ CVMessages.getFormattedString(unformattedJobName,
+ new String[] { instances[i].getName() }));
+ }
+
+ }
+
+ protected static void executeInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action,
+ DeltaCloudInstance.State expectedState, String jobName) {
+ if (instance != null) {
+ new InstanceActionJob(jobName, instance, action, expectedState).schedule();
+ }
+ }
+
+ private static DeltaCloudInstance[] getStoppedInstancesToLaunch(List<DeltaCloudInstance> instances) {
+ Iterator<DeltaCloudInstance> i = instances.iterator();
+ while(i.hasNext())
+ if(!i.next().isStopped())
+ i.remove();
+ return instances.toArray(new DeltaCloudInstance[instances.size()]);
+ }
+
+ private static DeltaCloudInstance[] getStoppableInstances(List<DeltaCloudInstance> instances) {
+ ArrayList<DeltaCloudInstance> stoppedInstances = new ArrayList<DeltaCloudInstance>();
+ for (DeltaCloudInstance instance : instances)
+ if (instance.canStop())
+ stoppedInstances.add(instance);
+ return stoppedInstances.toArray(new DeltaCloudInstance[stoppedInstances.size()]);
+ }
+
+ private static DeltaCloudInstance[] getRebootableInstances(List<DeltaCloudInstance> deltaCloudInstances) {
+ ArrayList<DeltaCloudInstance> rebootable = new ArrayList<DeltaCloudInstance>();
+ for (DeltaCloudInstance instance : deltaCloudInstances) {
+ if (instance.canReboot()) {
+ rebootable.add(instance);
+ }
+ }
+ return rebootable.toArray(new DeltaCloudInstance[rebootable.size()]);
+ }
+
+ private static DeltaCloudInstance[] getDestroyableInstances(List<DeltaCloudInstance> deltaCloudInstances) {
+ ArrayList<DeltaCloudInstance> destroyable = new ArrayList<DeltaCloudInstance>();
+ for (DeltaCloudInstance instance : deltaCloudInstances) {
+ if (instance.canDestroy()) {
+ destroyable.add(instance);
+ }
+ }
+ return destroyable.toArray(new DeltaCloudInstance[destroyable.size()]);
+ }
+
+ public static List<DeltaCloudInstance> getCloudInstances(ISelection selection) {
+ if( selection instanceof DeltaCloudInstance ) {
+ IStructuredSelection s2 = (IStructuredSelection)selection;
+ List<DeltaCloudInstance> instances = UIUtils.adapt(s2.toList(),DeltaCloudInstance.class);
+ return instances;
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ public static void showCreateInstanceWizard(Shell shell, ISelection selection) {
+ DeltaCloudImage deltaCloudImage = UIUtils.getFirstAdaptedElement(selection, DeltaCloudImage.class);
+ DeltaCloud deltaCloud = UIUtils.getFirstAdaptedElement(selection, DeltaCloud.class);
+ IWizard wizard = new NewInstanceWizard(deltaCloud, deltaCloudImage);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+
+ public static void refreshDeltaClouds(Shell shell, ISelection selection) {
+ Collection<DeltaCloud> clouds = getSelectedClouds(selection);
+ for (DeltaCloud cloud : clouds) {
+ new RefreshCloudJob(cloud).schedule();
+ }
+ }
+
+ public static void deleteDeltaClouds(Shell shell, ISelection selection) {
+ Collection<DeltaCloud> clouds = getSelectedClouds(selection);
+ DeleteCloudsDialog dialog =
+ new DeleteCloudsDialog(shell, clouds);
+ dialog.setInitialSelections(clouds.toArray());
+ if (Dialog.OK == dialog.open()) {
+ ArrayList<IStatus> children = new ArrayList<IStatus>();
+ for (Object deltaCloud : clouds) {
+ try {
+ DeltaCloudManager.getDefault().removeCloud((DeltaCloud) deltaCloud);
+ } catch( DeltaCloudException dce) {
+ // TODO create status
+ }
+ }
+ if( children.size() > 0 ) {
+ // TODO create multistatus and log
+ }
+ }
+ }
+
+ public static Collection<DeltaCloud> getSelectedClouds(ISelection selection) {
+ List<?> selectedElements = ((IStructuredSelection) selection).toList();
+ Set<DeltaCloud> selectedClouds = new HashSet<DeltaCloud>();
+ for (Object element : selectedElements) {
+ DeltaCloud deltaCloud = UIUtils.adapt(element, DeltaCloud.class);
+ if (deltaCloud != null) {
+ selectedClouds.add(deltaCloud);
+ }
+ }
+ return selectedClouds;
+ }
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/ClouldSorter1.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/ClouldSorter1.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/ClouldSorter1.java 2011-01-26 00:04:15 UTC (rev 28606)
@@ -0,0 +1,36 @@
+package org.jboss.tools.deltacloud.ui.views.cloud.cnf;
+
+import java.text.Collator;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.CategoryContent;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.ImagesPager;
+import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.InstancesCategory;
+
+public class ClouldSorter1 extends ViewerSorter {
+
+ public ClouldSorter1() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public ClouldSorter1(Collator collator) {
+ super(collator);
+ // TODO Auto-generated constructor stub
+ }
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if( e1 instanceof CategoryContent && e1 instanceof CategoryContent ) {
+ if( e1 instanceof InstancesCategory)
+ return -1;
+ return 1;
+ }
+
+ if( e1 instanceof ImagesPager && e2 instanceof ImagesPager)
+ return ((ImagesPager)e1).getPage() - ((ImagesPager)e2).getPage();
+ return super.compare(viewer, e1, e2);
+ }
+}
13 years, 5 months
JBoss Tools SVN: r28605 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core: client and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-25 19:03:09 -0500 (Tue, 25 Jan 2011)
New Revision: 28605
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudImagesJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudInstancesJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/RefreshCloudJob.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
Log:
JBIDE-8224 - initial commit for CNF based CloudView
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java 2011-01-25 21:47:28 UTC (rev 28604)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java 2011-01-26 00:03:09 UTC (rev 28605)
@@ -11,11 +11,14 @@
package org.jboss.tools.deltacloud.core;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
+import org.jboss.tools.common.log.StatusFactory;
import org.osgi.framework.BundleContext;
/**
@@ -81,5 +84,14 @@
status = new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, e.getMessage(), e);
log(status);
}
-
+ public static IStatus createMultiStatus(DeltaCloudMultiException throwable) {
+ List<IStatus> states = new ArrayList<IStatus>(throwable.getThrowables().size());
+ for (Throwable childThrowable : throwable.getThrowables()) {
+ IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, childThrowable.getMessage(),
+ childThrowable);
+ states.add(status);
+ }
+ return StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, throwable.getMessage(), throwable,
+ states.toArray(new IStatus[states.size()]));
+ }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-01-25 21:47:28 UTC (rev 28604)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-01-26 00:03:09 UTC (rev 28605)
@@ -362,6 +362,14 @@
}
}
+ public boolean imagesLoaded() {
+ return images == null ? false : true;
+ }
+
+ public boolean instancesLoaded() {
+ return instanceRepo == null ? false : true;
+ }
+
private void clearInstances() {
// TODO: remove notification with all instanceRepo, replace by
// notifying the changed instance
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-01-25 21:47:28 UTC (rev 28604)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-01-26 00:03:09 UTC (rev 28605)
@@ -11,6 +11,7 @@
package org.jboss.tools.deltacloud.core.client;
import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -60,6 +61,7 @@
import org.jboss.tools.deltacloud.core.client.unmarshal.KeysUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.RealmUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.RealmsUnmarshaller;
+import org.jboss.tools.deltacloud.core.client.utils.StringUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudImagesJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudImagesJob.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudImagesJob.java 2011-01-26 00:03:09 UTC (rev 28605)
@@ -0,0 +1,29 @@
+package org.jboss.tools.deltacloud.core.job;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+
+public class LoadCloudImagesJob extends AbstractCloudElementJob {
+
+ private DeltaCloud cloud;
+ private Runnable post = null;
+ public LoadCloudImagesJob(DeltaCloud cloud) {
+ super("Loading Cloud Images for cloud " + cloud.getName(),
+ cloud, CLOUDELEMENT.INSTANCES);
+ this.cloud = cloud;
+ }
+ public LoadCloudImagesJob(DeltaCloud cloud, Runnable post) {
+ this(cloud);
+ this.post = post;
+ }
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) throws Exception {
+ cloud.loadImages();
+ if( post != null )
+ post.run();
+ return Status.OK_STATUS;
+ }
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudInstancesJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudInstancesJob.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/LoadCloudInstancesJob.java 2011-01-26 00:03:09 UTC (rev 28605)
@@ -0,0 +1,29 @@
+package org.jboss.tools.deltacloud.core.job;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+
+public class LoadCloudInstancesJob extends AbstractCloudElementJob {
+
+ private DeltaCloud cloud;
+ private Runnable post = null;
+ public LoadCloudInstancesJob(DeltaCloud cloud) {
+ super("Loading Cloud Instances for cloud " + cloud.getName(),
+ cloud, CLOUDELEMENT.INSTANCES);
+ this.cloud = cloud;
+ }
+ public LoadCloudInstancesJob(DeltaCloud cloud, Runnable post) {
+ this(cloud);
+ this.post = post;
+ }
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) throws Exception {
+ cloud.loadInstances();
+ if( post != null )
+ post.run();
+ return Status.OK_STATUS;
+ }
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/RefreshCloudJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/RefreshCloudJob.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/RefreshCloudJob.java 2011-01-26 00:03:09 UTC (rev 28605)
@@ -0,0 +1,25 @@
+package org.jboss.tools.deltacloud.core.job;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.tools.deltacloud.core.Activator;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudMultiException;
+
+public class RefreshCloudJob extends AbstractCloudJob {
+
+ public RefreshCloudJob(DeltaCloud cloud) {
+ super("Refreshing images and instances on " + cloud.getName(), cloud);
+ }
+
+ protected IStatus doRun(IProgressMonitor monitor) throws Exception {
+ try {
+ getCloud().loadChildren();
+ } catch (DeltaCloudMultiException e) {
+ return Activator.createMultiStatus(e);
+ }
+ return Status.OK_STATUS;
+ }
+
+}
13 years, 5 months
JBoss Tools SVN: r28604 - workspace/bfitzpat/org.jboss.tools.py.project.converter/src.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-01-25 16:47:28 -0500 (Tue, 25 Jan 2011)
New Revision: 28604
Modified:
workspace/bfitzpat/org.jboss.tools.py.project.converter/src/Main.py
workspace/bfitzpat/org.jboss.tools.py.project.converter/src/constants.py
workspace/bfitzpat/org.jboss.tools.py.project.converter/src/converter.py
workspace/bfitzpat/org.jboss.tools.py.project.converter/src/dir_handler.py
workspace/bfitzpat/org.jboss.tools.py.project.converter/src/file_handler.py
workspace/bfitzpat/org.jboss.tools.py.project.converter/src/utils.py
Log:
Updates to migration script for JBDS-1520 - adding drools and jbpm support, other tweaks
Modified: workspace/bfitzpat/org.jboss.tools.py.project.converter/src/Main.py
===================================================================
--- workspace/bfitzpat/org.jboss.tools.py.project.converter/src/Main.py 2011-01-25 17:53:23 UTC (rev 28603)
+++ workspace/bfitzpat/org.jboss.tools.py.project.converter/src/Main.py 2011-01-25 21:47:28 UTC (rev 28604)
@@ -18,15 +18,112 @@
# change this list to be appropriate to your own runtime directory and
# list of projects to convert
-localruntime = '/home/bfitzpat/NotBackedUp/runtimes/jboss-soa-p-5/jboss-as/samples/quickstarts'
+localruntime = '/media/My Passport/Linux/Runtimes/jboss-soa-p-5-er7/jboss-as/samples/quickstarts'
-toconvert.append('camel_helloworld')
-toconvert.append('business_ruleservice_cep')
-toconvert.append('deadletter')
-toconvert.append('helloworld_file_action')
-toconvert.append('helloworld_file_notifier')
-toconvert.append('helloworld_ftp_action')
+# ** entire list of non-eclipse samples
+# ** from /samples/quickstarts
+#toconvert.append('aggregator')
+#toconvert.append('bpel_event_listener')
+#toconvert.append('bpm_orchestration1')
+#toconvert.append('bpm_orchestration2')
+#toconvert.append('bpm_orchestration3')
+#toconvert.append('bpm_orchestration4')
+#toconvert.append('business_ruleservice_cep')
+#toconvert.append('business_ruleservice_ruleAgent')
+#toconvert.append('business_ruleservice_stateful')
+#toconvert.append('business_rules_service')
+#toconvert.append('business_service')
+#toconvert.append('camel_helloworld')
+#toconvert.append('custom_action')
+#toconvert.append('deadletter')
+#toconvert.append('dynamic_router')
+#toconvert.append('ejbprocessor')
+#toconvert.append('exceptions_faults')
+#toconvert.append('fun_cbr')
+#toconvert.append('groovy_gateway')
+#toconvert.append('helloworld')
+#toconvert.append('helloworld_action')
+#toconvert.append('helloworld_ejb3_ws')
+#toconvert.append('helloworld_ejb3_ws_wss')
+#toconvert.append('helloworld_file_action')
+#toconvert.append('helloworld_file_notifier')
+#toconvert.append('helloworld_ftp_action')
+#toconvert.append('helloworld_hibernate_action')
+#toconvert.append('helloworld_sql_action')
+#toconvert.append('helloworld_topic_notifier')
+#toconvert.append('helloworld_tx_sql_action')
+#toconvert.append('http_gateway')
+#toconvert.append('https_2way_ssl')
+#toconvert.append('huge-split-enrich-transform-route')
+#toconvert.append('invm_transport1')
+#toconvert.append('jms_router')
+#toconvert.append('jms_secured')
+#toconvert.append('jms_topic')
+#toconvert.append('jms_transacted')
+#toconvert.append('load_generator')
+#toconvert.append('messagealerts')
+#toconvert.append('messagefilter')
+#toconvert.append('messagestore')
+#toconvert.append('monitoring_action')
+#toconvert.append('native_client')
+#toconvert.append('opensso')
+#toconvert.append('publish_as_webservice')
+#toconvert.append('publish_as_webservice_inonly')
+#toconvert.append('recipient_list')
+#toconvert.append('scheduled_services')
+#toconvert.append('scripting_chain')
+#toconvert.append('scripting_groovy')
+#toconvert.append('security_basic')
+#toconvert.append('security_cert')
+#toconvert.append('security_jbpm')
+#toconvert.append('security_saml')
+#toconvert.append('simple_cbr')
+#toconvert.append('smooks_file_splitter_router')
+#toconvert.append('spring_aop')
+#toconvert.append('spring_helloworld')
+#toconvert.append('spring_jpetstore')
+#toconvert.append('static_router')
+#toconvert.append('swift2xml_action')
+#toconvert.append('transform_CSV2XML')
+#toconvert.append('transform_EDI2XML_Groovy_XSLT')
+#toconvert.append('transform_XML2POJO')
+#toconvert.append('transform_XML2POJO2')
+#toconvert.append('transform_XML2XML_date_manipulation')
+#toconvert.append('transform_XML2XML_simple')
+#toconvert.append('transform_XML2XML_stream')
+#toconvert.append('two_servers')
+#toconvert.append('udp_gateway')
+#toconvert.append('webservice_consumer1')
+#toconvert.append('webservice_consumer2')
+#toconvert.append('webservice_consumer_wise')
+#toconvert.append('webservice_consumer_wise2')
+#toconvert.append('webservice_consumer_wise3')
+#toconvert.append('webservice_consumer_wise4')
+#toconvert.append('webservice_mtom')
+#toconvert.append('webservice_producer')
+#toconvert.append('webservice_proxy_basic')
+#toconvert.append('webservice_proxy_routed')
+#toconvert.append('webservice_proxy_security')
+#toconvert.append('webservice_proxy_versioning')
+#toconvert.append('webservice_wsaddressing')
+#toconvert.append('webservice_wssecurity')
+#toconvert.append('wiretap')
+#toconvert.append('wsmq_router')
+#toconvert.append('xml2swift_action')
+#toconvert.append('')
+# **main set from /samples/quickstarts/readme.txt
+#toconvert.append('helloworld')
+#toconvert.append('helloworld_action')
+#toconvert.append('custom_action')
+#toconvert.append('transform_XML2POJO')
+toconvert.append('simple_cbr')
+toconvert.append('fun_cbr')
+#toconvert.append('business_service')
+toconvert.append('native_client')
+#toconvert.append('static_router')
+#toconvert.append('aggregator')
+
for x in toconvert:
print 'Starting to convert ' + x
convert( os.path.join(localruntime, x) )
Modified: workspace/bfitzpat/org.jboss.tools.py.project.converter/src/constants.py
===================================================================
--- workspace/bfitzpat/org.jboss.tools.py.project.converter/src/constants.py 2011-01-25 17:53:23 UTC (rev 28603)
+++ workspace/bfitzpat/org.jboss.tools.py.project.converter/src/constants.py 2011-01-25 21:47:28 UTC (rev 28604)
@@ -9,10 +9,19 @@
esbcontentdir = 'esbcontent'
metainfdir = 'META-INF'
settingsdir = '.settings'
+deploymentxml = 'deployment.xml'
+jmsqueueopen = '<jmsQueue>'
+jmsqueueclose = '</jmsQueue>'
+dotprojectfilename = '.project'
+dotclasspathfilename = '.classpath'
+facetcorexmlfilename = 'org.eclipse.wst.common.project.facet.core.xml'
+wstcommoncomponentfilename = 'org.eclipse.wst.common.component'
+jdtcoreprefsfilename = 'org.eclipse.jdt.core.prefs'
+rulesdir = 'rules'
# name of the runtime target server - CHANGE THIS TO BE YOUR LOCAL SERVER NAME
runtimeTargetServerName = 'JBoss SOA-P 5.1 Runtime Server'
# version for ESB
-esbVersion = '4.4'
+esbVersion = '4.9'
Modified: workspace/bfitzpat/org.jboss.tools.py.project.converter/src/converter.py
===================================================================
--- workspace/bfitzpat/org.jboss.tools.py.project.converter/src/converter.py 2011-01-25 17:53:23 UTC (rev 28603)
+++ workspace/bfitzpat/org.jboss.tools.py.project.converter/src/converter.py 2011-01-25 21:47:28 UTC (rev 28604)
@@ -12,7 +12,54 @@
import file_handler
import dir_handler
import constants
+import shutil
+import utils
+variant_esb_filenames = [ 'jboss-esb-unfiltered.xml', 'jboss-esb.xml']
+variant_esbprops_filenames = [ 'jboss-esb.properties', 'jbossesb-properties.xml']
+variant_jbpm_filenames = [ 'gpd.xml', 'processdefinition.xml' ]
+variant_jbpm_foldernames = [ 'processDefinition' ]
+
+def create_esb_dirs (eclipse_dir, new_mode, directories):
+ # create directories under new_dir
+ dir_handler.create_esbcontent_dir(eclipse_dir, new_mode)
+ dir_handler.create_esbcontent_metainf_dir(eclipse_dir, new_mode)
+ directories.append(constants.esbcontentdir)
+ directories.append(constants.metainfdir)
+
+def create_drools_dirs (eclipse_dir, new_mode, directories):
+ # create directories under new_dir
+ dir_handler.create_drools_rules_dir(eclipse_dir, new_mode)
+ directories.append(constants.rulesdir)
+
+def is_esb_project ( in_dir ):
+ for esbfile in variant_esb_filenames:
+ if utils.does_file_exist(in_dir, esbfile):
+ return True
+ for esbpropsfile in variant_esbprops_filenames:
+ if utils.does_file_exist(in_dir, esbpropsfile):
+ return True
+ return False
+
+def is_jbpm_project ( in_dir ):
+ for jbpmfile in variant_jbpm_filenames:
+ if utils.does_file_exist(in_dir, jbpmfile):
+ return True
+ for jbpmfolder in variant_jbpm_foldernames:
+ if utils.does_folder_exist(in_dir, jbpmfolder):
+ return True
+ return False
+
+def is_drools_project ( in_dir ):
+ # now we've gone through all the files we know about, so let's grab the
+ # files and directories we don't know what to do with and copy them over too
+ dircontents = os.listdir(in_dir)
+ for dirfileordir in dircontents:
+ if os.path.isfile(os.path.join(in_dir, dirfileordir)):
+ if dirfileordir.endswith('.drl'):
+ return True
+ return False
+
def dir_to_eclipse(in_dir):
# assumes mode of in_dir will be the same as eclipse_dir
new_mode = os.stat(in_dir).st_mode
@@ -27,75 +74,136 @@
dir_handler.create_eclipse_project_dir(eclipse_dir, eclipse_dir_name, new_mode)
# create directories under new_dir
- dir_handler.create_esbcontent_dir(eclipse_dir, new_mode)
- dir_handler.create_esbcontent_metainf_dir(eclipse_dir, new_mode)
dir_handler.create_dotsettings_dir(eclipse_dir, new_mode)
+
+ directories = [ constants.settingsdir ]
# handle src directory - copy src in if there is src, otherwise
# just create empty src dir
dir_handler.handle_src_dir(in_dir, eclipse_dir, new_mode)
+ directories.append(constants.srcdir)
- # handle copying and updating the deployment.xml file
- file_handler.handle_deployment_xml(in_dir, eclipse_dir)
+ files = [ ]
+
+ # figure out if this is an esb project
+ global isesb
+ isesb = is_esb_project ( in_dir )
+
+ # figure out if this is a jbpm project
+ global isjbpm3
+ isjbpm3 = is_jbpm_project ( in_dir )
+
+ # figure out if this is a drools project
+ global isdrools
+ isdrools = is_drools_project ( in_dir )
+
+ if isesb:
- # copy any jboss-esb.xml files (or name variants) to META-INF dir
- global isesb
- isesb = False
- variant_esb_filenames = [ 'jboss-esb-unfiltered.xml', 'jboss-esb.xml']
- for esbfile in variant_esb_filenames:
- copied = file_handler.copy_file_to_metainfdir(in_dir, eclipse_dir, esbfile)
- if copied:
- isesb = True
+ # create the esb directories
+ create_esb_dirs (eclipse_dir, new_mode, directories )
+
+ # handle copying and updating the deployment.xml file
+ file_handler.handle_deployment_xml(in_dir, eclipse_dir)
+
+ files.append(constants.deploymentxml)
- # copy any jboss-esb.properties files to META-INF dir
- variant_esbprops_filenames = [ 'jboss-esb.properties', 'jbossesb-properties.xml']
- for esbpropsfile in variant_esbprops_filenames:
- copied = file_handler.copy_file_to_metainfdir(in_dir, eclipse_dir, esbpropsfile)
+ # copy any jboss-esb.xml files (or name variants) to META-INF dir
+ for esbfile in variant_esb_filenames:
+ copied = file_handler.copy_file_to_metainfdir(in_dir, eclipse_dir, esbfile)
+ if copied:
+ files.append(esbfile)
+ break
+
+ # copy any jboss-esb.properties files to esbcontent dir
+ for esbpropsfile in variant_esbprops_filenames:
+ copied = file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, esbpropsfile)
+ if copied:
+ files.append(esbpropsfile)
+ break
+
+ # copy any jbm-queue-service.xml files to esbcontent dir
+ jbmqueueservicexml = 'jbm-queue-service.xml'
+ copied = file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, jbmqueueservicexml)
if copied:
- isesb = True
+ files.append(jbmqueueservicexml)
- # copy any log4j.xml files to esbcontent dir
- log4jxml = 'log4j.xml'
- file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, log4jxml)
+ # copy any business_ruleservice_cep.drl files to esbcontent dir
+# businessruleservicecepdrl = 'business_ruleservice_cep.drl'
+# copied = file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, businessruleservicecepdrl)
+# if copied:
+# files.append(businessruleservicecepdrl)
- # copy any hornetq-jms.xml files to esbcontent dir
- hornetqjmsxml = 'hornetq-jms.xml'
- file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, hornetqjmsxml)
+ # copy any business_ruleservice_cep-unfiltered.properties files to esbcontent dir
+# businessruleservicecepunfilteredproperties = 'business_ruleservice_cep-unfiltered.properties'
+# copied = file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, businessruleservicecepunfilteredproperties)
+# if copied:
+# files.append(businessruleservicecepunfilteredproperties)
+
+ # copy any smooks files to esbcontent dir
+ variant_smooks_filenames = [ 'smooks-res.xml', 'smooks-config.xml']
+ for smooksfile in variant_smooks_filenames:
+ copied = file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, smooksfile)
+ if copied:
+ files.append(smooksfile)
+ break
- # copy any jbm-queue-service.xml files to esbcontent dir
- jbmqueueservicexml = 'jbm-queue-service.xml'
- file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, jbmqueueservicexml)
+ if isdrools:
+
+ # create the drools rules directory
+ create_drools_dirs (eclipse_dir, new_mode, directories )
- # copy any jndi.properties files to esbcontent dir
- jndiprops = 'jndi.properties'
- file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, jndiprops)
+ # copy any .drl files to drools rules dir
+ dircontents = os.listdir(in_dir)
+ for dirfileordir in dircontents:
+ if os.path.isfile(os.path.join(in_dir, dirfileordir)):
+ if dirfileordir.endswith('.drl'):
+ copied = file_handler.copy_file_to_rulesdir(in_dir, eclipse_dir, dirfileordir)
+ if copied:
+ files.append(dirfileordir)
- # copy any business_ruleservice_cep.drl files to esbcontent dir
- businessruleservicecepdrl = 'business_ruleservice_cep.drl'
- file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, businessruleservicecepdrl)
+ # copy any extraneous rules related files to rules dir
+ variant_drlrelated_filenames = [ 'regex-rules.properties']
+ for drlrelatedfile in variant_drlrelated_filenames:
+ copied = file_handler.copy_file_to_rulesdir(in_dir, eclipse_dir, drlrelatedfile)
+ if copied:
+ files.append(drlrelatedfile)
+ break
- # copy any business_ruleservice_cep-unfiltered.properties files to esbcontent dir
- businessruleservicecepunfilteredproperties = 'business_ruleservice_cep-unfiltered.properties'
- file_handler.copy_file_to_esbcontentdir(in_dir, eclipse_dir, businessruleservicecepunfilteredproperties)
-
# copy any build.xml files to root eclipse project dir
buildxml = 'build.xml'
- file_handler.handle_copy_file(in_dir, eclipse_dir, buildxml)
+ copied = file_handler.handle_copy_file(in_dir, eclipse_dir, buildxml)
+ if copied:
+ files.append(buildxml)
# copy any readme.txt files to root eclipse project dir
readmetxt = 'readme.txt'
- file_handler.handle_copy_file(in_dir, eclipse_dir, readmetxt)
+ copied = file_handler.handle_copy_file(in_dir, eclipse_dir, readmetxt)
+ if copied:
+ files.append(readmetxt)
# create the .project file
file_handler.create_dotproject_file(eclipse_dir, projectname)
+ files.append(constants.dotprojectfilename)
# create the .classpath file
containers = []
if isesb:
containers.append( 'org.jboss.esb.runtime.classpath/server.supplied/' + constants.runtimeTargetServerName )
containers.append( 'org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/' + constants.runtimeTargetServerName )
- file_handler.create_dotclasspath_file(eclipse_dir, containers)
+ libraries = []
+ if isjbpm3:
+ containers.append( 'JBPM/jBPM 3' )
+ libraries.append( '../jboss-as/server/default/deploy/jbpm.esb/jbossesb-jbpm.jar')
+
+ srcdirs = []
+ if isdrools:
+ containers.append( 'DROOLS/Drools')
+ srcdirs.append(constants.rulesdir)
+
+ file_handler.create_dotclasspath_file(eclipse_dir, containers, libraries, srcdirs)
+ files.append(constants.dotclasspathfilename)
+
# create the org.eclipse.wst.common.project.facet.core.xml file
entries = []
entries.append(' <runtime name="' + constants.runtimeTargetServerName + '"/>')
@@ -103,6 +211,7 @@
entries.append(' <fixed facet="jst.jboss.esb"/>')
entries.append(' <installed facet="jst.jboss.esb" version="' + constants.esbVersion + '"/>')
file_handler.create_facetcorexml_file(eclipse_dir, entries)
+ files.append(constants.facetcorexmlfilename)
# create the org.eclipse.wst.common.component file
entries = []
@@ -110,6 +219,33 @@
entries.append(' <wb-resource deploy-path="/" source-path="/esbcontent"/>')
entries.append(' <property name="java-output-path" value="/esbcontent/build/classes/"/>')
file_handler.create_wstcommoncomponent_file (eclipse_dir, projectname, entries)
+ files.append(constants.wstcommoncomponentfilename)
# create the org.eclipse.jdt.core.prefs file
file_handler.create_jdtcoreprefs_file(eclipse_dir)
+ files.append(constants.jdtcoreprefsfilename)
+
+ # now we've gone through all the files we know about, so let's grab the
+ # files and directories we don't know what to do with and copy them over too
+ dircontents = os.listdir(in_dir)
+ for dirfileordir in dircontents:
+ if os.path.isfile(os.path.join(in_dir, dirfileordir)):
+ isfound = False
+ for file in files:
+ if cmp(file, dirfileordir) == 0:
+ isfound = True
+ break
+ if isfound == False:
+ copied = file_handler.handle_copy_file(in_dir, eclipse_dir, dirfileordir)
+ if copied:
+ files.append(dirfileordir)
+
+ if os.path.isdir(os.path.join(in_dir, dirfileordir)):
+ isfound = False
+ for dir in directories:
+ if cmp(dir, dirfileordir) == 0:
+ isfound = True
+ break
+ if isfound == False:
+ shutil.copytree(os.path.join(in_dir, dirfileordir), os.path.join(eclipse_dir, dirfileordir))
+ directories.append(dirfileordir)
Modified: workspace/bfitzpat/org.jboss.tools.py.project.converter/src/dir_handler.py
===================================================================
--- workspace/bfitzpat/org.jboss.tools.py.project.converter/src/dir_handler.py 2011-01-25 17:53:23 UTC (rev 28603)
+++ workspace/bfitzpat/org.jboss.tools.py.project.converter/src/dir_handler.py 2011-01-25 21:47:28 UTC (rev 28604)
@@ -28,6 +28,10 @@
# create new eclipse project directory
create_dir (eclipse_dir, new_mode)
+def create_drools_rules_dir( eclipse_dir, new_mode ):
+ # create esbcontent directory
+ create_dir (os.path.join(eclipse_dir, constants.rulesdir), new_mode)
+
def create_esbcontent_dir( eclipse_dir, new_mode ):
# create esbcontent directory
create_dir (os.path.join(eclipse_dir, constants.esbcontentdir), new_mode)
Modified: workspace/bfitzpat/org.jboss.tools.py.project.converter/src/file_handler.py
===================================================================
--- workspace/bfitzpat/org.jboss.tools.py.project.converter/src/file_handler.py 2011-01-25 17:53:23 UTC (rev 28603)
+++ workspace/bfitzpat/org.jboss.tools.py.project.converter/src/file_handler.py 2011-01-25 21:47:28 UTC (rev 28604)
@@ -19,38 +19,36 @@
def handle_deployment_xml( in_dir, eclipse_dir ):
#constants
- deploymentxml = 'deployment.xml'
- jmsqueueopen = '<jmsQueue>'
- jmsqueueclose = '</jmsQueue>'
- REDONE_STR = """<depends>jboss.esb.quickstart.destination:service=Queue,name= %(queuename)s</depends>"""
+ REDONE_STR = """<depends>jboss.esb.quickstart.destination:service=Queue,name=%(queuename)s</depends>"""
#if the deployment file exists in the original directory
- if utils.does_file_exist(in_dir, deploymentxml):
+ if utils.does_file_exist(in_dir, constants.deploymentxml):
# copy it
- shutil.copy2(os.path.join(in_dir, deploymentxml),
- os.path.join(eclipse_dir, constants.esbcontentdir, constants.metainfdir, deploymentxml))
- debug_msg ( 'created file: ' + deploymentxml )
+ shutil.copy2(os.path.join(in_dir, constants.deploymentxml),
+ os.path.join(eclipse_dir, constants.esbcontentdir, constants.metainfdir, constants.deploymentxml))
+ debug_msg ( 'created file: ' + constants.deploymentxml )
# now need to modify deployment.xml to get queue references right
- deploymentxmlpath = os.path.join(eclipse_dir, constants.esbcontentdir, constants.metainfdir, deploymentxml)
+ deploymentxmlpath = os.path.join(eclipse_dir, constants.esbcontentdir, constants.metainfdir, constants.deploymentxml)
deploymentxmlfile = open(deploymentxmlpath, 'r')
alllines = deploymentxmlfile.readlines()
index = -1
for x in alllines:
index = index + 1
- start = x.find(jmsqueueopen)
+ start = x.find(constants.jmsqueueopen)
if start > -1:
- end = x.find(jmsqueueclose)
+ end = x.find(constants.jmsqueueclose)
if end > -1:
queuename = x[start + 10: end]
alllines[index] = REDONE_STR % {'queuename' : queuename }
+ debug_msg ( 'updated line: ' + alllines[index] )
deploymentxmlfile.close()
# now rewrite the file with the updated deploy tags
- deploymentxmlpath = os.path.join(eclipse_dir, constants.esbcontentdir, constants.metainfdir, deploymentxml)
+ deploymentxmlpath = os.path.join(eclipse_dir, constants.esbcontentdir, constants.metainfdir, constants.deploymentxml)
deploymentxmlfile = open(deploymentxmlpath, 'w')
for x in alllines:
deploymentxmlfile.write(x + '\n')
@@ -71,6 +69,10 @@
flag = handle_copy_file ( in_dir, os.path.join(eclipse_dir, constants.esbcontentdir), filename )
return flag
+def copy_file_to_rulesdir ( in_dir, eclipse_dir, filename ):
+ flag = handle_copy_file ( in_dir, os.path.join(eclipse_dir, constants.rulesdir), filename )
+ return flag
+
def handle_create_file ( eclipse_dir,filename, contents):
path = os.path.join(eclipse_dir, filename)
file = open(path, 'w')
@@ -78,7 +80,6 @@
utils.writeline(file, line)
def create_dotproject_file ( eclipse_dir, projectname):
- dotprojectfilename = '.project'
contents = []
contents.append('<?xml version="1.0" encoding="UTF-8"?>')
contents.append('<projectDescription>')
@@ -106,10 +107,9 @@
contents.append(' <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>')
contents.append('</natures>')
contents.append('</projectDescription>')
- handle_create_file ( eclipse_dir, dotprojectfilename, contents)
+ handle_create_file ( eclipse_dir, constants.dotprojectfilename, contents)
-def create_dotclasspath_file ( eclipse_dir, containers ):
- dotclasspathfilename = '.classpath'
+def create_dotclasspath_file ( eclipse_dir, containers, libraries, srcdirs ):
contents = []
contents.append('<?xml version="1.0" encoding="UTF-8"?>')
contents.append('<classpath>')
@@ -124,11 +124,16 @@
for container in containers:
contents.append(' <classpathentry kind="con" path="' + container + '"/>')
+ for library in libraries:
+ contents.append(' <classpathentry kind="lib" path="' + library + '"/>')
+
+ for src in srcdirs:
+ contents.append(' <classpathentry kind="src" path="' + src + '"/>')
+
contents.append('</classpath>')
- handle_create_file ( eclipse_dir, dotclasspathfilename, contents)
+ handle_create_file ( eclipse_dir, constants.dotclasspathfilename, contents)
def create_facetcorexml_file ( eclipse_dir, entries ):
- facetcorexmlfilename = 'org.eclipse.wst.common.project.facet.core.xml'
contents = []
contents.append('<?xml version="1.0" encoding="UTF-8"?>')
contents.append('<faceted-project>')
@@ -139,10 +144,9 @@
contents.append(entry)
contents.append('</faceted-project>')
- handle_create_file ( os.path.join(eclipse_dir, constants.settingsdir), facetcorexmlfilename, contents)
+ handle_create_file ( os.path.join(eclipse_dir, constants.settingsdir), constants.facetcorexmlfilename, contents)
def create_wstcommoncomponent_file ( eclipse_dir, projectname, entries):
- wstcommoncomponentfilename = 'org.eclipse.wst.common.component'
contents = []
contents.append('<?xml version="1.0" encoding="UTF-8"?>')
contents.append('<project-modules id="moduleCoreId" project-version="1.5.0">')
@@ -154,10 +158,9 @@
contents.append(' </wb-module>')
contents.append('</project-modules>')
- handle_create_file ( os.path.join(eclipse_dir, constants.settingsdir), wstcommoncomponentfilename, contents)
+ handle_create_file ( os.path.join(eclipse_dir, constants.settingsdir), constants.wstcommoncomponentfilename, contents)
def create_jdtcoreprefs_file ( eclipse_dir ):
- jdtcoreprefsfilename = 'org.eclipse.jdt.core.prefs'
contents = []
datetimestamp = datetime.datetime.today().ctime()
contents.append ('#' + datetimestamp)
@@ -173,4 +176,4 @@
contents.append ('org.eclipse.jdt.core.compiler.problem.enumIdentifier=error')
contents.append ('org.eclipse.jdt.core.compiler.source=1.6')
- handle_create_file ( os.path.join(eclipse_dir, constants.settingsdir), jdtcoreprefsfilename, contents)
+ handle_create_file ( os.path.join(eclipse_dir, constants.settingsdir), constants.jdtcoreprefsfilename, contents)
Modified: workspace/bfitzpat/org.jboss.tools.py.project.converter/src/utils.py
===================================================================
--- workspace/bfitzpat/org.jboss.tools.py.project.converter/src/utils.py 2011-01-25 17:53:23 UTC (rev 28603)
+++ workspace/bfitzpat/org.jboss.tools.py.project.converter/src/utils.py 2011-01-25 21:47:28 UTC (rev 28604)
@@ -14,6 +14,14 @@
except OSError:
return False
+def does_folder_exist(path, folder):
+ fpath = os.path.join(path, folder)
+ try:
+ if os.path.isdir(fpath):
+ return True
+ except OSError:
+ return False
+
def writeline(file, line):
file.write(line)
file.write('\n')
13 years, 5 months