JBoss Tools SVN: r39438 - in trunk/maven/features: org.jboss.tools.maven.profiles.feature and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-12 10:29:38 -0400 (Mon, 12 Mar 2012)
New Revision: 39438
Modified:
trunk/maven/features/org.jboss.tools.maven.feature/build.properties
trunk/maven/features/org.jboss.tools.maven.profiles.feature/build.properties
trunk/maven/features/org.jboss.tools.maven.seam.feature/build.properties
Log:
fix build.properties to make Tycho 0.14 happy (?) [JBIDE-11272]
Modified: trunk/maven/features/org.jboss.tools.maven.feature/build.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.feature/build.properties 2012-03-12 13:35:42 UTC (rev 39437)
+++ trunk/maven/features/org.jboss.tools.maven.feature/build.properties 2012-03-12 14:29:38 UTC (rev 39438)
@@ -1,3 +1,3 @@
-bin.includes = feature*.*,\
- license.html
-
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Modified: trunk/maven/features/org.jboss.tools.maven.profiles.feature/build.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.profiles.feature/build.properties 2012-03-12 13:35:42 UTC (rev 39437)
+++ trunk/maven/features/org.jboss.tools.maven.profiles.feature/build.properties 2012-03-12 14:29:38 UTC (rev 39438)
@@ -1,2 +1,3 @@
-bin.includes = feature*.*,\
- license.html
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Modified: trunk/maven/features/org.jboss.tools.maven.seam.feature/build.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.seam.feature/build.properties 2012-03-12 13:35:42 UTC (rev 39437)
+++ trunk/maven/features/org.jboss.tools.maven.seam.feature/build.properties 2012-03-12 14:29:38 UTC (rev 39438)
@@ -1,3 +1,3 @@
-bin.includes = feature*.*,\
- license.html
-
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
14 years
JBoss Tools SVN: r39437 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-12 09:35:42 -0400 (Mon, 12 Mar 2012)
New Revision: 39437
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html
Log:
Fixing minor typos
Modified: trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html 2012-03-12 13:15:20 UTC (rev 39436)
+++ trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html 2012-03-12 13:35:42 UTC (rev 39437)
@@ -150,7 +150,7 @@
<img src="images/wizard-import.png" />
</p>
You may of course also make up your mind and choose another OpenShift application.
- A separate dialog allows you to pick among the applications you're currently running on your your Paas.
+ A separate dialog allows you to pick among the applications you're currently running on your PaaS.
<p>
<img src="images/wizard-select-existing.png" />
</p>
@@ -166,7 +166,7 @@
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
<b>Workspace project</b></td>
<td valign="top">
- When you create or import an OpenShift application, you may choose to either import it to a new <b>new project</b>
+ When you create or import an OpenShift application, you may choose to either import it into a <b>new project</b>
or to enable OpenShift for an <b>existing project</b> in your workspace.
We currently allow you to enable OpenShift for <b>Eclipse WTP</b> projects but we'll widen this up in upcoming releases.<br />
<p>
@@ -179,7 +179,7 @@
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
<b>OpenShift Maven Profile</b></td>
<td valign="top">
- When you enable OpenShift for an existing maven project in your workspace, we'll make shure it has the required
+ When you enable OpenShift for an existing maven project in your workspace, we'll make sure it has the required
maven <b>openshift</b> profile. We add it to the pom if it's not present yet.
<p>
<small>
@@ -203,22 +203,22 @@
Beta1 improves this a lot and allows you to exclusively create the server adapter.
Choose <b>Create a Server Adapter</b> in the
context menu of the <b>OpenShift Express Console</b> and here you go, you get a fresh adapter for your
- existing OpenShift applciation.
+ existing OpenShift application.
<p>
<img src="images/console-create-a-server-adapter.png" alt="create server adapter" />
</p>
- We always tried to stick to the Eclipse standards and therefore now also allow you to create the adapter like
+ We always try to stick to the Eclipse standards and therefore now also allow you to create the adapter like
any other Eclipse WTP server adapter. Choose the Eclipse <b>new server wizard</b> and pick the
<b>OpenShift Express Server</b>.
<p>
<img src="images/server-adapter-wizard.png" />
</p>
- The second wizard page configures all OpenShift specific settings: Your credentials, the OpenShift applicaton
+ The second wizard page configures all OpenShift specific settings: your credentials, the OpenShift application
and your workspace project.
<p>
<img src="images/server-adapter-wizard-2.png" />
</p>
- The new OpenShift Server Adapter is not bound to JBoss AS7 any more, it has it's own runtime.
+ The new OpenShift Server Adapter is not bound to JBoss AS7 any more, it has its own runtime.
You may therefore use it to publish to <b>any OpenShift application</b>. The prior limitation that restricted
you to publish to jbossas-7 applications only, is gone.
<p>
14 years
JBoss Tools SVN: r39436 - trunk/documentation/whatsnew.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-03-12 09:15:20 -0400 (Mon, 12 Mar 2012)
New Revision: 39436
Modified:
trunk/documentation/whatsnew/index.html
Log:
JBIDE-11011 remove core since not there yet
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2012-03-12 12:42:00 UTC (rev 39435)
+++ trunk/documentation/whatsnew/index.html 2012-03-12 13:15:20 UTC (rev 39436)
@@ -39,7 +39,10 @@
<p align="right"><b>3.3.0.Beta1</b>
<td valign="top">
- <p><a href="core/core-news-3.3.0.Beta1.html">Core/General</a></p>
+ <!-- <p><a
+ href="core/core-news-3.3.0.Beta1.html">Core/General</a></p>
+ -->
+
<p><a href="openshift/openshift-news-2.3.0.Beta1.html">OpenShift
Tools</a></p>
<p><a href="as/as-news-3.3.0.Beta1.html">JBoss AS Server
14 years
JBoss Tools SVN: r39435 - in trunk/documentation/whatsnew: openshift and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-03-12 08:42:00 -0400 (Mon, 12 Mar 2012)
New Revision: 39435
Added:
trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html
Removed:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Modified:
trunk/documentation/whatsnew/index.html
Log:
JBIDE-11011 added missing news to index.html
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2012-03-12 11:15:51 UTC (rev 39434)
+++ trunk/documentation/whatsnew/index.html 2012-03-12 12:42:00 UTC (rev 39435)
@@ -23,6 +23,8 @@
<html>
+
+
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
@@ -36,28 +38,31 @@
<td valign="top" align="left">
<p align="right"><b>3.3.0.Beta1</b>
<td valign="top">
- <!--
- <p><a href="core/core-news-3.3.0.M5.html">Core/General</a></p>
- <p><a href="openshift/openshift-news-2.3.0.M5.html">OpenShift
+
+ <p><a href="core/core-news-3.3.0.Beta1.html">Core/General</a></p>
+ <p><a href="openshift/openshift-news-2.3.0.Beta1.html">OpenShift
Tools</a></p>
- <p><a href="as/as-news-3.3.0.M5.html">JBoss AS Server
+ <p><a href="as/as-news-3.3.0.Beta1.html">JBoss AS Server
Tools</a></p>
- -->
+
<p><a href="jst/jst-news-3.3.0.Beta1.html">JST/JSF</a></p>
<p><a href="vpe/vpe-news-3.3.0.Beta1.html">Visual Page Editor</a></p>
<p><a href="cdi/cdi-news-3.3.0.Beta1.html">CDI/Seam 3 Tools</a></p>
- <!--
- <p><a href="forge/forge-news-3.3.0.M5.html">Forge Tools</a></p>
- <p><a href="hibernate/hibernate-news-3.5.0.M5.html">Hibernate Tools</a></p>
- <p><a href="examples/examples-news-3.3.0.M5.html">Project Examples</a></p>
- -->
+
+ <p><a href="forge/forge-news-3.3.0.Beta1.html">Forge Tools</a></p>
+ <p><a href="hibernate/hibernate-news-3.5.0.Beta1.html">Hibernate Tools</a></p>
+ <p><a href="examples/examples-news-3.3.0.Beta1.html">Project Examples</a></p>
+
<p><a href="seam/seam-news-3.3.0.Beta1.html">Seam 2 Tools</a></p>
+
<p><a href="maven/maven-news-3.3.0.Beta1.html">Maven Tools</a></p>
<p><a href="central/central-news-1.0.0.Beta1.html">JBoss Central</a></p>
+ <p><a href="usage/usage-news-3.3.0.Beta1.html">Usage</a></p>
+ <p><a href="ws/ws-news-1.2.2.Beta1.html">Webservices Tools</a></p>
+
<!--
<p><a href="teiid/teiid-news-7.6.html">Teiid Designer</a></p>
- <p><a href="ws/ws-news-1.2.2.M5.html">Webservices Tools</a></p>
- -->
+ -->
</td>
</tr>
<tr>
Copied: trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html (from rev 39433, trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html)
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html 2012-03-12 12:42:00 UTC (rev 39435)
@@ -0,0 +1,276 @@
+<?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">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>OpenShift Tools 2.3.0.M1 What's New</title>
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push([ '_setAccount', 'UA-17645367-5' ]);
+ _gaq.push([ '_trackPageview' ]);
+
+ (function() {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript';
+ ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl'
+ : 'http://www')
+ + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+<body>
+ <h1>OpenShift 2.3.0.Beta1 What's New</h1>
+
+ <p align="right">
+ <a href="../index.html">< Main Index</a> <a
+ href="../as/as-news-3.3.0.Beta1.html">Server Tools ></a>
+ </p>
+ <table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>General</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname3"></a>
+ <b>Complete overhaul</b>
+ </td>
+ <td valign="top">
+ Beta1 brought big changes to the <b>OpenShift Tools</b> in JBoss Tools. We tackled three times the amount of tickets we did in M5 (a total of 160).
+ We introduced the new <b>OpenShift Express console</b>, we split the single <b>wizard</b> into several ones with concise aims and
+ we brought a new <b>OpenShift Server adapter</b> with its own runtime. The new adapter may publish source and binary artifacts to the PaaS.
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>OpenShift Express Console</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname3"></a>
+ <b>OpenShift Express Console</b>
+ </td>
+ <td valign="top">
+ The central entry point is now what we call the <b>OpenShift Express console</b>.
+ It lists your accounts and applications. Actions in the context menu allow you manage your user accounts, domains, applications, embedded cartridges etc.<p>
+ <img src="images/openshift-console.png" alt="OpenShift Express Console" />
+ </p>
+ <br />
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10528">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Properties</b>
+ </td>
+ <td valign="top">Details to the item selected in the OpenShift console are shown in the <b>Properties view</b>
+ <p>
+ <img src="images/openshift-properties.png" alt="OpenShift Express Properties" />
+ </p>
+ <p>
+ <small> <a
+ href="https://issues.jboss.org/browse/JBIDE-10528">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>User passwords</b>
+ </td>
+ <td valign="top">
+ We now allow you to store your OpenShift user password in the <b>secure storage</b>.
+ You wont have to retype it over and over again.
+ <p>
+ <img src="images/secure-storage.png"/>
+ </p>
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10693">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Embedded cartridges</b>
+ </td>
+ <td valign="top">
+ You may now add or remove embedded cartridges for your applications. Beta1 offers it's own wizard for that sake.
+ <p>
+ <img src="images/edit-embedded-cartridges.png"/>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Creation and Import Wizards</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Create Application</b>
+ </td>
+ <td valign="top">
+ You may now create a new <b>OpenShift application</b> and import it to your workspace in a single hop.
+ Choose name, type, embedded cartridges and get over to the settings for your local project.
+ <p>
+ <img src="images/wizard-new-application.png"/>
+ </p>
+ </td>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Import Application</b></td>
+ <td valign="top">
+ When importing, the application creation wizard will preselect the application you've chosen in the express console.
+ <p>
+ <img src="images/wizard-import.png" />
+ </p>
+ You may of course also make up your mind and choose another OpenShift application.
+ A separate dialog allows you to pick among the applications you're currently running on your your Paas.
+ <p>
+ <img src="images/wizard-select-existing.png" />
+ </p>
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10479">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Workspace project</b></td>
+ <td valign="top">
+ When you create or import an OpenShift application, you may choose to either import it to a new <b>new project</b>
+ or to enable OpenShift for an <b>existing project</b> in your workspace.
+ We currently allow you to enable OpenShift for <b>Eclipse WTP</b> projects but we'll widen this up in upcoming releases.<br />
+ <p>
+ <img src="images/wizard-project.png" />
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>OpenShift Maven Profile</b></td>
+ <td valign="top">
+ When you enable OpenShift for an existing maven project in your workspace, we'll make shure it has the required
+ maven <b>openshift</b> profile. We add it to the pom if it's not present yet.
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10444">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>OpenShift Server</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>OpenShift Server Runtime</b></td>
+ <td valign="top">
+ In M5 the <b>server adapter</b> was only created when importing an OpenShift application.
+ Beta1 improves this a lot and allows you to exclusively create the server adapter.
+ Choose <b>Create a Server Adapter</b> in the
+ context menu of the <b>OpenShift Express Console</b> and here you go, you get a fresh adapter for your
+ existing OpenShift applciation.
+ <p>
+ <img src="images/console-create-a-server-adapter.png" alt="create server adapter" />
+ </p>
+ We always tried to stick to the Eclipse standards and therefore now also allow you to create the adapter like
+ any other Eclipse WTP server adapter. Choose the Eclipse <b>new server wizard</b> and pick the
+ <b>OpenShift Express Server</b>.
+ <p>
+ <img src="images/server-adapter-wizard.png" />
+ </p>
+ The second wizard page configures all OpenShift specific settings: Your credentials, the OpenShift applicaton
+ and your workspace project.
+ <p>
+ <img src="images/server-adapter-wizard-2.png" />
+ </p>
+ The new OpenShift Server Adapter is not bound to JBoss AS7 any more, it has it's own runtime.
+ You may therefore use it to publish to <b>any OpenShift application</b>. The prior limitation that restricted
+ you to publish to jbossas-7 applications only, is gone.
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10716">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>OpenShift Server Editor</b></td>
+ <td valign="top">
+ The <b>Server Editor</b> now reports all relevant informations that are involved when publishing the
+ workspace project to the OpenShift PaaS.
+ You'll find the project, the OpenShift application, the host, user name, git branch and deployments directory.
+ <p>
+ <img src="images/server-editor.png" />
+ </p>
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10700">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Source & Binary Deployment</b></td>
+ <td valign="top">
+ The new <b>OpenShift Server adapter</b> is now able to publish source and binary artifacts.
+ When you create the adapter, you bind it to a project in your workspace.
+ He'll (git) push any changes in the <b>source</b> of this project and publish them to the OpenShift application.
+ That's what we call the source publishing mode. <br/>
+ Given a <b>jbossas-7</b> application, you may also drag and drop projects to the adapter as
+ you always could with Eclipse WTP server adapters.
+ The adapter will build wars for these projects,
+ copy them to the <b>deployments</b> folder of your project (the project the adapter is bound to)
+ and push them to the OpenShift application. The JBoss AS7.1 will then pick those wars and deploy them.
+ This is what we call the <b>binary</b> mode where binary artifacts are published to OpenShift.
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10480">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ </table>
+</body>
+
+</html>
+
+
Deleted: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-12 11:15:51 UTC (rev 39434)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-12 12:42:00 UTC (rev 39435)
@@ -1,276 +0,0 @@
-<?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">
-<head>
-<meta http-equiv="Content-Language" content="en-us" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link rel="stylesheet" href="../whatsnew.css" />
-<title>OpenShift Tools 3.3.0.Beta1 What's New</title>
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push([ '_setAccount', 'UA-17645367-5' ]);
- _gaq.push([ '_trackPageview' ]);
-
- (function() {
- var ga = document.createElement('script');
- ga.type = 'text/javascript';
- ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl'
- : 'http://www')
- + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body>
- <h1>OpenShift 3.3.0.Beta1 What's New</h1>
-
- <p align="right">
- <a href="../index.html">< Main Index</a> <a
- href="../as/as-news-3.3.0.Beta1.html">Server Tools ></a>
- </p>
- <table border="0" cellpadding="10" cellspacing="0" width="80%">
-
- <tr>
- <td colspan="2">
- <hr />
- <h3>General</h3>
- <hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <a name="itemname3" id="itemname3"></a>
- <b>Complete overhaul</b>
- </td>
- <td valign="top">
- Beta1 brought big changes to the <b>OpenShift Tools</b> in JBoss Tools. We tackled three times the amount of tickets we did in M5 (a total of 160).
- We introduced the new <b>OpenShift Express console</b>, we split the single <b>wizard</b> into several ones with concise aims and
- we brought a new <b>OpenShift Server adapter</b> with its own runtime. The new adapter may publish source and binary artifacts to the PaaS.
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr />
- <h3>OpenShift Express Console</h3>
- <hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <a name="itemname3" id="itemname3"></a>
- <b>OpenShift Express Console</b>
- </td>
- <td valign="top">
- The central entry point is now what we call the <b>OpenShift Express console</b>.
- It lists your accounts and applications. Actions in the context menu allow you manage your user accounts, domains, applications, embedded cartridges etc.<p>
- <img src="images/openshift-console.png" alt="OpenShift Express Console" />
- </p>
- <br />
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10528">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Properties</b>
- </td>
- <td valign="top">Details to the item selected in the OpenShift console are shown in the <b>Properties view</b>
- <p>
- <img src="images/openshift-properties.png" alt="OpenShift Express Properties" />
- </p>
- <p>
- <small> <a
- href="https://issues.jboss.org/browse/JBIDE-10528">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>User passwords</b>
- </td>
- <td valign="top">
- We now allow you to store your OpenShift user password in the <b>secure storage</b>.
- You wont have to retype it over and over again.
- <p>
- <img src="images/secure-storage.png"/>
- </p>
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10693">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Embedded cartridges</b>
- </td>
- <td valign="top">
- You may now add or remove embedded cartridges for your applications. Beta1 offers it's own wizard for that sake.
- <p>
- <img src="images/edit-embedded-cartridges.png"/>
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr />
- <h3>Creation and Import Wizards</h3>
- <hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Create Application</b>
- </td>
- <td valign="top">
- You may now create a new <b>OpenShift application</b> and import it to your workspace in a single hop.
- Choose name, type, embedded cartridges and get over to the settings for your local project.
- <p>
- <img src="images/wizard-new-application.png"/>
- </p>
- </td>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Import Application</b></td>
- <td valign="top">
- When importing, the application creation wizard will preselect the application you've chosen in the express console.
- <p>
- <img src="images/wizard-import.png" />
- </p>
- You may of course also make up your mind and choose another OpenShift application.
- A separate dialog allows you to pick among the applications you're currently running on your your Paas.
- <p>
- <img src="images/wizard-select-existing.png" />
- </p>
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10479">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Workspace project</b></td>
- <td valign="top">
- When you create or import an OpenShift application, you may choose to either import it to a new <b>new project</b>
- or to enable OpenShift for an <b>existing project</b> in your workspace.
- We currently allow you to enable OpenShift for <b>Eclipse WTP</b> projects but we'll widen this up in upcoming releases.<br />
- <p>
- <img src="images/wizard-project.png" />
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>OpenShift Maven Profile</b></td>
- <td valign="top">
- When you enable OpenShift for an existing maven project in your workspace, we'll make shure it has the required
- maven <b>openshift</b> profile. We add it to the pom if it's not present yet.
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10444">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr />
- <h3>OpenShift Server</h3>
- <hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>OpenShift Server Runtime</b></td>
- <td valign="top">
- In M5 the <b>server adapter</b> was only created when importing an OpenShift application.
- Beta1 improves this a lot and allows you to exclusively create the server adapter.
- Choose <b>Create a Server Adapter</b> in the
- context menu of the <b>OpenShift Express Console</b> and here you go, you get a fresh adapter for your
- existing OpenShift applciation.
- <p>
- <img src="images/console-create-a-server-adapter.png" alt="create server adapter" />
- </p>
- We always tried to stick to the Eclipse standards and therefore now also allow you to create the adapter like
- any other Eclipse WTP server adapter. Choose the Eclipse <b>new server wizard</b> and pick the
- <b>OpenShift Express Server</b>.
- <p>
- <img src="images/server-adapter-wizard.png" />
- </p>
- The second wizard page configures all OpenShift specific settings: Your credentials, the OpenShift applicaton
- and your workspace project.
- <p>
- <img src="images/server-adapter-wizard-2.png" />
- </p>
- The new OpenShift Server Adapter is not bound to JBoss AS7 any more, it has it's own runtime.
- You may therefore use it to publish to <b>any OpenShift application</b>. The prior limitation that restricted
- you to publish to jbossas-7 applications only, is gone.
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10716">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>OpenShift Server Editor</b></td>
- <td valign="top">
- The <b>Server Editor</b> now reports all relevant informations that are involved when publishing the
- workspace project to the OpenShift PaaS.
- You'll find the project, the OpenShift application, the host, user name, git branch and deployments directory.
- <p>
- <img src="images/server-editor.png" />
- </p>
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10700">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr><td colspan="2"><hr/></td></tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Source & Binary Deployment</b></td>
- <td valign="top">
- The new <b>OpenShift Server adapter</b> is now able to publish source and binary artifacts.
- When you create the adapter, you bind it to a project in your workspace.
- He'll (git) push any changes in the <b>source</b> of this project and publish them to the OpenShift application.
- That's what we call the source publishing mode. <br/>
- Given a <b>jbossas-7</b> application, you may also drag and drop projects to the adapter as
- you always could with Eclipse WTP server adapters.
- The adapter will build wars for these projects,
- copy them to the <b>deployments</b> folder of your project (the project the adapter is bound to)
- and push them to the OpenShift application. The JBoss AS7.1 will then pick those wars and deploy them.
- This is what we call the <b>binary</b> mode where binary artifacts are published to OpenShift.
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10480">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- </table>
-</body>
-
-</html>
-
-
14 years
JBoss Tools SVN: r39434 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-03-12 07:15:51 -0400 (Mon, 12 Mar 2012)
New Revision: 39434
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryHelper.java
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryExecutor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryExecutor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryExecutor.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/HibernateExtension3_6.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
Log:
https://issues.jboss.org/browse/JBIDE-11226
Fix session factory not created problem
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -63,9 +63,10 @@
ConsoleConfiguration cfg = queryEditor.getConsoleConfiguration();
if (cfg != null) {
- if (!cfg.getHibernateExtension().isSessionFactoryCreated()) {
+ //keep states of ConsoleConfiguration and HibernateExtension synchronized
+ if (!(cfg.isSessionFactoryCreated() && cfg.getHibernateExtension().isSessionFactoryCreated())) {
if (queryEditor.askUserForConfiguration(cfg.getName())) {
- if (!cfg.getHibernateExtension().hasConfiguration()) {
+ if (!(cfg.hasConfiguration() && cfg.getHibernateExtension().hasConfiguration())) {
try {
cfg.build();
} catch (HibernateException he) {
@@ -75,8 +76,8 @@
' ' + cfg.getName(), he);
}
}
- if (cfg.getHibernateExtension().hasConfiguration()) {
- cfg.getHibernateExtension().buildSessionFactory();
+ if (cfg.hasConfiguration() && cfg.getHibernateExtension().hasConfiguration()) {
+ cfg.buildSessionFactory();
queryEditor.executeQuery(cfg);
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -46,6 +46,7 @@
import org.hibernate.SessionFactory;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.ext.HibernateExtension;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.utils.QLFormatHelper;
import org.hibernate.eclipse.hqleditor.HQLEditor;
@@ -116,7 +117,10 @@
}
}
private void setCurrentEditor(HQLEditor editor) {
- if(editor==currentEditor) return;
+ if(editor==currentEditor) {
+ updateText(currentEditor);
+ return;
+ }
if(currentEditor!=null) {
reconciler.uninstall();
}
@@ -139,8 +143,9 @@
if(StringHelper.isEmpty( editor.getQueryString() )) {
textViewer.getDocument().set( HibernateConsoleMessages.DynamicSQLPreviewView_empty_hql_query );
} else if(consoleConfiguration!=null) {
- if(consoleConfiguration.isSessionFactoryCreated()) {
- String generateSQL = generateSQL(consoleConfiguration.getExecutionContext(), consoleConfiguration.getSessionFactory(), editor.getQueryString());
+ HibernateExtension hibernateExtension = consoleConfiguration.getHibernateExtension();
+ if(hibernateExtension.isSessionFactoryCreated()) {
+ String generateSQL = hibernateExtension.generateSQL(editor.getQueryString());
if(StringHelper.isEmpty( generateSQL )) {
textViewer.getDocument().set( HibernateConsoleMessages.DynamicSQLPreviewView_no_sql_generated );
} else {
@@ -158,74 +163,6 @@
}
}
- public String generateSQL(ExecutionContext context, final SessionFactory sf, final String query) {
-
- if(StringHelper.isEmpty(query)) return ""; //$NON-NLS-1$
-
- String result;
-
- result = (String) context.execute(new ExecutionContext.Command() {
- public Object execute() {
- try {
- SessionFactoryImpl sfimpl = (SessionFactoryImpl) sf; // hack - to get to the actual queries..
- StringBuffer str = new StringBuffer(256);
- HQLQueryPlan plan = new HQLQueryPlan(query, false, Collections.EMPTY_MAP, sfimpl);
-
- QueryTranslator[] translators = plan.getTranslators();
- for (int i = 0; i < translators.length; i++) {
- QueryTranslator translator = translators[i];
- if(translator.isManipulationStatement()) {
- str.append(HibernateConsoleMessages.DynamicSQLPreviewView_manipulation_of + i + ":"); //$NON-NLS-1$
- Iterator<?> iterator = translator.getQuerySpaces().iterator();
- while ( iterator.hasNext() ) {
- Object qspace = iterator.next();
- str.append(qspace);
- if(iterator.hasNext()) { str.append(", "); } //$NON-NLS-1$
- }
-
- } else {
- Type[] returnTypes = translator.getReturnTypes();
- str.append(i +": "); //$NON-NLS-1$
- for (int j = 0; j < returnTypes.length; j++) {
- Type returnType = returnTypes[j];
- str.append(returnType.getName());
- if(j<returnTypes.length-1) { str.append(", "); } //$NON-NLS-1$
- }
- }
- str.append("\n-----------------\n"); //$NON-NLS-1$
- Iterator<?> sqls = translator.collectSqlStrings().iterator();
- while ( sqls.hasNext() ) {
- String sql = (String) sqls.next();
- str.append(QLFormatHelper.formatForScreen(sql));
- str.append("\n\n"); //$NON-NLS-1$
- }
- }
- return str.toString();
- } catch(Throwable t) {
- //StringWriter sw = new StringWriter();
- StringBuffer msgs = new StringBuffer();
-
- Throwable cause = t;
- while(cause!=null) {
- msgs.append(t);
- if(cause.getCause()==cause) {
- cause=null;
- } else {
- cause = cause.getCause();
- if(cause!=null) msgs.append(HibernateConsoleMessages.DynamicSQLPreviewView_caused_by);
- }
- }
- //t.printStackTrace(new PrintWriter(sw));
- //return sw.getBuffer().toString();
- return msgs.toString();
- }
-
- }
- });
-
- return result;
- }
-
public void createPartControl(Composite parent) {
textViewer = new HQLSourceViewer( parent, new VerticalRuler(1), null, false, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL );
//textViewer.setEditable(false);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -73,7 +73,7 @@
try {
try {
session = sessionFactory.openSession();
- return QueryExecutor.executeHQLQuery(session, hql, queryParameters);
+ return QueryHelper.executeHQLQuery(session, hql, queryParameters);
} catch (Throwable e){
//Incompatible library versions could throw subclasses of Error, like AbstractMethodError
//may be there is a sense to say to user that the reason is probably a wrong CC version
@@ -98,7 +98,7 @@
try {
try {
session = sessionFactory.openSession();
- return QueryExecutor.executeCriteriaQuery(session, criteriaCode, model);
+ return QueryHelper.executeCriteriaQuery(session, criteriaCode, model);
} catch (Throwable e){
//Incompatible library versions could throw subclasses of Error, like AbstractMethodError
//may be there is a sense to say to user that the reason is probably a wrong CC version
@@ -320,4 +320,8 @@
public boolean isSessionFactoryCreated() {
return sessionFactory != null;
}
+
+ public String generateSQL(final String query) {
+ return QueryHelper.generateSQL(executionContext, sessionFactory, query);
+ }
}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryExecutor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryExecutor.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryExecutor.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate3_5;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.Criteria;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.ConsoleQueryParameter;
-import org.hibernate.console.QueryInputModel;
-import org.hibernate.console.ext.HibernateException;
-import org.hibernate.console.ext.QueryResult;
-import org.hibernate.console.ext.QueryResultImpl;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.type.Type;
-
-import bsh.EvalError;
-import bsh.Interpreter;
-
-/**
- * @author Dmitry Geraskov
- *
- */
-public class QueryExecutor {
-
- public static QueryResult executeHQLQuery(Session session, String hql,
- QueryInputModel queryParameters) {
-
- Query query = session.createQuery(hql);
- List<Object> list = Collections.emptyList();
- long queryTime = 0;
-
- list = new ArrayList<Object>();
- setupParameters(query, queryParameters);
- long startTime = System.currentTimeMillis();
- QueryResultImpl result = new QueryResultImpl(list,
- queryTime);
- try {
- Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
- queryTime = System.currentTimeMillis() - startTime;
- while (iter.hasNext() ) {
- Object element = iter.next();
- list.add(element);
- }
- result.setPathNames(getHQLPathNames(query));
- } catch (HibernateException e){
- result.addException(e);
- }
- return result;
-
- }
-
- public static QueryResult executeCriteriaQuery(Session session, String criteriaCode,
- QueryInputModel model) {
-
- try {
- List<Object> list = Collections.emptyList();
- long queryTime = 0;
- if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
- return new QueryResultImpl(new IllegalArgumentException(
- ConsoleMessages.JavaPage_not_allowed));
- } else {
- Interpreter ip = setupInterpreter(session);
- Object o = ip.eval(criteriaCode);
- // ugly! TODO: make un-ugly!
- if (o instanceof Criteria) {
- Criteria criteria = (Criteria) o;
- if (model.getMaxResults() != null) {
- criteria.setMaxResults(model.getMaxResults().intValue());
- }
-
- long startTime = System.currentTimeMillis();
- list = criteria.list();
- queryTime = System.currentTimeMillis() - startTime;
- } else if (o instanceof List<?>) {
- list = (List<Object>) o;
- if (model.getMaxResults() != null) {
- list = list.subList(0, Math.min(list.size(), model
- .getMaxResults().intValue()));
- }
- } else {
- list = new ArrayList<Object>();
- list.add(o);
- }
- }
- return new QueryResultImpl(list,
- Collections.singletonList(ConsoleMessages.JavaPage_no_info), queryTime);
- } catch (EvalError e) {
- return new QueryResultImpl(e);
- } catch (HibernateException e) {
- return new QueryResultImpl(e);
- }
- }
-
- private static List<String> getHQLPathNames(Query query) {
- List<String> l = Collections.emptyList();
-
- if(query==null) return l;
- String[] returnAliases = null;
- try {
- returnAliases = query.getReturnAliases();
- } catch(NullPointerException e) {
- // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- if(returnAliases==null) {
- Type[] t;
- try {
- t = query.getReturnTypes();
- } catch(NullPointerException npe) {
- t = new Type[] { null };
- // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- l = new ArrayList<String>(t.length);
-
- for (int i = 0; i < t.length; i++) {
- Type type = t[i];
- if(type==null) {
- l.add("<multiple types>"); //$NON-NLS-1$
- } else {
- l.add(type.getName() );
- }
- }
- } else {
- String[] t = returnAliases;
- l = new ArrayList<String>(t.length);
-
- for (int i = 0; i < t.length; i++) {
- l.add(t[i]);
- }
- }
-
- return l;
- }
-
- private static void setupParameters(Query query2, QueryInputModel model) {
- if(model.getMaxResults()!=null) {
- query2.setMaxResults( model.getMaxResults().intValue() );
- }
- ConsoleQueryParameter[] qp = model.getQueryParameters();
- for (int i = 0; i < qp.length; i++) {
- ConsoleQueryParameter parameter = qp[i];
-
- try {
- int pos = Integer.parseInt(parameter.getName());
- //FIXME no method to set positioned list value
- query2.setParameter(pos, calcValue( parameter ), parameter.getType());
- } catch(NumberFormatException nfe) {
- Object value = parameter.getValue();
- if (value != null && value.getClass().isArray()){
- Object[] values = (Object[])value;
- query2.setParameterList(parameter.getName(), Arrays.asList(values), parameter.getType());
- } else {
- query2.setParameter(parameter.getName(), calcValue( parameter ), parameter.getType());
- }
- }
- }
- }
-
- private static Object calcValue(ConsoleQueryParameter parameter) {
- return parameter.getValueForQuery();
- }
-
-
- private static Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
- Interpreter interpreter = new Interpreter();
-
- interpreter.set("session", session); //$NON-NLS-1$
- interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
- SessionImplementor si = (SessionImplementor)session;
-
- Map<String, ?> map = si.getFactory().getAllClassMetadata();
-
- Iterator<String> iterator = map.keySet().iterator();
- //TODO: filter non classes.
- String imports = ""; //$NON-NLS-1$
- while (iterator.hasNext() ) {
- String element = iterator.next();
- imports += "import " + element + ";\n"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
- imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
- // TODO: expose the parameters as values to be used in the code.
- interpreter.eval(imports);
-
- return interpreter;
- }
-
-}
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryHelper.java (from rev 38910, trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryExecutor.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryHelper.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/QueryHelper.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -0,0 +1,275 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate3_5;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.ConsoleQueryParameter;
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.QueryResult;
+import org.hibernate.console.ext.QueryResultImpl;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.QLFormatHelper;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.engine.query.HQLQueryPlan;
+import org.hibernate.hql.QueryTranslator;
+import org.hibernate.impl.SessionFactoryImpl;
+import org.hibernate.type.Type;
+import org.hibernate.util.xpl.StringHelper;
+
+import bsh.EvalError;
+import bsh.Interpreter;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class QueryHelper {
+
+ public static QueryResult executeHQLQuery(Session session, String hql,
+ QueryInputModel queryParameters) {
+
+ Query query = session.createQuery(hql);
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+
+ list = new ArrayList<Object>();
+ setupParameters(query, queryParameters);
+ long startTime = System.currentTimeMillis();
+ QueryResultImpl result = new QueryResultImpl(list,
+ queryTime);
+ try {
+ Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ result.setPathNames(getHQLPathNames(query));
+ } catch (HibernateException e){
+ result.addException(e);
+ }
+ return result;
+
+ }
+
+ public static QueryResult executeCriteriaQuery(Session session, String criteriaCode,
+ QueryInputModel model) {
+
+ try {
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+ if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
+ return new QueryResultImpl(new IllegalArgumentException(
+ ConsoleMessages.JavaPage_not_allowed));
+ } else {
+ Interpreter ip = setupInterpreter(session);
+ Object o = ip.eval(criteriaCode);
+ // ugly! TODO: make un-ugly!
+ if (o instanceof Criteria) {
+ Criteria criteria = (Criteria) o;
+ if (model.getMaxResults() != null) {
+ criteria.setMaxResults(model.getMaxResults().intValue());
+ }
+
+ long startTime = System.currentTimeMillis();
+ list = criteria.list();
+ queryTime = System.currentTimeMillis() - startTime;
+ } else if (o instanceof List<?>) {
+ list = (List<Object>) o;
+ if (model.getMaxResults() != null) {
+ list = list.subList(0, Math.min(list.size(), model
+ .getMaxResults().intValue()));
+ }
+ } else {
+ list = new ArrayList<Object>();
+ list.add(o);
+ }
+ }
+ return new QueryResultImpl(list,
+ Collections.singletonList(ConsoleMessages.JavaPage_no_info), queryTime);
+ } catch (EvalError e) {
+ return new QueryResultImpl(e);
+ } catch (HibernateException e) {
+ return new QueryResultImpl(e);
+ }
+ }
+
+ private static List<String> getHQLPathNames(Query query) {
+ List<String> l = Collections.emptyList();
+
+ if(query==null) return l;
+ String[] returnAliases = null;
+ try {
+ returnAliases = query.getReturnAliases();
+ } catch(NullPointerException e) {
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ if(returnAliases==null) {
+ Type[] t;
+ try {
+ t = query.getReturnTypes();
+ } catch(NullPointerException npe) {
+ t = new Type[] { null };
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ Type type = t[i];
+ if(type==null) {
+ l.add("<multiple types>"); //$NON-NLS-1$
+ } else {
+ l.add(type.getName() );
+ }
+ }
+ } else {
+ String[] t = returnAliases;
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ l.add(t[i]);
+ }
+ }
+
+ return l;
+ }
+
+ private static void setupParameters(Query query2, QueryInputModel model) {
+ if(model.getMaxResults()!=null) {
+ query2.setMaxResults( model.getMaxResults().intValue() );
+ }
+ ConsoleQueryParameter[] qp = model.getQueryParameters();
+ for (int i = 0; i < qp.length; i++) {
+ ConsoleQueryParameter parameter = qp[i];
+
+ try {
+ int pos = Integer.parseInt(parameter.getName());
+ //FIXME no method to set positioned list value
+ query2.setParameter(pos, calcValue( parameter ), parameter.getType());
+ } catch(NumberFormatException nfe) {
+ Object value = parameter.getValue();
+ if (value != null && value.getClass().isArray()){
+ Object[] values = (Object[])value;
+ query2.setParameterList(parameter.getName(), Arrays.asList(values), parameter.getType());
+ } else {
+ query2.setParameter(parameter.getName(), calcValue( parameter ), parameter.getType());
+ }
+ }
+ }
+ }
+
+ private static Object calcValue(ConsoleQueryParameter parameter) {
+ return parameter.getValueForQuery();
+ }
+
+
+ private static Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
+ Interpreter interpreter = new Interpreter();
+
+ interpreter.set("session", session); //$NON-NLS-1$
+ interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
+ SessionImplementor si = (SessionImplementor)session;
+
+ Map<String, ?> map = si.getFactory().getAllClassMetadata();
+
+ Iterator<String> iterator = map.keySet().iterator();
+ //TODO: filter non classes.
+ String imports = ""; //$NON-NLS-1$
+ while (iterator.hasNext() ) {
+ String element = iterator.next();
+ imports += "import " + element + ";\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
+ imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
+ // TODO: expose the parameters as values to be used in the code.
+ interpreter.eval(imports);
+
+ return interpreter;
+ }
+
+ static String generateSQL(ExecutionContext executionContext, final SessionFactory sessionFactory, final String query) {
+
+ if(StringHelper.isEmpty(query)) return ""; //$NON-NLS-1$
+
+ String result = (String) executionContext.execute(new ExecutionContext.Command() {
+ public Object execute() {
+ try {
+ SessionFactoryImpl sfimpl = (SessionFactoryImpl) sessionFactory; // hack - to get to the actual queries..
+ StringBuffer str = new StringBuffer(256);
+ HQLQueryPlan plan = new HQLQueryPlan(query, false, Collections.EMPTY_MAP, sfimpl);
+
+ QueryTranslator[] translators = plan.getTranslators();
+ for (int i = 0; i < translators.length; i++) {
+ QueryTranslator translator = translators[i];
+ if(translator.isManipulationStatement()) {
+ str.append(HibernateConsoleMessages.DynamicSQLPreviewView_manipulation_of + i + ":"); //$NON-NLS-1$
+ Iterator<?> iterator = translator.getQuerySpaces().iterator();
+ while ( iterator.hasNext() ) {
+ Object qspace = iterator.next();
+ str.append(qspace);
+ if(iterator.hasNext()) { str.append(", "); } //$NON-NLS-1$
+ }
+
+ } else {
+ Type[] returnTypes = translator.getReturnTypes();
+ str.append(i +": "); //$NON-NLS-1$
+ for (int j = 0; j < returnTypes.length; j++) {
+ Type returnType = returnTypes[j];
+ str.append(returnType.getName());
+ if(j<returnTypes.length-1) { str.append(", "); } //$NON-NLS-1$
+ }
+ }
+ str.append("\n-----------------\n"); //$NON-NLS-1$
+ Iterator<?> sqls = translator.collectSqlStrings().iterator();
+ while ( sqls.hasNext() ) {
+ String sql = (String) sqls.next();
+ str.append(QLFormatHelper.formatForScreen(sql));
+ str.append("\n\n"); //$NON-NLS-1$
+ }
+ }
+ return str.toString();
+ } catch(Throwable t) {
+ StringBuffer msgs = new StringBuffer();
+
+ Throwable cause = t;
+ while(cause!=null) {
+ msgs.append(t);
+ if(cause.getCause()==cause) {
+ cause=null;
+ } else {
+ cause = cause.getCause();
+ if(cause!=null) msgs.append(HibernateConsoleMessages.DynamicSQLPreviewView_caused_by);
+ }
+ }
+ return msgs.toString();
+ }
+
+ }
+ });
+
+ return result;
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/HibernateExtension3_6.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/HibernateExtension3_6.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/HibernateExtension3_6.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -71,7 +71,7 @@
try {
try {
session = sessionFactory.openSession();
- return QueryExecutor.executeHQLQuery(this, session, hql, queryParameters);
+ return QueryHelper.executeHQLQuery(this, session, hql, queryParameters);
} catch (Throwable e){
//Incompatible library versions could throw subclasses of Error, like AbstractMethodError
//may be there is a sense to say to user that the reason is probably a wrong CC version
@@ -98,7 +98,7 @@
try {
try {
session = sessionFactory.openSession();
- return QueryExecutor.executeCriteriaQuery(session, criteriaCode, model);
+ return QueryHelper.executeCriteriaQuery(session, criteriaCode, model);
} catch (Throwable e){
//Incompatible library versions could throw subclasses of Error, like AbstractMethodError
//may be there is a sense to say to user that the reason is probably a wrong CC version
@@ -238,6 +238,10 @@
return prefs.getName();
}
+ public ExecutionContext getExecutionContext() {
+ return executionContext;
+ }
+
public Object execute(Command c) {
if (executionContext != null) {
return executionContext.execute(c);
@@ -323,4 +327,8 @@
public boolean isSessionFactoryCreated() {
return sessionFactory != null;
}
+
+ public String generateSQL(final String query) {
+ return QueryHelper.generateSQL(executionContext, sessionFactory, query);
+ }
}
\ No newline at end of file
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryExecutor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryExecutor.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryExecutor.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate3_6;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.Criteria;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.ConsoleQueryParameter;
-import org.hibernate.console.HibernateConsoleRuntimeException;
-import org.hibernate.console.QueryInputModel;
-import org.hibernate.console.execution.ExecutionContext.Command;
-import org.hibernate.console.ext.HibernateException;
-import org.hibernate.console.ext.HibernateExtension;
-import org.hibernate.console.ext.QueryResult;
-import org.hibernate.console.ext.QueryResultImpl;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.type.Type;
-import org.hibernate.util.ReflectHelper;
-
-import bsh.EvalError;
-import bsh.Interpreter;
-
-/**
- * @author Dmitry Geraskov
- *
- */
-public class QueryExecutor {
-
- public static QueryResult executeHQLQuery(HibernateExtension hibernateExtension, Session session, String hql,
- final QueryInputModel queryParameters) {
-
- final Query query = session.createQuery(hql);
- List<Object> list = Collections.emptyList();
- long queryTime = 0;
-
- list = new ArrayList<Object>();
- hibernateExtension.execute(new Command() {
-
- @Override
- public Object execute() {
- setupParameters(query, queryParameters);
- return null;
- }
- });
-
- long startTime = System.currentTimeMillis();
- QueryResultImpl result = new QueryResultImpl(list,
- queryTime);
- try {
- Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
- queryTime = System.currentTimeMillis() - startTime;
- while (iter.hasNext() ) {
- Object element = iter.next();
- list.add(element);
- }
- result.setPathNames(getHQLPathNames(query));
- } catch (HibernateException e){
- result.addException(e);
- }
- return result;
-
- }
-
- public static QueryResult executeCriteriaQuery(Session session, String criteriaCode,
- QueryInputModel model) {
-
- try {
- List<Object> list = Collections.emptyList();
- long queryTime = 0;
- if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
- return new QueryResultImpl(new IllegalArgumentException(
- ConsoleMessages.JavaPage_not_allowed));
- } else {
- Interpreter ip = setupInterpreter(session);
- Object o = ip.eval(criteriaCode);
- // ugly! TODO: make un-ugly!
- if (o instanceof Criteria) {
- Criteria criteria = (Criteria) o;
- if (model.getMaxResults() != null) {
- criteria.setMaxResults(model.getMaxResults().intValue());
- }
-
- long startTime = System.currentTimeMillis();
- list = criteria.list();
- queryTime = System.currentTimeMillis() - startTime;
- } else if (o instanceof List<?>) {
- list = (List<Object>) o;
- if (model.getMaxResults() != null) {
- list = list.subList(0, Math.min(list.size(), model
- .getMaxResults().intValue()));
- }
- } else {
- list = new ArrayList<Object>();
- list.add(o);
- }
- }
- return new QueryResultImpl(list,
- Collections.singletonList(ConsoleMessages.JavaPage_no_info), queryTime);
- } catch (EvalError e) {
- return new QueryResultImpl(e);
- } catch (HibernateException e) {
- return new QueryResultImpl(e);
- }
- }
-
- private static List<String> getHQLPathNames(Query query) {
- List<String> l = Collections.emptyList();
-
- if(query==null) return l;
- String[] returnAliases = null;
- try {
- returnAliases = query.getReturnAliases();
- } catch(NullPointerException e) {
- // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- if(returnAliases==null) {
- Type[] t;
- try {
- t = query.getReturnTypes();
- } catch(NullPointerException npe) {
- t = new Type[] { null };
- // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- l = new ArrayList<String>(t.length);
-
- for (int i = 0; i < t.length; i++) {
- Type type = t[i];
- if(type==null) {
- l.add("<multiple types>"); //$NON-NLS-1$
- } else {
- l.add(type.getName() );
- }
- }
- } else {
- String[] t = returnAliases;
- l = new ArrayList<String>(t.length);
-
- for (int i = 0; i < t.length; i++) {
- l.add(t[i]);
- }
- }
-
- return l;
- }
-
- private static void setupParameters(Query query2, QueryInputModel model) {
- if(model.getMaxResults()!=null) {
- query2.setMaxResults( model.getMaxResults().intValue() );
- }
- ConsoleQueryParameter[] qp = model.getQueryParameters();
- for (int i = 0; i < qp.length; i++) {
- ConsoleQueryParameter parameter = qp[i];
-
- String typeName = parameter.getType().getClass().getName();
- try {
- int pos = Integer.parseInt(parameter.getName());
- //FIXME no method to set positioned list value
- query2.setParameter(pos, calcValue( parameter ), convertToType(typeName));
- } catch(NumberFormatException nfe) {
- Object value = parameter.getValue();
- if (value != null && value.getClass().isArray()){
- Object[] values = (Object[])value;
- query2.setParameterList(parameter.getName(), Arrays.asList(values), convertToType(typeName));
- } else {
- query2.setParameter(parameter.getName(), calcValue( parameter ), convertToType(typeName));
- }
- }
- }
- }
-
- /**
- * Method converts Hibernate3 to Hibernate3_6 classes
- * @param typeClassName
- * @return
- */
- private static Type convertToType(String typeClassName){
- try {
- return (Type) ReflectHelper.classForName(typeClassName).newInstance();
- } catch (Exception e) {
- throw new HibernateConsoleRuntimeException("Can't instantiate hibernate type " + typeClassName, e);
- }
- }
-
- private static Object calcValue(ConsoleQueryParameter parameter) {
- return parameter.getValueForQuery();
- }
-
-
- private static Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
- Interpreter interpreter = new Interpreter();
-
- interpreter.set("session", session); //$NON-NLS-1$
- interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
- SessionImplementor si = (SessionImplementor)session;
-
- Map<String, ?> map = si.getFactory().getAllClassMetadata();
-
- Iterator<String> iterator = map.keySet().iterator();
- //TODO: filter non classes.
- String imports = ""; //$NON-NLS-1$
- while (iterator.hasNext() ) {
- String element = iterator.next();
- imports += "import " + element + ";\n"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
- imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
- // TODO: expose the parameters as values to be used in the code.
- interpreter.eval(imports);
-
- return interpreter;
- }
-
-}
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryHelper.java (from rev 39050, trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryExecutor.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryHelper.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_6/src/org/jboss/tools/hibernate3_6/QueryHelper.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate3_6;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.ConsoleQueryParameter;
+import org.hibernate.console.HibernateConsoleRuntimeException;
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.console.ext.QueryResult;
+import org.hibernate.console.ext.QueryResultImpl;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.QLFormatHelper;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.engine.query.HQLQueryPlan;
+import org.hibernate.hql.QueryTranslator;
+import org.hibernate.impl.SessionFactoryImpl;
+import org.hibernate.type.Type;
+import org.hibernate.util.ReflectHelper;
+import org.hibernate.util.xpl.StringHelper;
+
+import bsh.EvalError;
+import bsh.Interpreter;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class QueryHelper {
+
+ public static QueryResult executeHQLQuery(HibernateExtension hibernateExtension, Session session, String hql,
+ final QueryInputModel queryParameters) {
+
+ final Query query = session.createQuery(hql);
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+
+ list = new ArrayList<Object>();
+ hibernateExtension.execute(new Command() {
+
+ @Override
+ public Object execute() {
+ setupParameters(query, queryParameters);
+ return null;
+ }
+ });
+
+ long startTime = System.currentTimeMillis();
+ QueryResultImpl result = new QueryResultImpl(list,
+ queryTime);
+ try {
+ Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ result.setPathNames(getHQLPathNames(query));
+ } catch (HibernateException e){
+ result.addException(e);
+ }
+ return result;
+
+ }
+
+ public static QueryResult executeCriteriaQuery(Session session, String criteriaCode,
+ QueryInputModel model) {
+
+ try {
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+ if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
+ return new QueryResultImpl(new IllegalArgumentException(
+ ConsoleMessages.JavaPage_not_allowed));
+ } else {
+ Interpreter ip = setupInterpreter(session);
+ Object o = ip.eval(criteriaCode);
+ // ugly! TODO: make un-ugly!
+ if (o instanceof Criteria) {
+ Criteria criteria = (Criteria) o;
+ if (model.getMaxResults() != null) {
+ criteria.setMaxResults(model.getMaxResults().intValue());
+ }
+
+ long startTime = System.currentTimeMillis();
+ list = criteria.list();
+ queryTime = System.currentTimeMillis() - startTime;
+ } else if (o instanceof List<?>) {
+ list = (List<Object>) o;
+ if (model.getMaxResults() != null) {
+ list = list.subList(0, Math.min(list.size(), model
+ .getMaxResults().intValue()));
+ }
+ } else {
+ list = new ArrayList<Object>();
+ list.add(o);
+ }
+ }
+ return new QueryResultImpl(list,
+ Collections.singletonList(ConsoleMessages.JavaPage_no_info), queryTime);
+ } catch (EvalError e) {
+ return new QueryResultImpl(e);
+ } catch (HibernateException e) {
+ return new QueryResultImpl(e);
+ }
+ }
+
+ private static List<String> getHQLPathNames(Query query) {
+ List<String> l = Collections.emptyList();
+
+ if(query==null) return l;
+ String[] returnAliases = null;
+ try {
+ returnAliases = query.getReturnAliases();
+ } catch(NullPointerException e) {
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ if(returnAliases==null) {
+ Type[] t;
+ try {
+ t = query.getReturnTypes();
+ } catch(NullPointerException npe) {
+ t = new Type[] { null };
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ Type type = t[i];
+ if(type==null) {
+ l.add("<multiple types>"); //$NON-NLS-1$
+ } else {
+ l.add(type.getName() );
+ }
+ }
+ } else {
+ String[] t = returnAliases;
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ l.add(t[i]);
+ }
+ }
+
+ return l;
+ }
+
+ private static void setupParameters(Query query2, QueryInputModel model) {
+ if(model.getMaxResults()!=null) {
+ query2.setMaxResults( model.getMaxResults().intValue() );
+ }
+ ConsoleQueryParameter[] qp = model.getQueryParameters();
+ for (int i = 0; i < qp.length; i++) {
+ ConsoleQueryParameter parameter = qp[i];
+
+ String typeName = parameter.getType().getClass().getName();
+ try {
+ int pos = Integer.parseInt(parameter.getName());
+ //FIXME no method to set positioned list value
+ query2.setParameter(pos, calcValue( parameter ), convertToType(typeName));
+ } catch(NumberFormatException nfe) {
+ Object value = parameter.getValue();
+ if (value != null && value.getClass().isArray()){
+ Object[] values = (Object[])value;
+ query2.setParameterList(parameter.getName(), Arrays.asList(values), convertToType(typeName));
+ } else {
+ query2.setParameter(parameter.getName(), calcValue( parameter ), convertToType(typeName));
+ }
+ }
+ }
+ }
+
+ /**
+ * Method converts Hibernate3 to Hibernate3_6 classes
+ * @param typeClassName
+ * @return
+ */
+ private static Type convertToType(String typeClassName){
+ try {
+ return (Type) ReflectHelper.classForName(typeClassName).newInstance();
+ } catch (Exception e) {
+ throw new HibernateConsoleRuntimeException("Can't instantiate hibernate type " + typeClassName, e);
+ }
+ }
+
+ private static Object calcValue(ConsoleQueryParameter parameter) {
+ return parameter.getValueForQuery();
+ }
+
+
+ private static Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
+ Interpreter interpreter = new Interpreter();
+
+ interpreter.set("session", session); //$NON-NLS-1$
+ interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
+ SessionImplementor si = (SessionImplementor)session;
+
+ Map<String, ?> map = si.getFactory().getAllClassMetadata();
+
+ Iterator<String> iterator = map.keySet().iterator();
+ //TODO: filter non classes.
+ String imports = ""; //$NON-NLS-1$
+ while (iterator.hasNext() ) {
+ String element = iterator.next();
+ imports += "import " + element + ";\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
+ imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
+ // TODO: expose the parameters as values to be used in the code.
+ interpreter.eval(imports);
+
+ return interpreter;
+ }
+
+ static String generateSQL(ExecutionContext executionContext, final SessionFactory sessionFactory, final String query) {
+
+ if(StringHelper.isEmpty(query)) return ""; //$NON-NLS-1$
+
+ String result = (String) executionContext.execute(new ExecutionContext.Command() {
+ public Object execute() {
+ try {
+ SessionFactoryImpl sfimpl = (SessionFactoryImpl) sessionFactory; // hack - to get to the actual queries..
+ StringBuffer str = new StringBuffer(256);
+ HQLQueryPlan plan = new HQLQueryPlan(query, false, Collections.EMPTY_MAP, sfimpl);
+
+ QueryTranslator[] translators = plan.getTranslators();
+ for (int i = 0; i < translators.length; i++) {
+ QueryTranslator translator = translators[i];
+ if(translator.isManipulationStatement()) {
+ str.append(HibernateConsoleMessages.DynamicSQLPreviewView_manipulation_of + i + ":"); //$NON-NLS-1$
+ Iterator<?> iterator = translator.getQuerySpaces().iterator();
+ while ( iterator.hasNext() ) {
+ Object qspace = iterator.next();
+ str.append(qspace);
+ if(iterator.hasNext()) { str.append(", "); } //$NON-NLS-1$
+ }
+
+ } else {
+ Type[] returnTypes = translator.getReturnTypes();
+ str.append(i +": "); //$NON-NLS-1$
+ for (int j = 0; j < returnTypes.length; j++) {
+ Type returnType = returnTypes[j];
+ str.append(returnType.getName());
+ if(j<returnTypes.length-1) { str.append(", "); } //$NON-NLS-1$
+ }
+ }
+ str.append("\n-----------------\n"); //$NON-NLS-1$
+ Iterator<?> sqls = translator.collectSqlStrings().iterator();
+ while ( sqls.hasNext() ) {
+ String sql = (String) sqls.next();
+ str.append(QLFormatHelper.formatForScreen(sql));
+ str.append("\n\n"); //$NON-NLS-1$
+ }
+ }
+ return str.toString();
+ } catch(Throwable t) {
+ StringBuffer msgs = new StringBuffer();
+
+ Throwable cause = t;
+ while(cause!=null) {
+ msgs.append(t);
+ if(cause.getCause()==cause) {
+ cause=null;
+ } else {
+ cause = cause.getCause();
+ if(cause!=null) msgs.append(HibernateConsoleMessages.DynamicSQLPreviewView_caused_by);
+ }
+ }
+ return msgs.toString();
+ }
+
+ }
+ });
+
+ return result;
+ }
+
+
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -15,6 +15,7 @@
import java.security.PrivilegedAction;
import java.sql.DriverManager;
import java.sql.SQLException;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -36,9 +37,16 @@
import org.hibernate.console.ext.QueryResultImpl;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.PreferencesClassPathUtils;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.QLFormatHelper;
+import org.hibernate.engine.query.spi.HQLQueryPlan;
+import org.hibernate.hql.spi.QueryTranslator;
+import org.hibernate.internal.SessionFactoryImpl;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.service.internal.StandardServiceRegistryImpl;
+import org.hibernate.type.Type;
+import org.hibernate.util.xpl.StringHelper;
/**
*
@@ -76,7 +84,7 @@
try {
try {
session = sessionFactory.openSession();
- return QueryExecutor.executeHQLQuery(this, session, hql, queryParameters);
+ return QueryHelper.executeHQLQuery(this, session, hql, queryParameters);
} catch (Throwable e){
//Incompatible library versions could throw subclasses of Error, like AbstractMethodError
//may be there is a sense to say to user that the reason is probably a wrong CC version
@@ -103,7 +111,7 @@
try {
try {
session = sessionFactory.openSession();
- return QueryExecutor.executeCriteriaQuery(session, criteriaCode, model);
+ return QueryHelper.executeCriteriaQuery(session, criteriaCode, model);
} catch (Throwable e){
//Incompatible library versions could throw subclasses of Error, like AbstractMethodError
//may be there is a sense to say to user that the reason is probably a wrong CC version
@@ -248,6 +256,10 @@
return prefs.getName();
}
+ public ExecutionContext getExecutionContext() {
+ return executionContext;
+ }
+
public Object execute(Command c) {
if (executionContext != null) {
return executionContext.execute(c);
@@ -333,4 +345,8 @@
public boolean isSessionFactoryCreated() {
return sessionFactory != null;
}
+
+ public String generateSQL(final String query) {
+ return QueryHelper.generateSQL(executionContext, sessionFactory, query);
+ }
}
\ No newline at end of file
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryExecutor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryExecutor.java 2012-03-12 08:35:13 UTC (rev 39433)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryExecutor.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate4_0;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.Criteria;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.ConsoleQueryParameter;
-import org.hibernate.console.HibernateConsoleRuntimeException;
-import org.hibernate.console.QueryInputModel;
-import org.hibernate.console.execution.ExecutionContext.Command;
-import org.hibernate.console.ext.HibernateException;
-import org.hibernate.console.ext.HibernateExtension;
-import org.hibernate.console.ext.QueryResult;
-import org.hibernate.console.ext.QueryResultImpl;
-import org.hibernate.engine.spi.SessionImplementor;
-import org.hibernate.internal.util.ReflectHelper;
-import org.hibernate.type.Type;
-
-import bsh.EvalError;
-import bsh.Interpreter;
-
-/**
- * @author Dmitry Geraskov
- *
- */
-public class QueryExecutor {
-
- public static QueryResult executeHQLQuery(HibernateExtension hibernateExtension, Session session, String hql,
- final QueryInputModel queryParameters) {
-
- final Query query = session.createQuery(hql);
- List<Object> list = Collections.emptyList();
- long queryTime = 0;
-
- list = new ArrayList<Object>();
- hibernateExtension.execute(new Command() {
-
- @Override
- public Object execute() {
- setupParameters(query, queryParameters);
- return null;
- }
- });
-
- long startTime = System.currentTimeMillis();
- QueryResultImpl result = new QueryResultImpl(list,
- queryTime);
- try {
- Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
- queryTime = System.currentTimeMillis() - startTime;
- while (iter.hasNext() ) {
- Object element = iter.next();
- list.add(element);
- }
- result.setPathNames(getHQLPathNames(query));
- } catch (HibernateException e){
- result.addException(e);
- }
- return result;
-
- }
-
- public static QueryResult executeCriteriaQuery(Session session, String criteriaCode,
- QueryInputModel model) {
-
- try {
- List<Object> list = Collections.emptyList();
- long queryTime = 0;
- if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
- return new QueryResultImpl(new IllegalArgumentException(
- ConsoleMessages.JavaPage_not_allowed));
- } else {
- Interpreter ip = setupInterpreter(session);
- Object o = ip.eval(criteriaCode);
- // ugly! TODO: make un-ugly!
- if (o instanceof Criteria) {
- Criteria criteria = (Criteria) o;
- if (model.getMaxResults() != null) {
- criteria.setMaxResults(model.getMaxResults().intValue());
- }
-
- long startTime = System.currentTimeMillis();
- list = criteria.list();
- queryTime = System.currentTimeMillis() - startTime;
- } else if (o instanceof List<?>) {
- list = (List<Object>) o;
- if (model.getMaxResults() != null) {
- list = list.subList(0, Math.min(list.size(), model
- .getMaxResults().intValue()));
- }
- } else {
- list = new ArrayList<Object>();
- list.add(o);
- }
- }
- return new QueryResultImpl(list,
- Collections.singletonList(ConsoleMessages.JavaPage_no_info), queryTime);
- } catch (EvalError e) {
- return new QueryResultImpl(e);
- } catch (HibernateException e) {
- return new QueryResultImpl(e);
- }
- }
-
- private static List<String> getHQLPathNames(Query query) {
- List<String> l = Collections.emptyList();
-
- if(query==null) return l;
- String[] returnAliases = null;
- try {
- returnAliases = query.getReturnAliases();
- } catch(NullPointerException e) {
- // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- if(returnAliases==null) {
- Type[] t;
- try {
- t = query.getReturnTypes();
- } catch(NullPointerException npe) {
- t = new Type[] { null };
- // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- l = new ArrayList<String>(t.length);
-
- for (int i = 0; i < t.length; i++) {
- Type type = t[i];
- if(type==null) {
- l.add("<multiple types>"); //$NON-NLS-1$
- } else {
- l.add(type.getName() );
- }
- }
- } else {
- String[] t = returnAliases;
- l = new ArrayList<String>(t.length);
-
- for (int i = 0; i < t.length; i++) {
- l.add(t[i]);
- }
- }
-
- return l;
- }
-
- private static void setupParameters(Query query2, QueryInputModel model) {
- if(model.getMaxResults()!=null) {
- query2.setMaxResults( model.getMaxResults().intValue() );
- }
- ConsoleQueryParameter[] qp = model.getQueryParameters();
- for (int i = 0; i < qp.length; i++) {
- ConsoleQueryParameter parameter = qp[i];
-
- String typeName = parameter.getType().getClass().getName();
- try {
- int pos = Integer.parseInt(parameter.getName());
- //FIXME no method to set positioned list value
- query2.setParameter(pos, calcValue( parameter ), convertToType(typeName));
- } catch(NumberFormatException nfe) {
- Object value = parameter.getValue();
- if (value != null && value.getClass().isArray()){
- Object[] values = (Object[])value;
- query2.setParameterList(parameter.getName(), Arrays.asList(values), convertToType(typeName));
- } else {
- query2.setParameter(parameter.getName(), calcValue( parameter ), convertToType(typeName));
- }
- }
- }
- }
-
- /**
- * Method converts Hibernate3 to Hibernate4 classes
- * @param typeClassName
- * @return
- */
- private static Type convertToType(String typeClassName){
- try {
- return (Type) ReflectHelper.classForName(typeClassName).newInstance();
- } catch (Exception e) {
- throw new HibernateConsoleRuntimeException("Can't instantiate hibernate type " + typeClassName, e);
- }
- }
-
- private static Object calcValue(ConsoleQueryParameter parameter) {
- return parameter.getValueForQuery();
- }
-
-
- private static Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
- Interpreter interpreter = new Interpreter();
-
- interpreter.set("session", session); //$NON-NLS-1$
- interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
- SessionImplementor si = (SessionImplementor)session;
-
- Map<String, ?> map = si.getFactory().getAllClassMetadata();
-
- Iterator<String> iterator = map.keySet().iterator();
- //TODO: filter non classes.
- String imports = ""; //$NON-NLS-1$
- while (iterator.hasNext() ) {
- String element = iterator.next();
- imports += "import " + element + ";\n"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
- imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
- // TODO: expose the parameters as values to be used in the code.
- interpreter.eval(imports);
-
- return interpreter;
- }
-
-}
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryHelper.java (from rev 38910, trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryExecutor.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryHelper.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/QueryHelper.java 2012-03-12 11:15:51 UTC (rev 39434)
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate4_0;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.ConsoleQueryParameter;
+import org.hibernate.console.HibernateConsoleRuntimeException;
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.console.ext.QueryResult;
+import org.hibernate.console.ext.QueryResultImpl;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.QLFormatHelper;
+import org.hibernate.engine.query.spi.HQLQueryPlan;
+import org.hibernate.engine.spi.SessionImplementor;
+import org.hibernate.hql.spi.QueryTranslator;
+import org.hibernate.internal.SessionFactoryImpl;
+import org.hibernate.internal.util.ReflectHelper;
+import org.hibernate.type.Type;
+import org.hibernate.util.xpl.StringHelper;
+
+import bsh.EvalError;
+import bsh.Interpreter;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class QueryHelper {
+
+ public static QueryResult executeHQLQuery(HibernateExtension hibernateExtension, Session session, String hql,
+ final QueryInputModel queryParameters) {
+
+ final Query query = session.createQuery(hql);
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+
+ list = new ArrayList<Object>();
+ hibernateExtension.execute(new Command() {
+
+ @Override
+ public Object execute() {
+ setupParameters(query, queryParameters);
+ return null;
+ }
+ });
+
+ long startTime = System.currentTimeMillis();
+ QueryResultImpl result = new QueryResultImpl(list,
+ queryTime);
+ try {
+ Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ result.setPathNames(getHQLPathNames(query));
+ } catch (HibernateException e){
+ result.addException(e);
+ }
+ return result;
+
+ }
+
+ public static QueryResult executeCriteriaQuery(Session session, String criteriaCode,
+ QueryInputModel model) {
+
+ try {
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+ if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
+ return new QueryResultImpl(new IllegalArgumentException(
+ ConsoleMessages.JavaPage_not_allowed));
+ } else {
+ Interpreter ip = setupInterpreter(session);
+ Object o = ip.eval(criteriaCode);
+ // ugly! TODO: make un-ugly!
+ if (o instanceof Criteria) {
+ Criteria criteria = (Criteria) o;
+ if (model.getMaxResults() != null) {
+ criteria.setMaxResults(model.getMaxResults().intValue());
+ }
+
+ long startTime = System.currentTimeMillis();
+ list = criteria.list();
+ queryTime = System.currentTimeMillis() - startTime;
+ } else if (o instanceof List<?>) {
+ list = (List<Object>) o;
+ if (model.getMaxResults() != null) {
+ list = list.subList(0, Math.min(list.size(), model
+ .getMaxResults().intValue()));
+ }
+ } else {
+ list = new ArrayList<Object>();
+ list.add(o);
+ }
+ }
+ return new QueryResultImpl(list,
+ Collections.singletonList(ConsoleMessages.JavaPage_no_info), queryTime);
+ } catch (EvalError e) {
+ return new QueryResultImpl(e);
+ } catch (HibernateException e) {
+ return new QueryResultImpl(e);
+ }
+ }
+
+ private static List<String> getHQLPathNames(Query query) {
+ List<String> l = Collections.emptyList();
+
+ if(query==null) return l;
+ String[] returnAliases = null;
+ try {
+ returnAliases = query.getReturnAliases();
+ } catch(NullPointerException e) {
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ if(returnAliases==null) {
+ Type[] t;
+ try {
+ t = query.getReturnTypes();
+ } catch(NullPointerException npe) {
+ t = new Type[] { null };
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ Type type = t[i];
+ if(type==null) {
+ l.add("<multiple types>"); //$NON-NLS-1$
+ } else {
+ l.add(type.getName() );
+ }
+ }
+ } else {
+ String[] t = returnAliases;
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ l.add(t[i]);
+ }
+ }
+
+ return l;
+ }
+
+ private static void setupParameters(Query query2, QueryInputModel model) {
+ if(model.getMaxResults()!=null) {
+ query2.setMaxResults( model.getMaxResults().intValue() );
+ }
+ ConsoleQueryParameter[] qp = model.getQueryParameters();
+ for (int i = 0; i < qp.length; i++) {
+ ConsoleQueryParameter parameter = qp[i];
+
+ String typeName = parameter.getType().getClass().getName();
+ try {
+ int pos = Integer.parseInt(parameter.getName());
+ //FIXME no method to set positioned list value
+ query2.setParameter(pos, calcValue( parameter ), convertToType(typeName));
+ } catch(NumberFormatException nfe) {
+ Object value = parameter.getValue();
+ if (value != null && value.getClass().isArray()){
+ Object[] values = (Object[])value;
+ query2.setParameterList(parameter.getName(), Arrays.asList(values), convertToType(typeName));
+ } else {
+ query2.setParameter(parameter.getName(), calcValue( parameter ), convertToType(typeName));
+ }
+ }
+ }
+ }
+
+ /**
+ * Method converts Hibernate3 to Hibernate4 classes
+ * @param typeClassName
+ * @return
+ */
+ private static Type convertToType(String typeClassName){
+ try {
+ return (Type) ReflectHelper.classForName(typeClassName).newInstance();
+ } catch (Exception e) {
+ throw new HibernateConsoleRuntimeException("Can't instantiate hibernate type " + typeClassName, e);
+ }
+ }
+
+ private static Object calcValue(ConsoleQueryParameter parameter) {
+ return parameter.getValueForQuery();
+ }
+
+
+ private static Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
+ Interpreter interpreter = new Interpreter();
+
+ interpreter.set("session", session); //$NON-NLS-1$
+ interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
+ SessionImplementor si = (SessionImplementor)session;
+
+ Map<String, ?> map = si.getFactory().getAllClassMetadata();
+
+ Iterator<String> iterator = map.keySet().iterator();
+ //TODO: filter non classes.
+ String imports = ""; //$NON-NLS-1$
+ while (iterator.hasNext() ) {
+ String element = iterator.next();
+ imports += "import " + element + ";\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
+ imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
+ // TODO: expose the parameters as values to be used in the code.
+ interpreter.eval(imports);
+
+ return interpreter;
+ }
+
+ static String generateSQL(ExecutionContext executionContext, final SessionFactory sessionFactory, final String query) {
+
+ if(StringHelper.isEmpty(query)) return ""; //$NON-NLS-1$
+
+ String result = (String) executionContext.execute(new ExecutionContext.Command() {
+ public Object execute() {
+ try {
+ SessionFactoryImpl sfimpl = (SessionFactoryImpl) sessionFactory; // hack - to get to the actual queries..
+ StringBuffer str = new StringBuffer(256);
+ HQLQueryPlan plan = new HQLQueryPlan(query, false, Collections.EMPTY_MAP, sfimpl);
+
+ QueryTranslator[] translators = plan.getTranslators();
+ for (int i = 0; i < translators.length; i++) {
+ QueryTranslator translator = translators[i];
+ if(translator.isManipulationStatement()) {
+ str.append(HibernateConsoleMessages.DynamicSQLPreviewView_manipulation_of + i + ":"); //$NON-NLS-1$
+ Iterator<?> iterator = translator.getQuerySpaces().iterator();
+ while ( iterator.hasNext() ) {
+ Object qspace = iterator.next();
+ str.append(qspace);
+ if(iterator.hasNext()) { str.append(", "); } //$NON-NLS-1$
+ }
+
+ } else {
+ Type[] returnTypes = translator.getReturnTypes();
+ str.append(i +": "); //$NON-NLS-1$
+ for (int j = 0; j < returnTypes.length; j++) {
+ Type returnType = returnTypes[j];
+ str.append(returnType.getName());
+ if(j<returnTypes.length-1) { str.append(", "); } //$NON-NLS-1$
+ }
+ }
+ str.append("\n-----------------\n"); //$NON-NLS-1$
+ Iterator<?> sqls = translator.collectSqlStrings().iterator();
+ while ( sqls.hasNext() ) {
+ String sql = (String) sqls.next();
+ str.append(QLFormatHelper.formatForScreen(sql));
+ str.append("\n\n"); //$NON-NLS-1$
+ }
+ }
+ return str.toString();
+ } catch(Throwable t) {
+ StringBuffer msgs = new StringBuffer();
+
+ Throwable cause = t;
+ while(cause!=null) {
+ msgs.append(t);
+ if(cause.getCause()==cause) {
+ cause=null;
+ } else {
+ cause = cause.getCause();
+ if(cause!=null) msgs.append(HibernateConsoleMessages.DynamicSQLPreviewView_caused_by);
+ }
+ }
+ return msgs.toString();
+ }
+
+ }
+ });
+
+ return result;
+ }
+
+
+}
14 years
JBoss Tools SVN: r39433 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-12 04:35:13 -0400 (Mon, 12 Mar 2012)
New Revision: 39433
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
Log:
/JBIDE-11182 - show only deployed is default behavior (trunk)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2012-03-12 08:21:42 UTC (rev 39432)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2012-03-12 08:35:13 UTC (rev 39433)
@@ -775,6 +775,7 @@
};
filterCombo.addModifyListener(ml);
filterText.addModifyListener(ml);
+ filterCombo.select(1); // select DEPLOYED
return root;
}
14 years
JBoss Tools SVN: r39432 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-12 04:21:42 -0400 (Mon, 12 Mar 2012)
New Revision: 39432
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties
Log:
JBIDE-11247 to trunk (removed from english prop file)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties 2012-03-12 08:19:42 UTC (rev 39431)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties 2012-03-12 08:21:42 UTC (rev 39432)
@@ -46,9 +46,9 @@
jboss.eap.version.50.description=JBoss Enterprise Application Platform (EAP) 5.x
jboss.eap.version.50.runtime.name=JBoss Enterprise Application Platform 5.x Runtime
-jboss.eap.version.60.name=JBoss Enterprise Application Platform 6.x (Experimental)
+jboss.eap.version.60.name=JBoss Enterprise Application Platform 6.x
jboss.eap.version.60.description=JBoss Enterprise Application Platform (EAP) 6.x
-jboss.eap.version.60.runtime.name=JBoss Enterprise Application Platform 6.x Runtime (Experimental)
+jboss.eap.version.60.runtime.name=JBoss Enterprise Application Platform 6.x Runtime
deploy.runtime.name=Deploy Only Runtime
deploy.runtime.description=A runtime provided to allow a deploy-only server the ability to deploy all project types.
14 years
JBoss Tools SVN: r39431 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-12 04:19:42 -0400 (Mon, 12 Mar 2012)
New Revision: 39431
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
Log:
JBIDE-11241 to trunk b2
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2012-03-12 08:18:47 UTC (rev 39430)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2012-03-12 08:19:42 UTC (rev 39431)
@@ -376,6 +376,10 @@
}
public IPath getOutputFilePath(IModule[] module) {
+ return getOutputFilePath(server,module, deployRoot);
+ }
+
+ public IPath getOutputFilePath(IServer server, IModule[] module, String deployRoot) {
IDeployableServer ds = ServerConverter.getDeployableServer(server);
return getDeployPath(module, deployRoot, ds);
}
14 years
JBoss Tools SVN: r39430 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-12 04:18:47 -0400 (Mon, 12 Mar 2012)
New Revision: 39430
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-11241 to trunk b2
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-03-12 03:21:04 UTC (rev 39429)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-03-12 08:18:47 UTC (rev 39430)
@@ -24,6 +24,7 @@
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.PushOperationResult;
+import org.eclipse.egit.core.op.RemoveFromIndexOperation;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.osgi.util.NLS;
@@ -42,6 +43,7 @@
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils;
public class ExpressPublishMethod implements IJBossServerPublishMethod {
@@ -125,22 +127,25 @@
try {
LocalZippedPublisherUtil util = new LocalZippedPublisherUtil();
- IStatus status = util.publishModule(behaviour.getServer(), dest.toString(), module, publishType, delta, monitor);
-
- IPath path = util.getOutputFilePath(module); // where it's deployed
- IResource addedResource = destFolder.getFile(new Path(path.lastSegment()));
- IResource[] resource = new IResource[]{addedResource};
- final AddToIndexOperation operation = new AddToIndexOperation(resource);
- try {
- operation.execute(monitor);
- } catch (CoreException e) {
- // TODO
+ IPath path = util.getOutputFilePath(behaviour.getServer(), module, dest.toString()); // where it's deployed
+ IResource changedResource = destFolder.getFile(new Path(path.lastSegment()));
+ IResource[] resource = new IResource[]{changedResource};
+
+ if( deltaKind == ServerBehaviourDelegate.REMOVED) {
+ changedResource.delete(false, monitor);
+ } else {
+ IStatus status = util.publishModule(behaviour.getServer(), dest.toString(), module, publishType, delta, monitor);
+ final AddToIndexOperation operation = new AddToIndexOperation(resource);
+ try {
+ operation.execute(monitor);
+ } catch (CoreException e) {
+ OpenShiftUIActivator.log(e.getStatus());
+ }
}
-
} catch( Exception e ) {
e.printStackTrace();
}
- return 0;
+ return IServer.PUBLISH_STATE_NONE;
}
protected boolean isInDestProjectTree(String magicProject, IModule[] module) {
14 years
JBoss Tools SVN: r39429 - in trunk/documentation/guides/GettingStartedGuide/en-US: images/getting_started and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-03-11 23:21:04 -0400 (Sun, 11 Mar 2012)
New Revision: 39429
Added:
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central-project_examples_01.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central-project_examples_02.png
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/Getting_Started_Guide.xml
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_04.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_02.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_03.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_04.png
trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml
trunk/documentation/guides/GettingStartedGuide/en-US/jboss_perspective.xml
trunk/documentation/guides/GettingStartedGuide/en-US/master.xml
Log:
updated with major changes to the guide
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-03-11 11:01:03 UTC (rev 39428)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-03-12 03:21:04 UTC (rev 39429)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>14</pubsnumber>
+<pubsnumber>15</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Getting_Started_Guide.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Getting_Started_Guide.xml 2012-03-11 11:01:03 UTC (rev 39428)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Getting_Started_Guide.xml 2012-03-12 03:21:04 UTC (rev 39429)
@@ -15,7 +15,7 @@
<xi:include href="manage.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="jsp_application.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="rad_jsf_application.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
-<xi:include href="project_examples.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<!--<xi:include href="project_examples.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>-->
<xi:include href="uninstalling.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="gsg_faq.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central-project_examples_01.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central-project_examples_01.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central-project_examples_02.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central-project_examples_02.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_04.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_02.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_03.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_04.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml 2012-03-11 11:01:03 UTC (rev 39428)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml 2012-03-12 03:21:04 UTC (rev 39429)
@@ -84,6 +84,9 @@
</mediaobject>
</figure>
<para>
+ For an in-depth look into the installation of project examples go to <xref linkend="jboss_central-project_examples-indepth" />.
+ </para>
+ <para>
You can also download other examples and install and set runtime preferences through the <guilabel>Project Examples</guilabel> section by using the five buttons at the top-right. The first button <inlinemediaobject>
<imageobject>
<imagedata fileref="images/getting_started/jboss_central_icon_02.png"/>
@@ -116,23 +119,11 @@
<para>
The third <inlinemediaobject>
<imageobject>
- <imagedata fileref="images/getting_started/jboss_central_icon_04.png"/>
- </imageobject>
- </inlinemediaobject> and fourth <inlinemediaobject>
- <imageobject>
<imagedata fileref="images/getting_started/jboss_central_icon_05.png"/>
</imageobject>
- </inlinemediaobject> buttons take you directly to the <guilabel>Seam 2</guilabel> runtime and <guilabel>Server Runtime Environments</guilabel> preference dialogs respectively.
+ </inlinemediaobject> button takes you directly to the <guilabel>Server Runtime Environments</guilabel> preferences dialog.
</para>
<figure>
- <title>Seam 2 runtime preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/jboss_central_08.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
- <figure>
<title>Server Runtime Environments preferences</title>
<mediaobject>
<imageobject>
@@ -288,4 +279,55 @@
</mediaobject>
</figure>
</section>
+<section id="jboss_central-project_examples-indepth">
+ <title>Project Example Installation</title>
+ <para>
+ To install an example from within JBoss Central, navigate to the <guimenuitem>Project Examples</guimenuitem> section and select an example from the list.
+ </para>
+ <figure>
+ <title>Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_05.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ This section will guide you through the installation of the <guimenuitem>Helloworld</guimenuitem> example.
+ </para>
+ <para>
+ Click on the <guimenuitem>Helloworld</guimenuitem> item in the <guimenuitem>Quickstarts</guimenuitem> list.
+ </para>
+ <para>
+ An installation wizard for the example will open and automatically search for required components on your system. If a particular component is not found (a plug-in or a required version of the JBoss server), the component will be automatically downloaded for you during example installation.
+ </para>
+ <figure>
+ <title>Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central-project_examples_01.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Next</guibutton> button.
+ </para>
+ <para>
+ You will be asked to define the install location for the example. Your curent workspace will be selected by default.
+ </para>
+ <figure>
+ <title>Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central-project_examples_02.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Finish</guibutton> button to begin installation of the example.
+ </para>
+ <para>
+ Once the example has been installed it will appear in the list of projects within your <guilabel>Project Explorer</guilabel>.
+ </para>
+</section>
</chapter>
\ No newline at end of file
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/jboss_perspective.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/jboss_perspective.xml 2012-03-11 11:01:03 UTC (rev 39428)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/jboss_perspective.xml 2012-03-12 03:21:04 UTC (rev 39429)
@@ -24,10 +24,10 @@
</menuchoice> and the context menu for a project.
</para>
<para>
- The menu items for <menuchoice>
+ A selection of the menu items for <menuchoice>
<guimenuitem>File</guimenuitem>
<guimenuitem>New</guimenuitem>
- </menuchoice> can be seen in <xref linkend="figure-jboss_perspective_02" />
+ </menuchoice> can be seen in <xref linkend="figure-jboss_perspective_02" />.
</para>
<figure id="figure-jboss_perspective_02">
<title>JBoss Perspective: <menuchoice>
@@ -42,10 +42,10 @@
</mediaobject>
</figure>
<para>
- The menu items for <menuchoice>
+ A selection of the menu items for <menuchoice>
<guimenuitem>Window</guimenuitem>
<guimenuitem>Show View</guimenuitem>
- </menuchoice> can be seen in <xref linkend="figure-jboss_perspective_03" />
+ </menuchoice> can be seen in <xref linkend="figure-jboss_perspective_03" />.
</para>
<figure id="figure-jboss_perspective_03">
<title>JBoss Perspective: <menuchoice>
@@ -60,12 +60,12 @@
</mediaobject>
</figure>
<para>
- The menu items for the context menu of a project can be seen in <xref linkend="figure-jboss_perspective_04" />
+ A selection of the menu items for the context menu of a project can be seen in <xref linkend="figure-jboss_perspective_04" />.
</para>
<figure id="figure-jboss_perspective_04">
<title>JBoss Perspective: <menuchoice>
- <guimenuitem>Window</guimenuitem>
- <guimenuitem>Show View</guimenuitem>
+ <guimenuitem>Context Menu</guimenuitem>
+ <guimenuitem>New</guimenuitem>
</menuchoice>
</title>
<mediaobject>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/master.xml 2012-03-11 11:01:03 UTC (rev 39428)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/master.xml 2012-03-12 03:21:04 UTC (rev 39429)
@@ -61,14 +61,14 @@
- <!--&getting_started;-->
+ <!--&getting_started;-->
&jbossinstall;
&jbosscentral;
&jbossperspective;
&manage;
&jsp_application;
&rad_jsf_application;
- &project_examples;
+ <!--&project_examples;-->
&uninstalling;
&gsg_faq;
&further_reading;
14 years